Index: xfa/fwl/core/ifwl_listbox.cpp |
diff --git a/xfa/fwl/core/ifwl_listbox.cpp b/xfa/fwl/core/ifwl_listbox.cpp |
index bb6d86d384d770a80670f01cd11de375b5b0e2b6..05cc64bb90ebbfc1a4a48031c3ac8eb5d2d17c03 100644 |
--- a/xfa/fwl/core/ifwl_listbox.cpp |
+++ b/xfa/fwl/core/ifwl_listbox.cpp |
@@ -20,9 +20,10 @@ const int kItemTextMargin = 2; |
} // namespace |
-IFWL_ListBox::IFWL_ListBox(const CFWL_WidgetImpProperties& properties, |
+IFWL_ListBox::IFWL_ListBox(const IFWL_App* app, |
+ const CFWL_WidgetImpProperties& properties, |
IFWL_Widget* pOuter) |
- : IFWL_Widget(properties, pOuter), |
+ : IFWL_Widget(app, properties, pOuter), |
m_dwTTOStyles(0), |
m_iTTOAligns(0), |
m_hAnchor(nullptr), |
@@ -36,16 +37,9 @@ IFWL_ListBox::IFWL_ListBox(const CFWL_WidgetImpProperties& properties, |
IFWL_ListBox::~IFWL_ListBox() {} |
-FWL_Type IFWL_ListBox::GetClassID() const { |
- return FWL_Type::ListBox; |
-} |
- |
-FWL_Error IFWL_ListBox::Initialize() { |
- if (IFWL_Widget::Initialize() != FWL_Error::Succeeded) |
- return FWL_Error::Indefinite; |
- |
+void IFWL_ListBox::Initialize() { |
+ IFWL_Widget::Initialize(); |
m_pDelegate = new CFWL_ListBoxImpDelegate(this); |
- return FWL_Error::Succeeded; |
} |
void IFWL_ListBox::Finalize() { |
@@ -59,6 +53,10 @@ void IFWL_ListBox::Finalize() { |
IFWL_Widget::Finalize(); |
} |
+FWL_Type IFWL_ListBox::GetClassID() const { |
+ return FWL_Type::ListBox; |
+} |
+ |
FWL_Error IFWL_ListBox::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { |
if (bAutoSize) { |
rect.Set(0, 0, 0, 0); |
@@ -898,7 +896,7 @@ void IFWL_ListBox::InitScrollBar(FX_BOOL bVert) { |
prop.m_dwStates = FWL_WGTSTATE_Invisible; |
prop.m_pParent = this; |
prop.m_pThemeProvider = m_pScrollBarTP; |
- IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar(prop, this); |
+ IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar(m_pOwnerApp, prop, this); |
pScrollBar->Initialize(); |
(bVert ? &m_pVertScrollBar : &m_pHorzScrollBar)->reset(pScrollBar); |
} |