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_WIDGETIMP_H_ | 7 #ifndef FWL_WIDGETIMP_H_ |
8 #define FWL_WIDGETIMP_H_ | 8 #define FWL_WIDGETIMP_H_ |
9 | 9 |
10 #include "xfa/include/fwl/core/fwl_widget.h" | 10 #include "xfa/include/fwl/core/fwl_widget.h" |
11 #include "xfa/src/fwl/src/core/include/fwl_targetimp.h" | 11 #include "xfa/src/fwl/src/core/include/fwl_targetimp.h" |
12 | 12 |
13 class CFWL_NoteTarget; | 13 class CFWL_NoteTarget; |
14 class CFWL_NoteThread; | 14 class CFWL_NoteThreadImp; |
15 class CFWL_WidgetImpProperties; | 15 class CFWL_WidgetImpProperties; |
16 class CFWL_WidgetMgr; | 16 class CFWL_WidgetMgr; |
17 class IFWL_DataProvider; | 17 class IFWL_DataProvider; |
18 class IFWL_ThemeProvider; | 18 class IFWL_ThemeProvider; |
19 class IFWL_Widget; | 19 class IFWL_Widget; |
20 class IFWL_WidgetDelegate; | 20 class IFWL_WidgetDelegate; |
21 | 21 |
22 class CFWL_WidgetImp : public CFWL_TargetImp { | 22 class CFWL_WidgetImp : public CFWL_TargetImp { |
23 public: | 23 public: |
24 virtual FWL_ERR Initialize(); | 24 virtual FWL_ERR Initialize(); |
(...skipping 28 matching lines...) Expand all Loading... |
53 virtual FWL_ERR TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt); | 53 virtual FWL_ERR TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt); |
54 virtual FWL_ERR GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE); | 54 virtual FWL_ERR GetMatrix(CFX_Matrix& matrix, FX_BOOL bGlobal = FALSE); |
55 virtual FWL_ERR SetMatrix(const CFX_Matrix& matrix); | 55 virtual FWL_ERR SetMatrix(const CFX_Matrix& matrix); |
56 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, | 56 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, |
57 const CFX_Matrix* pMatrix = NULL); | 57 const CFX_Matrix* pMatrix = NULL); |
58 virtual IFWL_ThemeProvider* GetThemeProvider(); | 58 virtual IFWL_ThemeProvider* GetThemeProvider(); |
59 virtual FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); | 59 virtual FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); |
60 virtual FWL_ERR SetDataProvider(IFWL_DataProvider* pDataProvider); | 60 virtual FWL_ERR SetDataProvider(IFWL_DataProvider* pDataProvider); |
61 virtual IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); | 61 virtual IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); |
62 virtual IFWL_NoteThread* GetOwnerThread() const; | 62 virtual IFWL_NoteThread* GetOwnerThread() const; |
63 FWL_ERR SetOwnerThread(CFWL_NoteThread* pOwnerThread); | 63 FWL_ERR SetOwnerThread(CFWL_NoteThreadImp* pOwnerThread); |
64 IFWL_Widget* GetInterface() const; | 64 IFWL_Widget* GetInterface() const; |
65 void SetInterface(IFWL_Widget* pInterface); | 65 void SetInterface(IFWL_Widget* pInterface); |
66 CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent); | 66 CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent); |
67 | 67 |
68 protected: | 68 protected: |
69 CFWL_WidgetImp(IFWL_Widget* pOuter = NULL); | 69 CFWL_WidgetImp(IFWL_Widget* pOuter = NULL); |
70 CFWL_WidgetImp(const CFWL_WidgetImpProperties& properties, | 70 CFWL_WidgetImp(const CFWL_WidgetImpProperties& properties, |
71 IFWL_Widget* pOuter = NULL); | 71 IFWL_Widget* pOuter = NULL); |
72 virtual ~CFWL_WidgetImp(); | 72 virtual ~CFWL_WidgetImp(); |
73 FX_BOOL IsEnabled() const; | 73 FX_BOOL IsEnabled() const; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 IFWL_ThemeProvider* pTheme, | 130 IFWL_ThemeProvider* pTheme, |
131 const CFX_Matrix* pMatrix = NULL); | 131 const CFX_Matrix* pMatrix = NULL); |
132 void DrawEdge(CFX_Graphics* pGraphics, | 132 void DrawEdge(CFX_Graphics* pGraphics, |
133 int32_t iPartEdge, | 133 int32_t iPartEdge, |
134 IFWL_ThemeProvider* pTheme, | 134 IFWL_ThemeProvider* pTheme, |
135 const CFX_Matrix* pMatrix = NULL); | 135 const CFX_Matrix* pMatrix = NULL); |
136 void NotifyDriver(); | 136 void NotifyDriver(); |
137 | 137 |
138 FX_BOOL IsParent(IFWL_Widget* pParent); | 138 FX_BOOL IsParent(IFWL_Widget* pParent); |
139 CFWL_WidgetMgr* m_pWidgetMgr; | 139 CFWL_WidgetMgr* m_pWidgetMgr; |
140 CFWL_NoteThread* m_pOwnerThread; | 140 CFWL_NoteThreadImp* m_pOwnerThread; |
141 CFWL_WidgetImpProperties* m_pProperties; | 141 CFWL_WidgetImpProperties* m_pProperties; |
142 CFX_PrivateData* m_pPrivateData; | 142 CFX_PrivateData* m_pPrivateData; |
143 IFWL_WidgetDelegate* m_pDelegate; | 143 IFWL_WidgetDelegate* m_pDelegate; |
144 IFWL_WidgetDelegate* m_pCurDelegate; | 144 IFWL_WidgetDelegate* m_pCurDelegate; |
145 IFWL_Widget* m_pOuter; | 145 IFWL_Widget* m_pOuter; |
146 IFWL_Widget* m_pInterface; | 146 IFWL_Widget* m_pInterface; |
147 int32_t m_iLock; | 147 int32_t m_iLock; |
148 friend class CFWL_WidgetImpDelegate; | 148 friend class CFWL_WidgetImpDelegate; |
149 friend void FWL_SetWidgetRect(IFWL_Widget* widget, const CFX_RectF& rect); | 149 friend void FWL_SetWidgetRect(IFWL_Widget* widget, const CFX_RectF& rect); |
150 friend void FWL_SetWidgetStates(IFWL_Widget* widget, FX_DWORD dwStates); | 150 friend void FWL_SetWidgetStates(IFWL_Widget* widget, FX_DWORD dwStates); |
151 friend void FWL_SetWidgetStyles(IFWL_Widget* widget, FX_DWORD dwStyles); | 151 friend void FWL_SetWidgetStyles(IFWL_Widget* widget, FX_DWORD dwStyles); |
152 }; | 152 }; |
153 | 153 |
154 class CFWL_WidgetImpDelegate : public IFWL_WidgetDelegate { | 154 class CFWL_WidgetImpDelegate : public IFWL_WidgetDelegate { |
155 public: | 155 public: |
156 CFWL_WidgetImpDelegate(); | 156 CFWL_WidgetImpDelegate(); |
157 ~CFWL_WidgetImpDelegate() override {} | 157 ~CFWL_WidgetImpDelegate() override {} |
158 int32_t OnProcessMessage(CFWL_Message* pMessage) override; | 158 int32_t OnProcessMessage(CFWL_Message* pMessage) override; |
159 FWL_ERR OnProcessEvent(CFWL_Event* pEvent) override; | 159 FWL_ERR OnProcessEvent(CFWL_Event* pEvent) override; |
160 FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, | 160 FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, |
161 const CFX_Matrix* pMatrix = NULL) override; | 161 const CFX_Matrix* pMatrix = NULL) override; |
162 }; | 162 }; |
163 | 163 |
164 #endif // FWL_WIDGETIMP_H_ | 164 #endif // FWL_WIDGETIMP_H_ |
OLD | NEW |