OLD | NEW |
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 #include "xfa/fwl/core/cfwl_widget.h" | 7 #include "xfa/fwl/core/cfwl_widget.h" |
8 | 8 |
9 #include "xfa/fde/tto/fde_textout.h" | 9 #include "xfa/fde/tto/fde_textout.h" |
10 #include "xfa/fwl/core/cfwl_themetext.h" | 10 #include "xfa/fwl/core/cfwl_themetext.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 } | 33 } |
34 | 34 |
35 IFWL_Widget* CFWL_Widget::GetWidget() { | 35 IFWL_Widget* CFWL_Widget::GetWidget() { |
36 return m_pIface.get(); | 36 return m_pIface.get(); |
37 } | 37 } |
38 | 38 |
39 const IFWL_Widget* CFWL_Widget::GetWidget() const { | 39 const IFWL_Widget* CFWL_Widget::GetWidget() const { |
40 return m_pIface.get(); | 40 return m_pIface.get(); |
41 } | 41 } |
42 | 42 |
43 FWL_Error CFWL_Widget::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { | 43 FWL_Error CFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { |
44 if (!m_pIface) | 44 if (!m_pIface) |
45 return FWL_Error::Indefinite; | 45 return FWL_Error::Indefinite; |
46 return m_pIface->GetWidgetRect(rect, bAutoSize); | 46 return m_pIface->GetWidgetRect(rect, bAutoSize); |
47 } | 47 } |
48 | 48 |
49 FWL_Error CFWL_Widget::GetGlobalRect(CFX_RectF& rect) { | 49 FWL_Error CFWL_Widget::GetGlobalRect(CFX_RectF& rect) { |
50 if (!m_pIface) | 50 if (!m_pIface) |
51 return FWL_Error::Indefinite; | 51 return FWL_Error::Indefinite; |
52 return m_pIface->GetGlobalRect(rect); | 52 return m_pIface->GetGlobalRect(rect); |
53 } | 53 } |
(...skipping 25 matching lines...) Expand all Loading... |
79 | 79 |
80 FWL_Error CFWL_Widget::ModifyStylesEx(uint32_t dwStylesExAdded, | 80 FWL_Error CFWL_Widget::ModifyStylesEx(uint32_t dwStylesExAdded, |
81 uint32_t dwStylesExRemoved) { | 81 uint32_t dwStylesExRemoved) { |
82 return m_pIface->ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); | 82 return m_pIface->ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved); |
83 } | 83 } |
84 | 84 |
85 uint32_t CFWL_Widget::GetStates() { | 85 uint32_t CFWL_Widget::GetStates() { |
86 return m_pIface ? m_pIface->GetStates() : 0; | 86 return m_pIface ? m_pIface->GetStates() : 0; |
87 } | 87 } |
88 | 88 |
89 void CFWL_Widget::SetStates(uint32_t dwStates, FX_BOOL bSet) { | 89 void CFWL_Widget::SetStates(uint32_t dwStates, bool bSet) { |
90 if (m_pIface) | 90 if (m_pIface) |
91 m_pIface->SetStates(dwStates, bSet); | 91 m_pIface->SetStates(dwStates, bSet); |
92 } | 92 } |
93 | 93 |
94 void CFWL_Widget::SetLayoutItem(void* pItem) { | 94 void CFWL_Widget::SetLayoutItem(void* pItem) { |
95 if (m_pIface) | 95 if (m_pIface) |
96 m_pIface->SetLayoutItem(pItem); | 96 m_pIface->SetLayoutItem(pItem); |
97 } | 97 } |
98 | 98 |
99 void CFWL_Widget::Update() { | 99 void CFWL_Widget::Update() { |
(...skipping 28 matching lines...) Expand all Loading... |
128 } | 128 } |
129 | 129 |
130 IFWL_WidgetDelegate* CFWL_Widget::GetDelegate() const { | 130 IFWL_WidgetDelegate* CFWL_Widget::GetDelegate() const { |
131 return m_pIface ? m_pIface->GetDelegate() : nullptr; | 131 return m_pIface ? m_pIface->GetDelegate() : nullptr; |
132 } | 132 } |
133 | 133 |
134 void CFWL_Widget::SetDelegate(IFWL_WidgetDelegate* pDelegate) { | 134 void CFWL_Widget::SetDelegate(IFWL_WidgetDelegate* pDelegate) { |
135 if (m_pIface) | 135 if (m_pIface) |
136 m_pIface->SetDelegate(pDelegate); | 136 m_pIface->SetDelegate(pDelegate); |
137 } | 137 } |
OLD | NEW |