diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-31 07:29:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-31 07:29:34 -0700 |
commit | 20855384b8149a631c3c1d229551523c12eb767b (patch) | |
tree | e3cef278e322742bea6c4b48f40ed580754ebd80 /xfa/fwl/core/ifwl_listbox.cpp | |
parent | 747dcf775c5cb661e96a639f73322cc489d8590f (diff) | |
download | pdfium-20855384b8149a631c3c1d229551523c12eb767b.tar.xz |
Remove FWL globals.
This CL removes the FWL_GetApp, FWL_SetApp and FWL_GetWidgetAdapter methods.
In the process it changes the various Initialize methods to return void.
Review-Url: https://codereview.chromium.org/2436103002
Diffstat (limited to 'xfa/fwl/core/ifwl_listbox.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_listbox.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/xfa/fwl/core/ifwl_listbox.cpp b/xfa/fwl/core/ifwl_listbox.cpp index bb6d86d384..05cc64bb90 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); } |