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/cfwl_listbox.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/cfwl_listbox.h')
-rw-r--r-- | xfa/fwl/core/cfwl_listbox.h | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/xfa/fwl/core/cfwl_listbox.h b/xfa/fwl/core/cfwl_listbox.h index 504b1d9804..941cbfb408 100644 --- a/xfa/fwl/core/cfwl_listbox.h +++ b/xfa/fwl/core/cfwl_listbox.h @@ -22,52 +22,20 @@ class CFWL_ListBox : public CFWL_Widget, public IFWL_ListBox::DataProvider { void Initialize(); - // IFWL_ListBox::DataProvider: - int32_t CountItems(const IFWL_Widget* pWidget) const override; - CFWL_ListItem* GetItem(const IFWL_Widget* pWidget, - int32_t nIndex) const override; - int32_t GetItemIndex(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; - uint32_t GetItemStyles(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; + CFWL_ListItem* GetItem(const IFWL_Widget* pWidget, int32_t nIndex) const; void GetItemText(IFWL_Widget* pWidget, CFWL_ListItem* pItem, - CFX_WideString& wsText) override; - void GetItemRect(IFWL_Widget* pWidget, - CFWL_ListItem* pItem, - CFX_RectF& rtItem) override; - void* GetItemData(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; - void SetItemStyles(IFWL_Widget* pWidget, - CFWL_ListItem* pItem, - uint32_t dwStyle) override; - void SetItemRect(IFWL_Widget* pWidget, - CFWL_ListItem* pItem, - const CFX_RectF& rtItem) override; - CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget, - CFWL_ListItem* pItem) override; - void GetItemCheckRect(IFWL_Widget* pWidget, - CFWL_ListItem* pItem, - CFX_RectF& rtCheck) override; - void SetItemCheckRect(IFWL_Widget* pWidget, - CFWL_ListItem* pItem, - const CFX_RectF& rtCheck) override; - uint32_t GetItemCheckState(IFWL_Widget* pWidget, - CFWL_ListItem* pItem) override; - void SetItemCheckState(IFWL_Widget* pWidget, - CFWL_ListItem* pItem, - uint32_t dwCheckState) override; + CFX_WideString& wsText); CFWL_ListItem* AddString(const CFX_WideStringC& wsAdd, bool bSelect = false); bool DeleteString(CFWL_ListItem* pItem); void DeleteAll(); - int32_t CountSelItems(); void SetSelItem(CFWL_ListItem* pItem, bool bSelect = true); CFWL_ListItem* GetSelItem(int32_t nIndexSel); int32_t GetSelIndex(int32_t nIndex); uint32_t GetItemStates(CFWL_ListItem* pItem); - - private: - std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray; }; #endif // XFA_FWL_CORE_CFWL_LISTBOX_H_ |