Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1018)

Side by Side Diff: xfa/fwl/core/ifwl_form.h

Issue 2506253004: Split fwl/core class pt I. (Closed)
Patch Set: Rebase to master Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 enum FORM_RESIZETYPE { 30 enum FORM_RESIZETYPE {
59 FORM_RESIZETYPE_None = 0, 31 FORM_RESIZETYPE_None = 0,
60 FORM_RESIZETYPE_Cap, 32 FORM_RESIZETYPE_Cap,
61 }; 33 };
62 34
63 struct RestoreInfo { 35 struct RestoreInfo {
64 RestoreInfo(); 36 RestoreInfo();
65 ~RestoreInfo(); 37 ~RestoreInfo();
66 38
67 CFX_PointF m_ptStart; 39 CFX_PointF m_ptStart;
68 CFX_SizeF m_szStart; 40 CFX_SizeF m_szStart;
69 }; 41 };
70 42
71 class CFWL_MsgMouse; 43 class CFWL_MsgMouse;
72 class CFWL_NoteLoop; 44 class CFWL_NoteLoop;
73 class IFWL_Widget; 45 class IFWL_Widget;
74 class IFWL_ThemeProvider; 46 class IFWL_ThemeProvider;
75 class CFWL_SysBtn; 47 class CFWL_SysBtn;
76 48
77 class IFWL_FormDP : public IFWL_DataProvider { 49 class IFWL_FormDP : public IFWL_Widget::DataProvider {
npm 2016/11/21 15:56:18 Ditto... but I imagine you tried already since I s
dsinclair 2016/11/21 16:00:42 Followup. FormDP will actually go away, I'm just
78 public: 50 public:
79 virtual CFX_DIBitmap* GetIcon(IFWL_Widget* pWidget, bool bBig) = 0; 51 virtual CFX_DIBitmap* GetIcon(IFWL_Widget* pWidget, bool bBig) = 0;
80 }; 52 };
81 53
82 class IFWL_Form : public IFWL_Widget { 54 class IFWL_Form : public IFWL_Widget {
83 public: 55 public:
84 IFWL_Form(const IFWL_App* app, 56 IFWL_Form(const IFWL_App* app,
85 std::unique_ptr<CFWL_WidgetProperties> properties, 57 std::unique_ptr<CFWL_WidgetProperties> properties,
86 IFWL_Widget* pOuter); 58 IFWL_Widget* pOuter);
87 ~IFWL_Form() override; 59 ~IFWL_Form() override;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 bool m_bSetMaximize; 132 bool m_bSetMaximize;
161 bool m_bCustomizeLayout; 133 bool m_bCustomizeLayout;
162 bool m_bDoModalFlag; 134 bool m_bDoModalFlag;
163 FX_FLOAT m_fSmallIconSz; 135 FX_FLOAT m_fSmallIconSz;
164 FX_FLOAT m_fBigIconSz; 136 FX_FLOAT m_fBigIconSz;
165 CFX_DIBitmap* m_pBigIcon; 137 CFX_DIBitmap* m_pBigIcon;
166 CFX_DIBitmap* m_pSmallIcon; 138 CFX_DIBitmap* m_pSmallIcon;
167 }; 139 };
168 140
169 #endif // XFA_FWL_CORE_IFWL_FORM_H_ 141 #endif // XFA_FWL_CORE_IFWL_FORM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698