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

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

Issue 2498163002: Cleanup cfwl_* files. (Closed)
Patch Set: Review feedback 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_pushbutton.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 explicit 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 void GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false); 29 void GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false);
30 void SetWidgetRect(const CFX_RectF& rect); 30 void SetWidgetRect(const CFX_RectF& rect);
31 31
32 void ModifyStyles(uint32_t dwStylesAdded, uint32_t dwStylesRemoved); 32 void ModifyStyles(uint32_t dwStylesAdded, uint32_t dwStylesRemoved);
33 uint32_t GetStylesEx(); 33 uint32_t GetStylesEx();
34 void ModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved); 34 void ModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved);
35 35
36 uint32_t GetStates(); 36 uint32_t GetStates();
37 void SetStates(uint32_t dwStates, bool bSet = true); 37 void SetStates(uint32_t dwStates, bool bSet = true);
38
39 void SetLayoutItem(void* pItem); 38 void SetLayoutItem(void* pItem);
40 39
41 void Update(); 40 void Update();
42 void LockUpdate(); 41 void LockUpdate();
43 void UnlockUpdate(); 42 void UnlockUpdate();
44 43
45 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy); 44 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy);
46
47 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix = nullptr); 45 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix = nullptr);
48 46
49 IFWL_WidgetDelegate* GetDelegate() const; 47 IFWL_WidgetDelegate* GetDelegate() const;
50 void SetDelegate(IFWL_WidgetDelegate*); 48 void SetDelegate(IFWL_WidgetDelegate*);
51 49
52 protected: 50 protected:
53 void Initialize(); 51 void Initialize();
54 52
55 const IFWL_App* m_pApp; 53 const IFWL_App* m_pApp;
56 std::unique_ptr<IFWL_Widget> m_pIface; 54 std::unique_ptr<IFWL_Widget> m_pIface;
57 CFWL_WidgetMgr* const m_pWidgetMgr;
58 }; 55 };
59 56
60 #endif // XFA_FWL_CORE_CFWL_WIDGET_H_ 57 #endif // XFA_FWL_CORE_CFWL_WIDGET_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_pushbutton.cpp ('k') | xfa/fwl/core/cfwl_widget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698