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 XFA_FWL_CORE_CFWL_WIDGET_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_WIDGET_H_ |
8 #define XFA_FWL_CORE_CFWL_WIDGET_H_ | 8 #define XFA_FWL_CORE_CFWL_WIDGET_H_ |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class CFWL_WidgetMgr; | 44 class CFWL_WidgetMgr; |
45 class CFWL_WidgetProperties; | 45 class CFWL_WidgetProperties; |
46 class IFWL_ThemeProvider; | 46 class IFWL_ThemeProvider; |
47 | 47 |
48 class CFWL_Widget : public IFWL_WidgetDelegate { | 48 class CFWL_Widget : public IFWL_WidgetDelegate { |
49 public: | 49 public: |
50 ~CFWL_Widget() override; | 50 ~CFWL_Widget() override; |
51 | 51 |
52 virtual FWL_Type GetClassID() const = 0; | 52 virtual FWL_Type GetClassID() const = 0; |
53 virtual bool IsInstance(const CFX_WideStringC& wsClass) const; | 53 virtual bool IsInstance(const CFX_WideStringC& wsClass) const; |
54 virtual void GetWidgetRect(CFX_RectF& rect, bool bAutoSize); | 54 virtual CFX_RectF GetAutosizedWidgetRect(); |
| 55 virtual CFX_RectF GetWidgetRect(); |
55 virtual void GetClientRect(CFX_RectF& rect); | 56 virtual void GetClientRect(CFX_RectF& rect); |
56 virtual void ModifyStylesEx(uint32_t dwStylesExAdded, | 57 virtual void ModifyStylesEx(uint32_t dwStylesExAdded, |
57 uint32_t dwStylesExRemoved); | 58 uint32_t dwStylesExRemoved); |
58 virtual void SetStates(uint32_t dwStates); | 59 virtual void SetStates(uint32_t dwStates); |
59 virtual void RemoveStates(uint32_t dwStates); | 60 virtual void RemoveStates(uint32_t dwStates); |
60 virtual void Update() = 0; | 61 virtual void Update() = 0; |
61 virtual FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy); | 62 virtual FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy); |
62 virtual void DrawWidget(CFX_Graphics* pGraphics, | 63 virtual void DrawWidget(CFX_Graphics* pGraphics, |
63 const CFX_Matrix* pMatrix) = 0; | 64 const CFX_Matrix* pMatrix) = 0; |
64 virtual void SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); | 65 virtual void SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 const CFX_Matrix* pMatrix); | 187 const CFX_Matrix* pMatrix); |
187 void NotifyDriver(); | 188 void NotifyDriver(); |
188 bool IsParent(CFWL_Widget* pParent); | 189 bool IsParent(CFWL_Widget* pParent); |
189 | 190 |
190 void* m_pLayoutItem; | 191 void* m_pLayoutItem; |
191 uint32_t m_nEventKey; | 192 uint32_t m_nEventKey; |
192 IFWL_WidgetDelegate* m_pDelegate; // Not owned. | 193 IFWL_WidgetDelegate* m_pDelegate; // Not owned. |
193 }; | 194 }; |
194 | 195 |
195 #endif // XFA_FWL_CORE_CFWL_WIDGET_H_ | 196 #endif // XFA_FWL_CORE_CFWL_WIDGET_H_ |
OLD | NEW |