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_app.h" |
10 #include "xfa/fwl/core/cfwl_notedriver.h" | 11 #include "xfa/fwl/core/cfwl_notedriver.h" |
11 #include "xfa/fwl/core/cfwl_themetext.h" | 12 #include "xfa/fwl/core/cfwl_themetext.h" |
12 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 13 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
13 #include "xfa/fwl/core/ifwl_app.h" | |
14 #include "xfa/fwl/core/ifwl_themeprovider.h" | 14 #include "xfa/fwl/core/ifwl_themeprovider.h" |
15 | 15 |
16 #define FWL_WGT_CalcHeight 2048 | 16 #define FWL_WGT_CalcHeight 2048 |
17 #define FWL_WGT_CalcWidth 2048 | 17 #define FWL_WGT_CalcWidth 2048 |
18 #define FWL_WGT_CalcMultiLineDefWidth 120.0f | 18 #define FWL_WGT_CalcMultiLineDefWidth 120.0f |
19 | 19 |
20 CFWL_Widget::CFWL_Widget(const IFWL_App* app) : m_pApp(app) {} | 20 CFWL_Widget::CFWL_Widget(const CFWL_App* app) : m_pApp(app) {} |
21 | 21 |
22 CFWL_Widget::~CFWL_Widget() {} | 22 CFWL_Widget::~CFWL_Widget() {} |
23 | 23 |
24 void CFWL_Widget::Initialize() { | 24 void CFWL_Widget::Initialize() { |
25 ASSERT(m_pIface); | 25 ASSERT(m_pIface); |
26 m_pIface->SetAssociateWidget(this); | 26 m_pIface->SetAssociateWidget(this); |
27 } | 27 } |
28 | 28 |
29 void CFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { | 29 void CFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { |
30 if (m_pIface) | 30 if (m_pIface) |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 93 } |
94 | 94 |
95 IFWL_WidgetDelegate* CFWL_Widget::GetDelegate() const { | 95 IFWL_WidgetDelegate* CFWL_Widget::GetDelegate() const { |
96 return m_pIface ? m_pIface->GetDelegate() : nullptr; | 96 return m_pIface ? m_pIface->GetDelegate() : nullptr; |
97 } | 97 } |
98 | 98 |
99 void CFWL_Widget::SetDelegate(IFWL_WidgetDelegate* pDelegate) { | 99 void CFWL_Widget::SetDelegate(IFWL_WidgetDelegate* pDelegate) { |
100 if (m_pIface) | 100 if (m_pIface) |
101 m_pIface->SetDelegate(pDelegate); | 101 m_pIface->SetDelegate(pDelegate); |
102 } | 102 } |
OLD | NEW |