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_IFWL_WIDGET_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_WIDGET_H_ |
8 #define XFA_FWL_CORE_IFWL_WIDGET_H_ | 8 #define XFA_FWL_CORE_IFWL_WIDGET_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 30 matching lines...) Expand all Loading... | |
41 MonthCalendar, | 41 MonthCalendar, |
42 PictureBox, | 42 PictureBox, |
43 PushButton, | 43 PushButton, |
44 ScrollBar, | 44 ScrollBar, |
45 SpinButton, | 45 SpinButton, |
46 ToolTip | 46 ToolTip |
47 }; | 47 }; |
48 | 48 |
49 class CFWL_WidgetImp; | 49 class CFWL_WidgetImp; |
50 class CFX_Graphics; | 50 class CFX_Graphics; |
51 class CXFA_FFWidget; | |
Tom Sepez
2016/05/26 22:34:21
This is the layering violation. FWL shouldn't kno
dsinclair
2016/05/27 02:57:47
If that's the case, should we move fwl out of the
| |
51 class IFWL_App; | 52 class IFWL_App; |
52 class IFWL_DataProvider; | 53 class IFWL_DataProvider; |
53 class IFWL_Form; | 54 class IFWL_Form; |
54 class IFWL_ThemeProvider; | 55 class IFWL_ThemeProvider; |
55 class IFWL_WidgetDelegate; | 56 class IFWL_WidgetDelegate; |
56 | 57 |
57 class IFWL_Widget { | 58 class IFWL_Widget { |
58 public: | 59 public: |
59 IFWL_Widget() : m_pImpl(nullptr) {} | 60 IFWL_Widget() : m_pImpl(nullptr) {} |
60 virtual ~IFWL_Widget(); | 61 virtual ~IFWL_Widget(); |
61 | 62 |
62 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); | 63 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); |
63 FWL_Error GetGlobalRect(CFX_RectF& rect); | 64 FWL_Error GetGlobalRect(CFX_RectF& rect); |
64 FWL_Error SetWidgetRect(const CFX_RectF& rect); | 65 FWL_Error SetWidgetRect(const CFX_RectF& rect); |
65 FWL_Error GetClientRect(CFX_RectF& rect); | 66 FWL_Error GetClientRect(CFX_RectF& rect); |
66 IFWL_Widget* GetParent(); | 67 IFWL_Widget* GetParent(); |
67 FWL_Error SetParent(IFWL_Widget* pParent); | 68 FWL_Error SetParent(IFWL_Widget* pParent); |
68 IFWL_Widget* GetOwner(); | 69 IFWL_Widget* GetOwner(); |
69 FWL_Error SetOwner(IFWL_Widget* pOwner); | 70 FWL_Error SetOwner(IFWL_Widget* pOwner); |
70 IFWL_Widget* GetOuter(); | 71 IFWL_Widget* GetOuter(); |
71 uint32_t GetStyles(); | 72 uint32_t GetStyles(); |
72 FWL_Error ModifyStyles(uint32_t dwStylesAdded, uint32_t dwStylesRemoved); | 73 FWL_Error ModifyStyles(uint32_t dwStylesAdded, uint32_t dwStylesRemoved); |
73 uint32_t GetStylesEx(); | 74 uint32_t GetStylesEx(); |
74 FWL_Error ModifyStylesEx(uint32_t dwStylesExAdded, | 75 FWL_Error ModifyStylesEx(uint32_t dwStylesExAdded, |
75 uint32_t dwStylesExRemoved); | 76 uint32_t dwStylesExRemoved); |
76 uint32_t GetStates(); | 77 uint32_t GetStates(); |
77 void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE); | 78 void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE); |
78 uint32_t GetEventKey() const; | 79 uint32_t GetEventKey() const; |
79 void SetEventKey(uint32_t key); | 80 void SetEventKey(uint32_t key); |
80 void* GetLayoutItem() const; | 81 CXFA_FFWidget* GetLayoutItem() const; |
81 void SetLayoutItem(void* pItem); | 82 void SetLayoutItem(CXFA_FFWidget* pItem); |
82 FWL_Error SetPrivateData(void* module_id, | 83 FWL_Error SetPrivateData(void* module_id, |
83 void* pData, | 84 void* pData, |
84 PD_CALLBACK_FREEDATA callback); | 85 PD_CALLBACK_FREEDATA callback); |
85 void* GetPrivateData(void* module_id); | 86 void* GetPrivateData(void* module_id); |
86 FWL_Error Update(); | 87 FWL_Error Update(); |
87 FWL_Error LockUpdate(); | 88 FWL_Error LockUpdate(); |
88 FWL_Error UnlockUpdate(); | 89 FWL_Error UnlockUpdate(); |
89 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy); | 90 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy); |
90 FWL_Error TransformTo(IFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy); | 91 FWL_Error TransformTo(IFWL_Widget* pWidget, FX_FLOAT& fx, FX_FLOAT& fy); |
91 FWL_Error TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt); | 92 FWL_Error TransformTo(IFWL_Widget* pWidget, CFX_RectF& rt); |
(...skipping 20 matching lines...) Expand all Loading... | |
112 | 113 |
113 protected: | 114 protected: |
114 // Takes ownership of |pImpl|. | 115 // Takes ownership of |pImpl|. |
115 void SetImpl(CFWL_WidgetImp* pImpl) { m_pImpl.reset(pImpl); } | 116 void SetImpl(CFWL_WidgetImp* pImpl) { m_pImpl.reset(pImpl); } |
116 | 117 |
117 private: | 118 private: |
118 std::unique_ptr<CFWL_WidgetImp> m_pImpl; | 119 std::unique_ptr<CFWL_WidgetImp> m_pImpl; |
119 }; | 120 }; |
120 | 121 |
121 #endif // XFA_FWL_CORE_IFWL_WIDGET_H_ | 122 #endif // XFA_FWL_CORE_IFWL_WIDGET_H_ |
OLD | NEW |