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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 void ShowChildWidget(IFWL_Widget* pParent); | 104 void ShowChildWidget(IFWL_Widget* pParent); |
105 void RemoveSysButtons(); | 105 void RemoveSysButtons(); |
106 void CalcContentRect(CFX_RectF& rtContent); | 106 void CalcContentRect(CFX_RectF& rtContent); |
107 CFWL_SysBtn* GetSysBtnAtPoint(FX_FLOAT fx, FX_FLOAT fy); | 107 CFWL_SysBtn* GetSysBtnAtPoint(FX_FLOAT fx, FX_FLOAT fy); |
108 CFWL_SysBtn* GetSysBtnByState(uint32_t dwState); | 108 CFWL_SysBtn* GetSysBtnByState(uint32_t dwState); |
109 CFWL_SysBtn* GetSysBtnByIndex(int32_t nIndex); | 109 CFWL_SysBtn* GetSysBtnByIndex(int32_t nIndex); |
110 int32_t GetSysBtnIndex(CFWL_SysBtn* pBtn); | 110 int32_t GetSysBtnIndex(CFWL_SysBtn* pBtn); |
111 FX_FLOAT GetCaptionHeight(); | 111 FX_FLOAT GetCaptionHeight(); |
112 void DrawCaptionText(CFX_Graphics* pGs, | 112 void DrawCaptionText(CFX_Graphics* pGs, |
113 IFWL_ThemeProvider* pTheme, | 113 IFWL_ThemeProvider* pTheme, |
114 const CFX_Matrix* pMatrix = NULL); | 114 const CFX_Matrix* pMatrix = nullptr); |
115 void DrawIconImage(CFX_Graphics* pGs, | 115 void DrawIconImage(CFX_Graphics* pGs, |
116 IFWL_ThemeProvider* pTheme, | 116 IFWL_ThemeProvider* pTheme, |
117 const CFX_Matrix* pMatrix = NULL); | 117 const CFX_Matrix* pMatrix = nullptr); |
118 void GetEdgeRect(CFX_RectF& rtEdge); | 118 void GetEdgeRect(CFX_RectF& rtEdge); |
119 void SetWorkAreaRect(); | 119 void SetWorkAreaRect(); |
120 void SetCursor(FX_FLOAT fx, FX_FLOAT fy); | 120 void SetCursor(FX_FLOAT fx, FX_FLOAT fy); |
121 void Layout(); | 121 void Layout(); |
122 void ReSetSysBtn(); | 122 void ReSetSysBtn(); |
123 void RegisterForm(); | 123 void RegisterForm(); |
124 void UnRegisterForm(); | 124 void UnRegisterForm(); |
125 FX_BOOL IsDoModal(); | 125 FX_BOOL IsDoModal(); |
126 void SetThemeData(); | 126 void SetThemeData(); |
127 FX_BOOL HasIcon(); | 127 FX_BOOL HasIcon(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 FX_BOOL m_bMouseIn; | 172 FX_BOOL m_bMouseIn; |
173 friend class CFWL_FormImpDelegate; | 173 friend class CFWL_FormImpDelegate; |
174 }; | 174 }; |
175 | 175 |
176 class CFWL_FormImpDelegate : public CFWL_WidgetImpDelegate { | 176 class CFWL_FormImpDelegate : public CFWL_WidgetImpDelegate { |
177 public: | 177 public: |
178 CFWL_FormImpDelegate(CFWL_FormImp* pOwner); | 178 CFWL_FormImpDelegate(CFWL_FormImp* pOwner); |
179 void OnProcessMessage(CFWL_Message* pMessage) override; | 179 void OnProcessMessage(CFWL_Message* pMessage) override; |
180 void OnProcessEvent(CFWL_Event* pEvent) override; | 180 void OnProcessEvent(CFWL_Event* pEvent) override; |
181 void OnDrawWidget(CFX_Graphics* pGraphics, | 181 void OnDrawWidget(CFX_Graphics* pGraphics, |
182 const CFX_Matrix* pMatrix = NULL) override; | 182 const CFX_Matrix* pMatrix = nullptr) override; |
183 | 183 |
184 protected: | 184 protected: |
185 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 185 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
186 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 186 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
187 void OnMouseMove(CFWL_MsgMouse* pMsg); | 187 void OnMouseMove(CFWL_MsgMouse* pMsg); |
188 void OnMouseHover(CFWL_MsgMouse* pMsg); | 188 void OnMouseHover(CFWL_MsgMouse* pMsg); |
189 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 189 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
190 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); | 190 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); |
191 void OnWindowMove(CFWL_MsgWindowMove* pMsg); | 191 void OnWindowMove(CFWL_MsgWindowMove* pMsg); |
192 void OnClose(CFWL_MsgClose* pMsg); | 192 void OnClose(CFWL_MsgClose* pMsg); |
193 CFWL_FormImp* m_pOwner; | 193 CFWL_FormImp* m_pOwner; |
194 }; | 194 }; |
195 | 195 |
196 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ | 196 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ |
OLD | NEW |