| 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_FORM_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_FORM_H_ |
| 8 #define XFA_FWL_CORE_IFWL_FORM_H_ | 8 #define XFA_FWL_CORE_IFWL_FORM_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "core/fxcrt/fx_system.h" | 12 #include "core/fxcrt/fx_system.h" |
| 13 #include "xfa/fwl/core/cfwl_widgetproperties.h" | 13 #include "xfa/fwl/core/cfwl_widgetproperties.h" |
| 14 #include "xfa/fwl/core/ifwl_dataprovider.h" | |
| 15 #include "xfa/fwl/core/ifwl_widget.h" | 14 #include "xfa/fwl/core/ifwl_widget.h" |
| 16 | 15 |
| 17 #define FWL_CLASS_Form L"FWL_FORM" | 16 #define FWL_CLASS_Form L"FWL_FORM" |
| 18 #define FWL_CLASS_FormProxy L"FWL_FORMPROXY" | 17 #define FWL_CLASS_FormProxy L"FWL_FORMPROXY" |
| 19 #define FWL_STYLEEXT_FRM_Resize (1L << 0) | 18 #define FWL_STYLEEXT_FRM_Resize (1L << 0) |
| 20 #define FWL_STYLEEXT_FRM_NativeBorder (1L << 1) | 19 #define FWL_STYLEEXT_FRM_NativeBorder (1L << 1) |
| 21 #define FWL_STYLEEXT_FRM_RoundCorner (2L << 1) | 20 #define FWL_STYLEEXT_FRM_RoundCorner (2L << 1) |
| 22 #define FWL_STYLEEXT_FRM_RoundCorner4 (3L << 1) | 21 #define FWL_STYLEEXT_FRM_RoundCorner4 (3L << 1) |
| 23 #define FWL_STYLEEXT_FRM_NoDrawClient (1L << 3) | 22 #define FWL_STYLEEXT_FRM_NoDrawClient (1L << 3) |
| 24 #define FWL_STYLEEXT_FRM_BorderCornerMask (3L << 1) | 23 #define FWL_STYLEEXT_FRM_BorderCornerMask (3L << 1) |
| 25 #define FWL_STYLEEXT_FRM_Max (3) | 24 #define FWL_STYLEEXT_FRM_Max (3) |
| 26 | 25 |
| 27 #if (_FX_OS_ == _FX_MACOSX_) | 26 #if (_FX_OS_ == _FX_MACOSX_) |
| 28 #define FWL_UseMacSystemBorder | 27 #define FWL_UseMacSystemBorder |
| 29 #endif | 28 #endif |
| 30 | 29 |
| 31 #define FWL_SYSBUTTONSTATE_Hover 0x0001 | |
| 32 #define FWL_SYSBUTTONSTATE_Pressed 0x0002 | |
| 33 #define FWL_SYSBUTTONSTATE_Disabled 0x0010 | |
| 34 | |
| 35 enum FWL_FORMSIZE { | |
| 36 FWL_FORMSIZE_Manual = 0, | |
| 37 FWL_FORMSIZE_Width, | |
| 38 FWL_FORMSIZE_Height, | |
| 39 FWL_FORMSIZE_All, | |
| 40 }; | |
| 41 | |
| 42 class CFWL_SysBtn { | |
| 43 public: | |
| 44 CFWL_SysBtn(); | |
| 45 | |
| 46 bool IsDisabled() const; | |
| 47 uint32_t GetPartState() const; | |
| 48 | |
| 49 void SetNormal(); | |
| 50 void SetPressed(); | |
| 51 void SetHover(); | |
| 52 void SetDisabled(bool bDisabled); | |
| 53 | |
| 54 CFX_RectF m_rtBtn; | |
| 55 uint32_t m_dwState; | |
| 56 }; | |
| 57 | |
| 58 class CFWL_MsgMouse; | 30 class CFWL_MsgMouse; |
| 59 class CFWL_NoteLoop; | 31 class CFWL_NoteLoop; |
| 60 class IFWL_Widget; | 32 class IFWL_Widget; |
| 61 class IFWL_ThemeProvider; | 33 class IFWL_ThemeProvider; |
| 62 class CFWL_SysBtn; | 34 class CFWL_SysBtn; |
| 63 | 35 |
| 64 class IFWL_FormDP : public IFWL_DataProvider {}; | 36 class IFWL_FormDP : public IFWL_Widget::DataProvider {}; |
| 65 | 37 |
| 66 class IFWL_Form : public IFWL_Widget { | 38 class IFWL_Form : public IFWL_Widget { |
| 67 public: | 39 public: |
| 68 IFWL_Form(const IFWL_App* app, | 40 IFWL_Form(const IFWL_App* app, |
| 69 std::unique_ptr<CFWL_WidgetProperties> properties, | 41 std::unique_ptr<CFWL_WidgetProperties> properties, |
| 70 IFWL_Widget* pOuter); | 42 IFWL_Widget* pOuter); |
| 71 ~IFWL_Form() override; | 43 ~IFWL_Form() override; |
| 72 | 44 |
| 73 // IFWL_Widget | 45 // IFWL_Widget |
| 74 FWL_Type GetClassID() const override; | 46 FWL_Type GetClassID() const override; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 int32_t m_iCaptureBtn; | 95 int32_t m_iCaptureBtn; |
| 124 int32_t m_iSysBox; | 96 int32_t m_iSysBox; |
| 125 bool m_bLButtonDown; | 97 bool m_bLButtonDown; |
| 126 bool m_bMaximized; | 98 bool m_bMaximized; |
| 127 bool m_bSetMaximize; | 99 bool m_bSetMaximize; |
| 128 bool m_bCustomizeLayout; | 100 bool m_bCustomizeLayout; |
| 129 bool m_bDoModalFlag; | 101 bool m_bDoModalFlag; |
| 130 }; | 102 }; |
| 131 | 103 |
| 132 #endif // XFA_FWL_CORE_IFWL_FORM_H_ | 104 #endif // XFA_FWL_CORE_IFWL_FORM_H_ |
| OLD | NEW |