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_FWL_FORMIMP_H_ | 7 #ifndef XFA_FWL_CORE_FWL_FORMIMP_H_ |
8 #define XFA_FWL_CORE_FWL_FORMIMP_H_ | 8 #define XFA_FWL_CORE_FWL_FORMIMP_H_ |
9 | 9 |
10 #include "xfa/fwl/core/fwl_widgetimp.h" | 10 #include "xfa/fwl/core/fwl_widgetimp.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 }; | 61 }; |
62 | 62 |
63 typedef struct RestoreResizeInfo { | 63 typedef struct RestoreResizeInfo { |
64 CFX_PointF m_ptStart; | 64 CFX_PointF m_ptStart; |
65 CFX_SizeF m_szStart; | 65 CFX_SizeF m_szStart; |
66 } RestoreInfo; | 66 } RestoreInfo; |
67 | 67 |
68 class CFWL_FormImp : public CFWL_WidgetImp { | 68 class CFWL_FormImp : public CFWL_WidgetImp { |
69 public: | 69 public: |
70 CFWL_FormImp(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter); | 70 CFWL_FormImp(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter); |
71 virtual ~CFWL_FormImp(); | 71 ~CFWL_FormImp() override; |
72 virtual FWL_Error GetClassName(CFX_WideString& wsClass) const; | |
73 virtual uint32_t GetClassID() const; | |
74 virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const; | |
75 virtual FWL_Error Initialize(); | |
76 virtual FWL_Error Finalize(); | |
77 | 72 |
78 virtual FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); | 73 // CFWL_WidgetImp |
79 virtual FWL_Error GetClientRect(CFX_RectF& rect); | 74 FWL_Error GetClassName(CFX_WideString& wsClass) const override; |
80 virtual FWL_Error Update(); | 75 FWL_Type GetClassID() const override; |
81 virtual FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy); | 76 FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const override; |
82 virtual FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 77 FWL_Error Initialize() override; |
83 const CFX_Matrix* pMatrix = NULL); | 78 FWL_Error Finalize() override; |
84 virtual FWL_FORMSIZE GetFormSize(); | 79 |
85 virtual FWL_Error SetFormSize(FWL_FORMSIZE eFormSize); | 80 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; |
86 virtual IFWL_Widget* DoModal(); | 81 FWL_Error GetClientRect(CFX_RectF& rect) override; |
87 virtual IFWL_Widget* DoModal(uint32_t& dwCommandID); | 82 FWL_Error Update() override; |
88 virtual FWL_Error EndDoModal(); | 83 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; |
89 virtual FWL_Error SetBorderRegion(CFX_Path* pPath); | 84 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
90 virtual void DrawBackground(CFX_Graphics* pGraphics, | 85 const CFX_Matrix* pMatrix = nullptr) override; |
91 IFWL_ThemeProvider* pTheme); | 86 |
| 87 FWL_FORMSIZE GetFormSize(); |
| 88 FWL_Error SetFormSize(FWL_FORMSIZE eFormSize); |
| 89 IFWL_Widget* DoModal(); |
| 90 IFWL_Widget* DoModal(uint32_t& dwCommandID); |
| 91 FWL_Error EndDoModal(); |
| 92 FWL_Error SetBorderRegion(CFX_Path* pPath); |
| 93 void DrawBackground(CFX_Graphics* pGraphics, IFWL_ThemeProvider* pTheme); |
92 CFWL_WidgetImp* GetSubFocus(); | 94 CFWL_WidgetImp* GetSubFocus(); |
93 void SetSubFocus(CFWL_WidgetImp* pWidget); | 95 void SetSubFocus(CFWL_WidgetImp* pWidget); |
94 | 96 |
95 protected: | 97 protected: |
96 void ShowChildWidget(IFWL_Widget* pParent); | 98 void ShowChildWidget(IFWL_Widget* pParent); |
97 void RemoveSysButtons(); | 99 void RemoveSysButtons(); |
98 void CalcContentRect(CFX_RectF& rtContent); | 100 void CalcContentRect(CFX_RectF& rtContent); |
99 CFWL_SysBtn* GetSysBtnAtPoint(FX_FLOAT fx, FX_FLOAT fy); | 101 CFWL_SysBtn* GetSysBtnAtPoint(FX_FLOAT fx, FX_FLOAT fy); |
100 CFWL_SysBtn* GetSysBtnByState(uint32_t dwState); | 102 CFWL_SysBtn* GetSysBtnByState(uint32_t dwState); |
101 CFWL_SysBtn* GetSysBtnByIndex(int32_t nIndex); | 103 CFWL_SysBtn* GetSysBtnByIndex(int32_t nIndex); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 void OnMouseMove(CFWL_MsgMouse* pMsg); | 181 void OnMouseMove(CFWL_MsgMouse* pMsg); |
180 void OnMouseHover(CFWL_MsgMouse* pMsg); | 182 void OnMouseHover(CFWL_MsgMouse* pMsg); |
181 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 183 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
182 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); | 184 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); |
183 void OnWindowMove(CFWL_MsgWindowMove* pMsg); | 185 void OnWindowMove(CFWL_MsgWindowMove* pMsg); |
184 void OnClose(CFWL_MsgClose* pMsg); | 186 void OnClose(CFWL_MsgClose* pMsg); |
185 CFWL_FormImp* m_pOwner; | 187 CFWL_FormImp* m_pOwner; |
186 }; | 188 }; |
187 | 189 |
188 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ | 190 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ |
OLD | NEW |