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

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

Issue 2467993003: Merge delegates into IFWL_* classes. (Closed)
Patch Set: Add const version Created 4 years, 1 month 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
« no previous file with comments | « xfa/fwl/core/ifwl_edit.cpp ('k') | xfa/fwl/core/ifwl_form.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 }; 69 };
70 70
71 class CFWL_MsgMouse; 71 class CFWL_MsgMouse;
72 class CFWL_MsgClose; 72 class CFWL_MsgClose;
73 class CFWL_MsgWindowMove; 73 class CFWL_MsgWindowMove;
74 class CFWL_NoteLoop; 74 class CFWL_NoteLoop;
75 class CFWL_WidgetImpProperties; 75 class CFWL_WidgetImpProperties;
76 class IFWL_Widget; 76 class IFWL_Widget;
77 class IFWL_ThemeProvider; 77 class IFWL_ThemeProvider;
78 class CFWL_SysBtn; 78 class CFWL_SysBtn;
79 class CFWL_FormImpDelegate;
80 79
81 class IFWL_FormDP : public IFWL_DataProvider { 80 class IFWL_FormDP : public IFWL_DataProvider {
82 public: 81 public:
83 virtual CFX_DIBitmap* GetIcon(IFWL_Widget* pWidget, FX_BOOL bBig) = 0; 82 virtual CFX_DIBitmap* GetIcon(IFWL_Widget* pWidget, FX_BOOL bBig) = 0;
84 }; 83 };
85 84
86 class IFWL_Form : public IFWL_Widget { 85 class IFWL_Form : public IFWL_Widget {
87 public: 86 public:
88 IFWL_Form(const IFWL_App* app, 87 IFWL_Form(const IFWL_App* app,
89 const CFWL_WidgetImpProperties& properties, 88 const CFWL_WidgetImpProperties& properties,
90 IFWL_Widget* pOuter); 89 IFWL_Widget* pOuter);
91 ~IFWL_Form() override; 90 ~IFWL_Form() override;
92 91
93 // IFWL_Widget 92 // IFWL_Widget
94 FWL_Type GetClassID() const override; 93 FWL_Type GetClassID() const override;
95 FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const override; 94 FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const override;
96 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; 95 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override;
97 FWL_Error GetClientRect(CFX_RectF& rect) override; 96 FWL_Error GetClientRect(CFX_RectF& rect) override;
98 FWL_Error Update() override; 97 FWL_Error Update() override;
99 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; 98 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override;
100 FWL_Error DrawWidget(CFX_Graphics* pGraphics, 99 FWL_Error DrawWidget(CFX_Graphics* pGraphics,
101 const CFX_Matrix* pMatrix = nullptr) override; 100 const CFX_Matrix* pMatrix = nullptr) override;
101 void OnProcessMessage(CFWL_Message* pMessage) override;
102 void OnDrawWidget(CFX_Graphics* pGraphics,
103 const CFX_Matrix* pMatrix) override;
102 104
103 FWL_FORMSIZE GetFormSize(); 105 FWL_FORMSIZE GetFormSize();
104 FWL_Error SetFormSize(FWL_FORMSIZE eFormSize); 106 FWL_Error SetFormSize(FWL_FORMSIZE eFormSize);
105 IFWL_Widget* DoModal(); 107 IFWL_Widget* DoModal();
106 IFWL_Widget* DoModal(uint32_t& dwCommandID); 108 IFWL_Widget* DoModal(uint32_t& dwCommandID);
107 FWL_Error EndDoModal(); 109 FWL_Error EndDoModal();
108 FWL_Error SetBorderRegion(CFX_Path* pPath); 110 FWL_Error SetBorderRegion(CFX_Path* pPath);
109 void DrawBackground(CFX_Graphics* pGraphics, IFWL_ThemeProvider* pTheme); 111 void DrawBackground(CFX_Graphics* pGraphics, IFWL_ThemeProvider* pTheme);
110 IFWL_Widget* GetSubFocus(); 112 IFWL_Widget* GetSubFocus();
111 void SetSubFocus(IFWL_Widget* pWidget); 113 void SetSubFocus(IFWL_Widget* pWidget);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 bool m_bMaximized; 177 bool m_bMaximized;
176 FX_BOOL m_bSetMaximize; 178 FX_BOOL m_bSetMaximize;
177 bool m_bCustomizeLayout; 179 bool m_bCustomizeLayout;
178 FWL_FORMSIZE m_eFormSize; 180 FWL_FORMSIZE m_eFormSize;
179 FX_BOOL m_bDoModalFlag; 181 FX_BOOL m_bDoModalFlag;
180 FX_FLOAT m_fSmallIconSz; 182 FX_FLOAT m_fSmallIconSz;
181 FX_FLOAT m_fBigIconSz; 183 FX_FLOAT m_fBigIconSz;
182 CFX_DIBitmap* m_pBigIcon; 184 CFX_DIBitmap* m_pBigIcon;
183 CFX_DIBitmap* m_pSmallIcon; 185 CFX_DIBitmap* m_pSmallIcon;
184 FX_BOOL m_bMouseIn; 186 FX_BOOL m_bMouseIn;
185 };
186 187
187 class CFWL_FormImpDelegate : public CFWL_WidgetImpDelegate { 188 private:
188 public:
189 CFWL_FormImpDelegate(IFWL_Form* pOwner);
190 void OnProcessMessage(CFWL_Message* pMessage) override;
191 void OnProcessEvent(CFWL_Event* pEvent) override;
192 void OnDrawWidget(CFX_Graphics* pGraphics,
193 const CFX_Matrix* pMatrix = nullptr) override;
194
195 protected:
196 void OnLButtonDown(CFWL_MsgMouse* pMsg); 189 void OnLButtonDown(CFWL_MsgMouse* pMsg);
197 void OnLButtonUp(CFWL_MsgMouse* pMsg); 190 void OnLButtonUp(CFWL_MsgMouse* pMsg);
198 void OnMouseMove(CFWL_MsgMouse* pMsg); 191 void OnMouseMove(CFWL_MsgMouse* pMsg);
199 void OnMouseHover(CFWL_MsgMouse* pMsg); 192 void OnMouseHover(CFWL_MsgMouse* pMsg);
200 void OnMouseLeave(CFWL_MsgMouse* pMsg); 193 void OnMouseLeave(CFWL_MsgMouse* pMsg);
201 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); 194 void OnLButtonDblClk(CFWL_MsgMouse* pMsg);
202 void OnWindowMove(CFWL_MsgWindowMove* pMsg); 195 void OnWindowMove(CFWL_MsgWindowMove* pMsg);
203 void OnClose(CFWL_MsgClose* pMsg); 196 void OnClose(CFWL_MsgClose* pMsg);
204 IFWL_Form* m_pOwner;
205 }; 197 };
206 198
207 #endif // XFA_FWL_CORE_IFWL_FORM_H_ 199 #endif // XFA_FWL_CORE_IFWL_FORM_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_edit.cpp ('k') | xfa/fwl/core/ifwl_form.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698