Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfwl_caret.h
Go to the documentation of this file.
1// Copyright 2014 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef XFA_FWL_CFWL_CARET_H_
8#define XFA_FWL_CFWL_CARET_H_
9
10#include <memory>
11
12#include "core/fxcrt/cfx_timer.h"
13#include "xfa/fgas/graphics/cfgas_gecolor.h"
14#include "xfa/fwl/cfwl_widget.h"
15
16namespace pdfium {
17
18class CFWL_Caret final : public CFWL_Widget, public CFX_Timer::CallbackIface {
19 public:
21 ~CFWL_Caret() override;
22
23 // CFWL_Widget:
24 FWL_Type GetClassID() const override;
25 void DrawWidget(CFGAS_GEGraphics* pGraphics,
26 const CFX_Matrix& matrix) override;
27 void OnProcessMessage(CFWL_Message* pMessage) override;
28 void OnDrawWidget(CFGAS_GEGraphics* pGraphics,
29 const CFX_Matrix& matrix) override;
30 void Update() override;
31
32 // CFX_Timer::CallbackIface:
33 void OnTimerFired() override;
34
35 void ShowCaret();
36 void HideCaret();
37
38 private:
39 CFWL_Caret(CFWL_App* app, const Properties& properties, CFWL_Widget* pOuter);
40
41 void DrawCaretBK(CFGAS_GEGraphics* pGraphics, const CFX_Matrix& mtMatrix);
42
43 std::unique_ptr<CFX_Timer> m_pTimer;
44};
45
46} // namespace pdfium
47
48// TODO(crbug.com/42271761): Remove.
49using pdfium::CFWL_Caret;
50
51#endif // XFA_FWL_CFWL_CARET_H_
#define FWL_STATE_WGT_Invisible
Definition cfwl_widget.h:45
CFX_Matrix & operator=(const CFX_Matrix &other)=default
CFX_RectF & operator=(const CFX_RectF &other)=default
constexpr CFX_RectF(float dst_left, float dst_top, float dst_width, float dst_height)
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
FWL_Type GetClassID() const override
void OnProcessMessage(CFWL_Message *pMessage) override
void DrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
~CFWL_Caret() override
void OnTimerFired() override
void Update() override
virtual CFX_RectF GetWidgetRect()
void RepaintRect(const CFX_RectF &pRect)
virtual void RemoveStates(uint32_t dwStates)
CFWL_Widget(CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
uint32_t GetStates() const
IFWL_ThemeProvider * GetThemeProvider() const
Properties m_Properties
virtual void SetStates(uint32_t dwStates)
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
Definition heap.h:32