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
16class CFWL_Caret final : public CFWL_Widget, public CFX_Timer::CallbackIface {
17 public:
19 ~CFWL_Caret() override;
20
21 // CFWL_Widget:
22 FWL_Type GetClassID() const override;
23 void DrawWidget(CFGAS_GEGraphics* pGraphics,
24 const CFX_Matrix& matrix) override;
25 void OnProcessMessage(CFWL_Message* pMessage) override;
26 void OnDrawWidget(CFGAS_GEGraphics* pGraphics,
27 const CFX_Matrix& matrix) override;
28 void Update() override;
29
30 // CFX_Timer::CallbackIface:
31 void OnTimerFired() override;
32
33 void ShowCaret();
34 void HideCaret();
35
36 private:
37 CFWL_Caret(CFWL_App* app, const Properties& properties, CFWL_Widget* pOuter);
38
39 void DrawCaretBK(CFGAS_GEGraphics* pGraphics, const CFX_Matrix& mtMatrix);
40
41 std::unique_ptr<CFX_Timer> m_pTimer;
42};
43
44#endif // XFA_FWL_CFWL_CARET_H_
CFWL_PartState
#define FWL_STATE_WGT_Invisible
Definition cfwl_widget.h:43
FWL_Type
Definition cfwl_widget.h:46
FWL_Type GetClassID() const override
void ShowCaret()
void DrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void HideCaret()
void OnProcessMessage(CFWL_Message *pMessage) override
void Update() override
void OnTimerFired() override
~CFWL_Caret() override
CFX_RectF m_PartRect
CFX_Matrix m_matrix
CFWL_Widget(CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
virtual void SetStates(uint32_t dwStates)
Properties m_Properties
uint32_t GetStates() const
void RepaintRect(const CFX_RectF &pRect)
virtual CFX_RectF GetWidgetRect()
IFWL_ThemeProvider * GetThemeProvider() const
virtual void RemoveStates(uint32_t dwStates)
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)
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
Definition heap.h:32