Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: xfa/fwl/basewidget/fwl_caretimp.h

Issue 2432423002: Merge the CFWL_*Imp classes into the IFWL_* classes. (Closed)
Patch Set: Review feedback Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_barcodeimp.cpp ('k') | xfa/fwl/basewidget/fwl_caretimp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
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_BASEWIDGET_FWL_CARETIMP_H_
8 #define XFA_FWL_BASEWIDGET_FWL_CARETIMP_H_
9
10 #include <memory>
11
12 #include "xfa/fwl/core/fwl_widgetimp.h"
13 #include "xfa/fwl/core/ifwl_timer.h"
14 #include "xfa/fwl/core/ifwl_widget.h"
15 #include "xfa/fxgraphics/cfx_color.h"
16
17 class CFWL_WidgetImpProperties;
18 class IFWL_Widget;
19 class CFWL_CaretImpDelegate;
20
21 class CFWL_CaretImp : public CFWL_WidgetImp {
22 public:
23 CFWL_CaretImp(const CFWL_WidgetImpProperties& properties,
24 IFWL_Widget* pOuter);
25 ~CFWL_CaretImp() override;
26
27 // CFWL_WidgetImp
28 FWL_Error GetClassName(CFX_WideString& wsClass) const override;
29 FWL_Type GetClassID() const override;
30 FWL_Error Initialize() override;
31 FWL_Error Finalize() override;
32 FWL_Error DrawWidget(CFX_Graphics* pGraphics,
33 const CFX_Matrix* pMatrix = nullptr) override;
34
35 void ShowCaret(FX_BOOL bFlag = TRUE);
36 FWL_Error GetFrequency(uint32_t& elapse);
37 FWL_Error SetFrequency(uint32_t elapse);
38 FWL_Error SetColor(CFX_Color crFill);
39
40 protected:
41 friend class CFWL_CaretImpDelegate;
42 friend class CFWL_CaretTimer;
43
44 class CFWL_CaretTimer : public IFWL_Timer {
45 public:
46 explicit CFWL_CaretTimer(CFWL_CaretImp* pCaret);
47 ~CFWL_CaretTimer() override {}
48 void Run(IFWL_TimerInfo* hTimer) override;
49 CFWL_CaretImp* const m_pCaret;
50 };
51
52 void DrawCaretBK(CFX_Graphics* pGraphics,
53 IFWL_ThemeProvider* pTheme,
54 const CFX_Matrix* pMatrix);
55
56 std::unique_ptr<CFWL_CaretTimer> m_pTimer;
57 IFWL_TimerInfo* m_pTimerInfo; // not owned.
58 uint32_t m_dwElapse;
59 CFX_Color m_crFill;
60 FX_BOOL m_bSetColor;
61 };
62
63 class CFWL_CaretImpDelegate : public CFWL_WidgetImpDelegate {
64 public:
65 CFWL_CaretImpDelegate(CFWL_CaretImp* pOwner);
66 void OnProcessMessage(CFWL_Message* pMessage) override;
67 void OnDrawWidget(CFX_Graphics* pGraphics,
68 const CFX_Matrix* pMatrix = nullptr) override;
69
70 protected:
71 CFWL_CaretImp* m_pOwner;
72 };
73
74 #endif // XFA_FWL_BASEWIDGET_FWL_CARETIMP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_barcodeimp.cpp ('k') | xfa/fwl/basewidget/fwl_caretimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698