diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-11-23 12:20:47 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2016-11-23 17:38:32 +0000 |
commit | 0ced827f257344a1f5804aa96df538f3e783bd10 (patch) | |
tree | 5387c8a2d18be8b86d9b2a72a8f829118f0e42bb /xfa/fwl/core/ifwl_combobox.h | |
parent | 209821f79d0bbeeaeadf4e82ff643ee20d676222 (diff) | |
download | pdfium-0ced827f257344a1f5804aa96df538f3e783bd10.tar.xz |
Remove listbox providers and build into listbox
This CL removes the IFWL_ListBox::DataProvider and builds the data storage
for the list directly into IFWL_ListBox. This removes the need for the provider
in CFWL_ComboBox and CFWL_ListBox.
Change-Id: I74c2286757a0b73083908f1cc630a88e7d730fd9
Reviewed-on: https://pdfium-review.googlesource.com/2050
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fwl/core/ifwl_combobox.h')
-rw-r--r-- | xfa/fwl/core/ifwl_combobox.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xfa/fwl/core/ifwl_combobox.h b/xfa/fwl/core/ifwl_combobox.h index b2fc23de7d..7ad7420c9b 100644 --- a/xfa/fwl/core/ifwl_combobox.h +++ b/xfa/fwl/core/ifwl_combobox.h @@ -49,7 +49,7 @@ class IFWL_Widget; class IFWL_ComboBox : public IFWL_Widget { public: - class DataProvider : public IFWL_ListBox::DataProvider { + class DataProvider : public IFWL_Widget::DataProvider { public: virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget) = 0; }; @@ -74,9 +74,14 @@ class IFWL_ComboBox : public IFWL_Widget { void OnDrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override; + void GetTextByIndex(int32_t iIndex, CFX_WideString& wsText) const; int32_t GetCurSel() const { return m_iCurSel; } void SetCurSel(int32_t iSel); + void AddString(const CFX_WideStringC& wsText); + bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range. + void RemoveAll(); + void SetEditText(const CFX_WideString& wsText); void GetEditText(CFX_WideString& wsText, int32_t nStart = 0, |