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

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

Issue 2488953003: Cleanup IFWL_Widget visibility and virtual parameters (Closed)
Patch Set: fixes 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/cfwl_datetimepicker.cpp ('k') | xfa/fwl/core/cfwl_widget.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_CFWL_WIDGET_H_ 7 #ifndef XFA_FWL_CORE_CFWL_WIDGET_H_
8 #define XFA_FWL_CORE_CFWL_WIDGET_H_ 8 #define XFA_FWL_CORE_CFWL_WIDGET_H_
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "xfa/fwl/core/cfwl_event.h" 12 #include "xfa/fwl/core/cfwl_event.h"
13 #include "xfa/fwl/core/ifwl_widget.h" 13 #include "xfa/fwl/core/ifwl_widget.h"
14 14
15 class CFWL_Event; 15 class CFWL_Event;
16 class CFWL_Message; 16 class CFWL_Message;
17 class CFWL_Widget; 17 class CFWL_Widget;
18 class CFWL_WidgetDelegate; 18 class CFWL_WidgetDelegate;
19 class CFWL_WidgetMgr; 19 class CFWL_WidgetMgr;
20 20
21 class CFWL_Widget { 21 class CFWL_Widget {
22 public: 22 public:
23 CFWL_Widget(const IFWL_App*); 23 CFWL_Widget(const IFWL_App*);
24 virtual ~CFWL_Widget(); 24 virtual ~CFWL_Widget();
25 25
26 IFWL_Widget* GetWidget(); 26 IFWL_Widget* GetWidget();
27 const IFWL_Widget* GetWidget() const; 27 const IFWL_Widget* GetWidget() const;
28 28
29 FWL_Error GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false); 29 void GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false);
30 FWL_Error SetWidgetRect(const CFX_RectF& rect); 30 void SetWidgetRect(const CFX_RectF& rect);
31 FWL_Error GetGlobalRect(CFX_RectF& rect); 31 void GetGlobalRect(CFX_RectF& rect);
32 FWL_Error GetClientRect(CFX_RectF& rtClient); 32 void GetClientRect(CFX_RectF& rtClient);
33 33
34 FWL_Error ModifyStyles(uint32_t dwStylesAdded, uint32_t dwStylesRemoved); 34 void ModifyStyles(uint32_t dwStylesAdded, uint32_t dwStylesRemoved);
35 uint32_t GetStylesEx(); 35 uint32_t GetStylesEx();
36 FWL_Error ModifyStylesEx(uint32_t dwStylesExAdded, 36 void ModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved);
37 uint32_t dwStylesExRemoved);
38 37
39 uint32_t GetStates(); 38 uint32_t GetStates();
40 void SetStates(uint32_t dwStates, bool bSet = true); 39 void SetStates(uint32_t dwStates, bool bSet = true);
41 40
42 void SetLayoutItem(void* pItem); 41 void SetLayoutItem(void* pItem);
43 42
44 void Update(); 43 void Update();
45 void LockUpdate(); 44 void LockUpdate();
46 void UnlockUpdate(); 45 void UnlockUpdate();
47 46
48 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy); 47 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy);
49 48
50 FWL_Error DrawWidget(CFX_Graphics* pGraphics, 49 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix = nullptr);
51 const CFX_Matrix* pMatrix = nullptr);
52 50
53 IFWL_WidgetDelegate* GetDelegate() const; 51 IFWL_WidgetDelegate* GetDelegate() const;
54 void SetDelegate(IFWL_WidgetDelegate*); 52 void SetDelegate(IFWL_WidgetDelegate*);
55 53
56 protected: 54 protected:
57 void Initialize(); 55 void Initialize();
58 56
59 const IFWL_App* m_pApp; 57 const IFWL_App* m_pApp;
60 std::unique_ptr<IFWL_Widget> m_pIface; 58 std::unique_ptr<IFWL_Widget> m_pIface;
61 CFWL_WidgetMgr* const m_pWidgetMgr; 59 CFWL_WidgetMgr* const m_pWidgetMgr;
62 }; 60 };
63 61
64 #endif // XFA_FWL_CORE_CFWL_WIDGET_H_ 62 #endif // XFA_FWL_CORE_CFWL_WIDGET_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_datetimepicker.cpp ('k') | xfa/fwl/core/cfwl_widget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698