OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _FWL_WIDGET_LIGHT_H | 7 #ifndef _FWL_WIDGET_LIGHT_H |
8 #define _FWL_WIDGET_LIGHT_H | 8 #define _FWL_WIDGET_LIGHT_H |
9 class CFWL_WidgetMgr; | 9 class CFWL_WidgetMgr; |
10 class CFWL_Message; | 10 class CFWL_Message; |
11 class CFWL_Event; | 11 class CFWL_Event; |
12 class IFWL_WidgetDelegate; | 12 class IFWL_WidgetDelegate; |
13 class IFWL_Widget; | 13 class IFWL_Widget; |
14 class CFWL_Widget; | 14 class CFWL_Widget; |
15 class CFWL_WidgetDelegate; | 15 class CFWL_WidgetDelegate; |
16 class CFWL_WidgetProperties : public CFX_Object | 16 class CFWL_WidgetProperties |
17 { | 17 { |
18 public: | 18 public: |
19 CFWL_WidgetProperties() | 19 CFWL_WidgetProperties() |
20 { | 20 { |
21 m_ctmOnParent.Reset(); | 21 m_ctmOnParent.Reset(); |
22 m_rtWidget.Set(0, 0, 0, 0); | 22 m_rtWidget.Set(0, 0, 0, 0); |
23 m_dwStyles = FWL_WGTSTYLE_Child; | 23 m_dwStyles = FWL_WGTSTYLE_Child; |
24 m_dwStyleExes = 0; | 24 m_dwStyleExes = 0; |
25 m_dwStates = 0; | 25 m_dwStates = 0; |
26 m_pParent = NULL; | 26 m_pParent = NULL; |
27 m_pOwner = NULL; | 27 m_pOwner = NULL; |
28 } | 28 } |
29 CFX_WideString m_wsWindowclass; | 29 CFX_WideString m_wsWindowclass; |
30 CFX_Matrix m_ctmOnParent; | 30 CFX_Matrix m_ctmOnParent; |
31 CFX_RectF m_rtWidget; | 31 CFX_RectF m_rtWidget; |
32 FX_DWORD m_dwStyles; | 32 FX_DWORD m_dwStyles; |
33 FX_DWORD m_dwStyleExes; | 33 FX_DWORD m_dwStyleExes; |
34 FX_DWORD m_dwStates; | 34 FX_DWORD m_dwStates; |
35 CFWL_Widget *m_pParent; | 35 CFWL_Widget *m_pParent; |
36 CFWL_Widget *m_pOwner; | 36 CFWL_Widget *m_pOwner; |
37 }; | 37 }; |
38 class CFWL_Widget : public CFX_Object | 38 class CFWL_Widget |
39 { | 39 { |
40 public: | 40 public: |
41 IFWL_Widget* GetWidget(); | 41 IFWL_Widget* GetWidget(); |
42 FX_DWORD Release(); | 42 FX_DWORD Release(); |
43 CFWL_Widget* Retain(); | 43 CFWL_Widget* Retain(); |
44 FX_DWORD GetRefCount() const; | 44 FX_DWORD GetRefCount() const; |
45 FWL_ERR GetClassName(CFX_WideString &wsClass) const; | 45 FWL_ERR GetClassName(CFX_WideString &wsClass) const; |
46 FX_DWORD GetClassID() const; | 46 FX_DWORD GetClassID() const; |
47 virtual FX_BOOL IsInstance(FX_WSTR wsClass) const; | 47 virtual FX_BOOL IsInstance(FX_WSTR wsClass) const; |
48 protected: | 48 protected: |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 CFWL_Widget(); | 82 CFWL_Widget(); |
83 virtual ~CFWL_Widget(); | 83 virtual ~CFWL_Widget(); |
84 void RegisterEventTarget(CFWL_Widget *pEventSource = NULL, FX
_DWORD dwFilter = FWL_EVENT_ALL_MASK); | 84 void RegisterEventTarget(CFWL_Widget *pEventSource = NULL, FX
_DWORD dwFilter = FWL_EVENT_ALL_MASK); |
85 void DispatchEvent(CFWL_Event *pEvent); | 85 void DispatchEvent(CFWL_Event *pEvent); |
86 CFX_SizeF CalcTextSize(const CFX_WideString &wsText, FX_BOOL bMultiLine =
FALSE, FX_INT32 iLineWidth = -1); | 86 CFX_SizeF CalcTextSize(const CFX_WideString &wsText, FX_BOOL bMultiLine =
FALSE, FX_INT32 iLineWidth = -1); |
87 IFWL_Widget *m_pImp; | 87 IFWL_Widget *m_pImp; |
88 IFWL_WidgetDelegate *m_pDelegate; | 88 IFWL_WidgetDelegate *m_pDelegate; |
89 CFWL_WidgetMgr *m_pWidgetMgr; | 89 CFWL_WidgetMgr *m_pWidgetMgr; |
90 CFWL_WidgetProperties *m_pProperties; | 90 CFWL_WidgetProperties *m_pProperties; |
91 }; | 91 }; |
92 class CFWL_WidgetDelegate : public CFX_Object, public IFWL_WidgetDelegate | 92 class CFWL_WidgetDelegate |
93 { | 93 { |
94 public: | 94 public: |
95 CFWL_WidgetDelegate(); | 95 CFWL_WidgetDelegate(); |
96 virtual ~CFWL_WidgetDelegate(); | 96 virtual ~CFWL_WidgetDelegate(); |
97 virtual FX_INT32 OnProcessMessage(CFWL_Message *pMessage); | 97 virtual FX_INT32 OnProcessMessage(CFWL_Message *pMessage); |
98 virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent); | 98 virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent); |
99 virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_
Matrix *pMatrix = NULL); | 99 virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_
Matrix *pMatrix = NULL); |
100 }; | 100 }; |
101 #endif | 101 #endif |
OLD | NEW |