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

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

Issue 2467203003: Remove FX_BOOL from xfa. (Closed)
Patch Set: 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_widget.cpp ('k') | xfa/fwl/core/cfwl_widgetmgr.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_WIDGETMGR_H_ 7 #ifndef XFA_FWL_CORE_CFWL_WIDGETMGR_H_
8 #define XFA_FWL_CORE_CFWL_WIDGETMGR_H_ 8 #define XFA_FWL_CORE_CFWL_WIDGETMGR_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 22 matching lines...) Expand all
33 33
34 CFWL_WidgetMgrItem* pParent; 34 CFWL_WidgetMgrItem* pParent;
35 CFWL_WidgetMgrItem* pOwner; 35 CFWL_WidgetMgrItem* pOwner;
36 CFWL_WidgetMgrItem* pChild; 36 CFWL_WidgetMgrItem* pChild;
37 CFWL_WidgetMgrItem* pPrevious; 37 CFWL_WidgetMgrItem* pPrevious;
38 CFWL_WidgetMgrItem* pNext; 38 CFWL_WidgetMgrItem* pNext;
39 IFWL_Widget* const pWidget; 39 IFWL_Widget* const pWidget;
40 std::unique_ptr<CFX_Graphics> pOffscreen; 40 std::unique_ptr<CFX_Graphics> pOffscreen;
41 int32_t iRedrawCounter; 41 int32_t iRedrawCounter;
42 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) 42 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_)
43 FX_BOOL bOutsideChanged; 43 bool bOutsideChanged;
44 #endif 44 #endif
45 }; 45 };
46 46
47 class CFWL_WidgetMgr { 47 class CFWL_WidgetMgr {
48 public: 48 public:
49 explicit CFWL_WidgetMgr(CXFA_FFApp* pAdapterNative); 49 explicit CFWL_WidgetMgr(CXFA_FFApp* pAdapterNative);
50 ~CFWL_WidgetMgr(); 50 ~CFWL_WidgetMgr();
51 51
52 IFWL_Widget* GetParentWidget(IFWL_Widget* pWidget) const; 52 IFWL_Widget* GetParentWidget(IFWL_Widget* pWidget) const;
53 IFWL_Widget* GetOwnerWidget(IFWL_Widget* pWidget) const; 53 IFWL_Widget* GetOwnerWidget(IFWL_Widget* pWidget) const;
54 IFWL_Widget* GetFirstSiblingWidget(IFWL_Widget* pWidget) const; 54 IFWL_Widget* GetFirstSiblingWidget(IFWL_Widget* pWidget) const;
55 IFWL_Widget* GetPriorSiblingWidget(IFWL_Widget* pWidget) const; 55 IFWL_Widget* GetPriorSiblingWidget(IFWL_Widget* pWidget) const;
56 IFWL_Widget* GetNextSiblingWidget(IFWL_Widget* pWidget) const; 56 IFWL_Widget* GetNextSiblingWidget(IFWL_Widget* pWidget) const;
57 IFWL_Widget* GetLastSiblingWidget(IFWL_Widget* pWidget) const; 57 IFWL_Widget* GetLastSiblingWidget(IFWL_Widget* pWidget) const;
58 IFWL_Widget* GetFirstChildWidget(IFWL_Widget* pWidget) const; 58 IFWL_Widget* GetFirstChildWidget(IFWL_Widget* pWidget) const;
59 IFWL_Widget* GetLastChildWidget(IFWL_Widget* pWidget) const; 59 IFWL_Widget* GetLastChildWidget(IFWL_Widget* pWidget) const;
60 IFWL_Widget* GetSystemFormWidget(IFWL_Widget* pWidget) const; 60 IFWL_Widget* GetSystemFormWidget(IFWL_Widget* pWidget) const;
61 61
62 FX_BOOL SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex); 62 bool SetWidgetIndex(IFWL_Widget* pWidget, int32_t nIndex);
63 FWL_Error RepaintWidget(IFWL_Widget* pWidget, 63 FWL_Error RepaintWidget(IFWL_Widget* pWidget,
64 const CFX_RectF* pRect = nullptr); 64 const CFX_RectF* pRect = nullptr);
65 65
66 void AddWidget(IFWL_Widget* pWidget); 66 void AddWidget(IFWL_Widget* pWidget);
67 void InsertWidget(IFWL_Widget* pParent, 67 void InsertWidget(IFWL_Widget* pParent,
68 IFWL_Widget* pChild, 68 IFWL_Widget* pChild,
69 int32_t nIndex = -1); 69 int32_t nIndex = -1);
70 void RemoveWidget(IFWL_Widget* pWidget); 70 void RemoveWidget(IFWL_Widget* pWidget);
71 void SetOwner(IFWL_Widget* pOwner, IFWL_Widget* pOwned); 71 void SetOwner(IFWL_Widget* pOwner, IFWL_Widget* pOwned);
72 void SetParent(IFWL_Widget* pParent, IFWL_Widget* pChild); 72 void SetParent(IFWL_Widget* pParent, IFWL_Widget* pChild);
73 FX_BOOL IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent); 73 bool IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent);
74 FWL_Error SetWidgetRect_Native(IFWL_Widget* pWidget, const CFX_RectF& rect); 74 FWL_Error SetWidgetRect_Native(IFWL_Widget* pWidget, const CFX_RectF& rect);
75 IFWL_Widget* GetWidgetAtPoint(IFWL_Widget* pParent, FX_FLOAT fx, FX_FLOAT fy); 75 IFWL_Widget* GetWidgetAtPoint(IFWL_Widget* pParent, FX_FLOAT fx, FX_FLOAT fy);
76 void NotifySizeChanged(IFWL_Widget* pForm, FX_FLOAT fx, FX_FLOAT fy); 76 void NotifySizeChanged(IFWL_Widget* pForm, FX_FLOAT fx, FX_FLOAT fy);
77 IFWL_Widget* nextTab(IFWL_Widget* parent, IFWL_Widget* focus, FX_BOOL& bFind); 77 IFWL_Widget* nextTab(IFWL_Widget* parent, IFWL_Widget* focus, bool& bFind);
78 int32_t CountRadioButtonGroup(IFWL_Widget* pFirst); 78 int32_t CountRadioButtonGroup(IFWL_Widget* pFirst);
79 IFWL_Widget* GetSiblingRadioButton(IFWL_Widget* pWidget, FX_BOOL bNext); 79 IFWL_Widget* GetSiblingRadioButton(IFWL_Widget* pWidget, bool bNext);
80 IFWL_Widget* GetRadioButtonGroupHeader(IFWL_Widget* pRadioButton); 80 IFWL_Widget* GetRadioButtonGroupHeader(IFWL_Widget* pRadioButton);
81 void GetSameGroupRadioButton(IFWL_Widget* pRadioButton, 81 void GetSameGroupRadioButton(IFWL_Widget* pRadioButton,
82 CFX_ArrayTemplate<IFWL_Widget*>& group); 82 CFX_ArrayTemplate<IFWL_Widget*>& group);
83 IFWL_Widget* GetDefaultButton(IFWL_Widget* pParent); 83 IFWL_Widget* GetDefaultButton(IFWL_Widget* pParent);
84 void AddRedrawCounts(IFWL_Widget* pWidget); 84 void AddRedrawCounts(IFWL_Widget* pWidget);
85 void ResetRedrawCounts(IFWL_Widget* pWidget); 85 void ResetRedrawCounts(IFWL_Widget* pWidget);
86 CXFA_FWLAdapterWidgetMgr* GetAdapterWidgetMgr() const { return m_pAdapter; } 86 CXFA_FWLAdapterWidgetMgr* GetAdapterWidgetMgr() const { return m_pAdapter; }
87 CFWL_WidgetMgrDelegate* GetDelegate() const { return m_pDelegate.get(); } 87 CFWL_WidgetMgrDelegate* GetDelegate() const { return m_pDelegate.get(); }
88 CFWL_WidgetMgrItem* GetWidgetMgrItem(IFWL_Widget* pWidget) const; 88 CFWL_WidgetMgrItem* GetWidgetMgrItem(IFWL_Widget* pWidget) const;
89 bool IsThreadEnabled(); 89 bool IsThreadEnabled();
90 bool IsFormDisabled(); 90 bool IsFormDisabled();
91 FX_BOOL GetAdapterPopupPos(IFWL_Widget* pWidget, 91 bool GetAdapterPopupPos(IFWL_Widget* pWidget,
92 FX_FLOAT fMinHeight, 92 FX_FLOAT fMinHeight,
93 FX_FLOAT fMaxHeight, 93 FX_FLOAT fMaxHeight,
94 const CFX_RectF& rtAnchor, 94 const CFX_RectF& rtAnchor,
95 CFX_RectF& rtPopup); 95 CFX_RectF& rtPopup);
96 96
97 protected: 97 protected:
98 friend class CFWL_WidgetMgrDelegate; 98 friend class CFWL_WidgetMgrDelegate;
99 99
100 int32_t TravelWidgetMgr(CFWL_WidgetMgrItem* pParent, 100 int32_t TravelWidgetMgr(CFWL_WidgetMgrItem* pParent,
101 int32_t* pIndex, 101 int32_t* pIndex,
102 CFWL_WidgetMgrItem* pItem, 102 CFWL_WidgetMgrItem* pItem,
103 IFWL_Widget** pWidget = nullptr); 103 IFWL_Widget** pWidget = nullptr);
104 FX_BOOL IsAbleNative(IFWL_Widget* pWidget) const; 104 bool IsAbleNative(IFWL_Widget* pWidget) const;
105 105
106 uint32_t m_dwCapability; 106 uint32_t m_dwCapability;
107 std::unique_ptr<CFWL_WidgetMgrDelegate> m_pDelegate; 107 std::unique_ptr<CFWL_WidgetMgrDelegate> m_pDelegate;
108 std::map<IFWL_Widget*, std::unique_ptr<CFWL_WidgetMgrItem>> m_mapWidgetItem; 108 std::map<IFWL_Widget*, std::unique_ptr<CFWL_WidgetMgrItem>> m_mapWidgetItem;
109 CXFA_FWLAdapterWidgetMgr* const m_pAdapter; 109 CXFA_FWLAdapterWidgetMgr* const m_pAdapter;
110 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) 110 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_)
111 CFX_RectF m_rtScreen; 111 CFX_RectF m_rtScreen;
112 #endif 112 #endif
113 }; 113 };
114 114
(...skipping 13 matching lines...) Expand all
128 const CFX_RectF& rtClip, 128 const CFX_RectF& rtClip,
129 CFX_Graphics* pGraphics, 129 CFX_Graphics* pGraphics,
130 const CFX_Matrix* pMatrix); 130 const CFX_Matrix* pMatrix);
131 CFX_Graphics* DrawWidgetBefore(IFWL_Widget* pWidget, 131 CFX_Graphics* DrawWidgetBefore(IFWL_Widget* pWidget,
132 CFX_Graphics* pGraphics, 132 CFX_Graphics* pGraphics,
133 const CFX_Matrix* pMatrix); 133 const CFX_Matrix* pMatrix);
134 void DrawWidgetAfter(IFWL_Widget* pWidget, 134 void DrawWidgetAfter(IFWL_Widget* pWidget,
135 CFX_Graphics* pGraphics, 135 CFX_Graphics* pGraphics,
136 CFX_RectF& rtClip, 136 CFX_RectF& rtClip,
137 const CFX_Matrix* pMatrix); 137 const CFX_Matrix* pMatrix);
138 FX_BOOL IsNeedRepaint(IFWL_Widget* pWidget, 138 bool IsNeedRepaint(IFWL_Widget* pWidget,
139 CFX_Matrix* pMatrix, 139 CFX_Matrix* pMatrix,
140 const CFX_RectF& rtDirty); 140 const CFX_RectF& rtDirty);
141 FX_BOOL bUseOffscreenDirect(IFWL_Widget* pWidget); 141 bool bUseOffscreenDirect(IFWL_Widget* pWidget);
142 142
143 CFWL_WidgetMgr* m_pWidgetMgr; 143 CFWL_WidgetMgr* m_pWidgetMgr;
144 }; 144 };
145 145
146 #endif // XFA_FWL_CORE_CFWL_WIDGETMGR_H_ 146 #endif // XFA_FWL_CORE_CFWL_WIDGETMGR_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_widget.cpp ('k') | xfa/fwl/core/cfwl_widgetmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698