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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 void ShowChildWidget(IFWL_Widget* pParent); | 87 void ShowChildWidget(IFWL_Widget* pParent); |
88 void RemoveSysButtons(); | 88 void RemoveSysButtons(); |
89 void CalcContentRect(CFX_RectF& rtContent); | 89 void CalcContentRect(CFX_RectF& rtContent); |
90 CFWL_SysBtn* GetSysBtnAtPoint(FX_FLOAT fx, FX_FLOAT fy); | 90 CFWL_SysBtn* GetSysBtnAtPoint(FX_FLOAT fx, FX_FLOAT fy); |
91 CFWL_SysBtn* GetSysBtnByState(uint32_t dwState); | 91 CFWL_SysBtn* GetSysBtnByState(uint32_t dwState); |
92 CFWL_SysBtn* GetSysBtnByIndex(int32_t nIndex); | 92 CFWL_SysBtn* GetSysBtnByIndex(int32_t nIndex); |
93 int32_t GetSysBtnIndex(CFWL_SysBtn* pBtn); | 93 int32_t GetSysBtnIndex(CFWL_SysBtn* pBtn); |
94 FX_FLOAT GetCaptionHeight(); | 94 FX_FLOAT GetCaptionHeight(); |
95 void DrawCaptionText(CFX_Graphics* pGs, | 95 void DrawCaptionText(CFX_Graphics* pGs, |
96 IFWL_ThemeProvider* pTheme, | 96 IFWL_ThemeProvider* pTheme, |
97 const CFX_Matrix* pMatrix = NULL); | 97 const CFX_Matrix* pMatrix = nullptr); |
98 void DrawIconImage(CFX_Graphics* pGs, | 98 void DrawIconImage(CFX_Graphics* pGs, |
99 IFWL_ThemeProvider* pTheme, | 99 IFWL_ThemeProvider* pTheme, |
100 const CFX_Matrix* pMatrix = NULL); | 100 const CFX_Matrix* pMatrix = nullptr); |
101 void GetEdgeRect(CFX_RectF& rtEdge); | 101 void GetEdgeRect(CFX_RectF& rtEdge); |
102 void SetWorkAreaRect(); | 102 void SetWorkAreaRect(); |
103 void SetCursor(FX_FLOAT fx, FX_FLOAT fy); | 103 void SetCursor(FX_FLOAT fx, FX_FLOAT fy); |
104 void Layout(); | 104 void Layout(); |
105 void ReSetSysBtn(); | 105 void ReSetSysBtn(); |
106 void RegisterForm(); | 106 void RegisterForm(); |
107 void UnRegisterForm(); | 107 void UnRegisterForm(); |
108 FX_BOOL IsDoModal(); | 108 FX_BOOL IsDoModal(); |
109 void SetThemeData(); | 109 void SetThemeData(); |
110 FX_BOOL HasIcon(); | 110 FX_BOOL HasIcon(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 FX_BOOL m_bMouseIn; | 155 FX_BOOL m_bMouseIn; |
156 friend class CFWL_FormImpDelegate; | 156 friend class CFWL_FormImpDelegate; |
157 }; | 157 }; |
158 | 158 |
159 class CFWL_FormImpDelegate : public CFWL_WidgetImpDelegate { | 159 class CFWL_FormImpDelegate : public CFWL_WidgetImpDelegate { |
160 public: | 160 public: |
161 CFWL_FormImpDelegate(CFWL_FormImp* pOwner); | 161 CFWL_FormImpDelegate(CFWL_FormImp* pOwner); |
162 void OnProcessMessage(CFWL_Message* pMessage) override; | 162 void OnProcessMessage(CFWL_Message* pMessage) override; |
163 void OnProcessEvent(CFWL_Event* pEvent) override; | 163 void OnProcessEvent(CFWL_Event* pEvent) override; |
164 void OnDrawWidget(CFX_Graphics* pGraphics, | 164 void OnDrawWidget(CFX_Graphics* pGraphics, |
165 const CFX_Matrix* pMatrix = NULL) override; | 165 const CFX_Matrix* pMatrix = nullptr) override; |
166 | 166 |
167 protected: | 167 protected: |
168 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 168 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
169 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 169 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
170 void OnMouseMove(CFWL_MsgMouse* pMsg); | 170 void OnMouseMove(CFWL_MsgMouse* pMsg); |
171 void OnMouseHover(CFWL_MsgMouse* pMsg); | 171 void OnMouseHover(CFWL_MsgMouse* pMsg); |
172 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 172 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
173 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); | 173 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); |
174 void OnWindowMove(CFWL_MsgWindowMove* pMsg); | 174 void OnWindowMove(CFWL_MsgWindowMove* pMsg); |
175 void OnClose(CFWL_MsgClose* pMsg); | 175 void OnClose(CFWL_MsgClose* pMsg); |
176 CFWL_FormImp* m_pOwner; | 176 CFWL_FormImp* m_pOwner; |
177 }; | 177 }; |
178 | 178 |
179 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ | 179 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ |
OLD | NEW |