| 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_panelimp.h" | 10 #include "xfa/fwl/core/fwl_panelimp.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 void SetDisabled(FX_BOOL bDisabled) { | 47 void SetDisabled(FX_BOOL bDisabled) { |
| 48 bDisabled ? m_dwState |= FWL_SYSBUTTONSTATE_Disabled | 48 bDisabled ? m_dwState |= FWL_SYSBUTTONSTATE_Disabled |
| 49 : m_dwState &= ~FWL_SYSBUTTONSTATE_Disabled; | 49 : m_dwState &= ~FWL_SYSBUTTONSTATE_Disabled; |
| 50 } | 50 } |
| 51 int32_t GetPartState() { | 51 int32_t GetPartState() { |
| 52 return (IsDisabled() ? FWL_PARTSTATE_FRM_Disabled : (m_dwState + 1)); | 52 return (IsDisabled() ? FWL_PARTSTATE_FRM_Disabled : (m_dwState + 1)); |
| 53 } | 53 } |
| 54 | 54 |
| 55 CFX_RectF m_rtBtn; | 55 CFX_RectF m_rtBtn; |
| 56 FX_DWORD m_dwState; | 56 uint32_t m_dwState; |
| 57 }; | 57 }; |
| 58 enum FORM_RESIZETYPE { | 58 enum FORM_RESIZETYPE { |
| 59 FORM_RESIZETYPE_None = 0, | 59 FORM_RESIZETYPE_None = 0, |
| 60 FORM_RESIZETYPE_Cap, | 60 FORM_RESIZETYPE_Cap, |
| 61 FORM_RESIZETYPE_Left, | 61 FORM_RESIZETYPE_Left, |
| 62 FORM_RESIZETYPE_Top, | 62 FORM_RESIZETYPE_Top, |
| 63 FORM_RESIZETYPE_Right, | 63 FORM_RESIZETYPE_Right, |
| 64 FORM_RESIZETYPE_Bottom, | 64 FORM_RESIZETYPE_Bottom, |
| 65 FORM_RESIZETYPE_LeftTop, | 65 FORM_RESIZETYPE_LeftTop, |
| 66 FORM_RESIZETYPE_LeftBottom, | 66 FORM_RESIZETYPE_LeftBottom, |
| 67 FORM_RESIZETYPE_RightTop, | 67 FORM_RESIZETYPE_RightTop, |
| 68 FORM_RESIZETYPE_RightBottom | 68 FORM_RESIZETYPE_RightBottom |
| 69 }; | 69 }; |
| 70 typedef struct RestoreResizeInfo { | 70 typedef struct RestoreResizeInfo { |
| 71 CFX_PointF m_ptStart; | 71 CFX_PointF m_ptStart; |
| 72 CFX_SizeF m_szStart; | 72 CFX_SizeF m_szStart; |
| 73 } RestoreInfo; | 73 } RestoreInfo; |
| 74 class CFWL_FormImp : public CFWL_PanelImp { | 74 class CFWL_FormImp : public CFWL_PanelImp { |
| 75 public: | 75 public: |
| 76 CFWL_FormImp(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter); | 76 CFWL_FormImp(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter); |
| 77 virtual ~CFWL_FormImp(); | 77 virtual ~CFWL_FormImp(); |
| 78 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; | 78 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; |
| 79 virtual FX_DWORD GetClassID() const; | 79 virtual uint32_t GetClassID() const; |
| 80 virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const; | 80 virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const; |
| 81 virtual FWL_ERR Initialize(); | 81 virtual FWL_ERR Initialize(); |
| 82 virtual FWL_ERR Finalize(); | 82 virtual FWL_ERR Finalize(); |
| 83 | 83 |
| 84 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); | 84 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); |
| 85 virtual FWL_ERR GetClientRect(CFX_RectF& rect); | 85 virtual FWL_ERR GetClientRect(CFX_RectF& rect); |
| 86 virtual FWL_ERR Update(); | 86 virtual FWL_ERR Update(); |
| 87 virtual FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy); | 87 virtual uint32_t HitTest(FX_FLOAT fx, FX_FLOAT fy); |
| 88 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, | 88 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, |
| 89 const CFX_Matrix* pMatrix = NULL); | 89 const CFX_Matrix* pMatrix = NULL); |
| 90 virtual FWL_FORMSIZE GetFormSize(); | 90 virtual FWL_FORMSIZE GetFormSize(); |
| 91 virtual FWL_ERR SetFormSize(FWL_FORMSIZE eFormSize); | 91 virtual FWL_ERR SetFormSize(FWL_FORMSIZE eFormSize); |
| 92 virtual IFWL_Widget* DoModal(); | 92 virtual IFWL_Widget* DoModal(); |
| 93 virtual IFWL_Widget* DoModal(FX_DWORD& dwCommandID); | 93 virtual IFWL_Widget* DoModal(uint32_t& dwCommandID); |
| 94 virtual FWL_ERR EndDoModal(); | 94 virtual FWL_ERR EndDoModal(); |
| 95 virtual FWL_ERR SetBorderRegion(CFX_Path* pPath); | 95 virtual FWL_ERR SetBorderRegion(CFX_Path* pPath); |
| 96 virtual void DrawBackground(CFX_Graphics* pGraphics, | 96 virtual void DrawBackground(CFX_Graphics* pGraphics, |
| 97 IFWL_ThemeProvider* pTheme); | 97 IFWL_ThemeProvider* pTheme); |
| 98 CFWL_WidgetImp* GetSubFocus(); | 98 CFWL_WidgetImp* GetSubFocus(); |
| 99 void SetSubFocus(CFWL_WidgetImp* pWidget); | 99 void SetSubFocus(CFWL_WidgetImp* pWidget); |
| 100 CFX_MapAccelerators& GetAccelerator(); | 100 CFX_MapAccelerators& GetAccelerator(); |
| 101 void SetAccelerator(CFX_MapAccelerators* pAccelerators); | 101 void SetAccelerator(CFX_MapAccelerators* pAccelerators); |
| 102 | 102 |
| 103 protected: | 103 protected: |
| 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(FX_DWORD 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 = NULL); |
| 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 = NULL); |
| 118 void GetEdgeRect(CFX_RectF& rtEdge); | 118 void GetEdgeRect(CFX_RectF& rtEdge); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 void OnMouseMove(CFWL_MsgMouse* pMsg); | 186 void OnMouseMove(CFWL_MsgMouse* pMsg); |
| 187 void OnMouseHover(CFWL_MsgMouse* pMsg); | 187 void OnMouseHover(CFWL_MsgMouse* pMsg); |
| 188 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 188 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
| 189 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); | 189 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); |
| 190 void OnWindowMove(CFWL_MsgWindowMove* pMsg); | 190 void OnWindowMove(CFWL_MsgWindowMove* pMsg); |
| 191 void OnClose(CFWL_MsgClose* pMsg); | 191 void OnClose(CFWL_MsgClose* pMsg); |
| 192 CFWL_FormImp* m_pOwner; | 192 CFWL_FormImp* m_pOwner; |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ | 195 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ |
| OLD | NEW |