Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(804)

Side by Side Diff: xfa/fwl/core/cfwl_listbox.h

Issue 2492563002: Continue IFWL cleanup (Closed)
Patch Set: Rebase to master Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/cfwl_combobox.cpp ('k') | xfa/fwl/core/cfwl_listbox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef XFA_FWL_CORE_CFWL_LISTBOX_H_ 7 #ifndef XFA_FWL_CORE_CFWL_LISTBOX_H_
8 #define XFA_FWL_CORE_CFWL_LISTBOX_H_ 8 #define XFA_FWL_CORE_CFWL_LISTBOX_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 11 matching lines...) Expand all
22 22
23 void Initialize(); 23 void Initialize();
24 24
25 FWL_Error AddDIBitmap(CFX_DIBitmap* pDIB, CFWL_ListItem* pItem); 25 FWL_Error AddDIBitmap(CFX_DIBitmap* pDIB, CFWL_ListItem* pItem);
26 CFWL_ListItem* AddString(const CFX_WideStringC& wsAdd, bool bSelect = false); 26 CFWL_ListItem* AddString(const CFX_WideStringC& wsAdd, bool bSelect = false);
27 bool DeleteString(CFWL_ListItem* pItem); 27 bool DeleteString(CFWL_ListItem* pItem);
28 void DeleteAll(); 28 void DeleteAll();
29 int32_t CountSelItems(); 29 int32_t CountSelItems();
30 CFWL_ListItem* GetSelItem(int32_t nIndexSel); 30 CFWL_ListItem* GetSelItem(int32_t nIndexSel);
31 int32_t GetSelIndex(int32_t nIndex); 31 int32_t GetSelIndex(int32_t nIndex);
32 FWL_Error SetSelItem(CFWL_ListItem* pItem, bool bSelect = true); 32 void SetSelItem(CFWL_ListItem* pItem, bool bSelect = true);
33 FWL_Error GetItemText(CFWL_ListItem* pItem, CFX_WideString& wsText); 33 void GetItemText(CFWL_ListItem* pItem, CFX_WideString& wsText);
34 FWL_Error GetScrollPos(FX_FLOAT& fPos, bool bVert = true); 34 void GetScrollPos(FX_FLOAT& fPos, bool bVert = true);
35 FWL_Error SetItemHeight(FX_FLOAT fItemHeight); 35 FWL_Error SetItemHeight(FX_FLOAT fItemHeight);
36 CFWL_ListItem* GetFocusItem(); 36 CFWL_ListItem* GetFocusItem();
37 FWL_Error SetFocusItem(CFWL_ListItem* pItem); 37 FWL_Error SetFocusItem(CFWL_ListItem* pItem);
38 int32_t CountItems(); 38 int32_t CountItems();
39 CFWL_ListItem* GetItem(int32_t nIndex); 39 CFWL_ListItem* GetItem(int32_t nIndex);
40 FWL_Error SetItemString(CFWL_ListItem* pItem, const CFX_WideStringC& wsText); 40 FWL_Error SetItemString(CFWL_ListItem* pItem, const CFX_WideStringC& wsText);
41 FWL_Error GetItemString(CFWL_ListItem* pItem, CFX_WideString& wsText); 41 FWL_Error GetItemString(CFWL_ListItem* pItem, CFX_WideString& wsText);
42 FWL_Error SetItemData(CFWL_ListItem* pItem, void* pData); 42 FWL_Error SetItemData(CFWL_ListItem* pItem, void* pData);
43 void* GetItemData(CFWL_ListItem* pItem); 43 void* GetItemData(CFWL_ListItem* pItem);
44 CFWL_ListItem* GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy); 44 CFWL_ListItem* GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy);
45 uint32_t GetItemStates(CFWL_ListItem* pItem); 45 uint32_t GetItemStates(CFWL_ListItem* pItem);
46 46
47 // IFWL_DataProvider: 47 // IFWL_DataProvider:
48 FWL_Error GetCaption(IFWL_Widget* pWidget, 48 FWL_Error GetCaption(IFWL_Widget* pWidget,
49 CFX_WideString& wsCaption) override; 49 CFX_WideString& wsCaption) override;
50 50
51 // IFWL_ListBoxDP: 51 // IFWL_ListBoxDP:
52 int32_t CountItems(const IFWL_Widget* pWidget) override; 52 int32_t CountItems(const IFWL_Widget* pWidget) override;
53 CFWL_ListItem* GetItem(const IFWL_Widget* pWidget, int32_t nIndex) override; 53 CFWL_ListItem* GetItem(const IFWL_Widget* pWidget, int32_t nIndex) override;
54 int32_t GetItemIndex(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; 54 int32_t GetItemIndex(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override;
55 bool SetItemIndex(IFWL_Widget* pWidget, 55 bool SetItemIndex(IFWL_Widget* pWidget,
56 CFWL_ListItem* pItem, 56 CFWL_ListItem* pItem,
57 int32_t nIndex) override; 57 int32_t nIndex) override;
58 uint32_t GetItemStyles(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; 58 uint32_t GetItemStyles(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override;
59 FWL_Error GetItemText(IFWL_Widget* pWidget, 59 void GetItemText(IFWL_Widget* pWidget,
60 CFWL_ListItem* pItem, 60 CFWL_ListItem* pItem,
61 CFX_WideString& wsText) override; 61 CFX_WideString& wsText) override;
62 FWL_Error GetItemRect(IFWL_Widget* pWidget, 62 void GetItemRect(IFWL_Widget* pWidget,
63 CFWL_ListItem* pItem, 63 CFWL_ListItem* pItem,
64 CFX_RectF& rtItem) override; 64 CFX_RectF& rtItem) override;
65 void* GetItemData(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; 65 void* GetItemData(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override;
66 FWL_Error SetItemStyles(IFWL_Widget* pWidget, 66 void SetItemStyles(IFWL_Widget* pWidget,
67 CFWL_ListItem* pItem, 67 CFWL_ListItem* pItem,
68 uint32_t dwStyle) override; 68 uint32_t dwStyle) override;
69 FWL_Error SetItemText(IFWL_Widget* pWidget, 69 void SetItemText(IFWL_Widget* pWidget,
70 CFWL_ListItem* pItem, 70 CFWL_ListItem* pItem,
71 const FX_WCHAR* pszText) override; 71 const FX_WCHAR* pszText) override;
72 FWL_Error SetItemRect(IFWL_Widget* pWidget, 72 void SetItemRect(IFWL_Widget* pWidget,
73 CFWL_ListItem* pItem, 73 CFWL_ListItem* pItem,
74 const CFX_RectF& rtItem) override; 74 const CFX_RectF& rtItem) override;
75 FX_FLOAT GetItemHeight(IFWL_Widget* pWidget) override; 75 FX_FLOAT GetItemHeight(IFWL_Widget* pWidget) override;
76 CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget, 76 CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
77 CFWL_ListItem* pItem) override; 77 CFWL_ListItem* pItem) override;
78 FWL_Error GetItemCheckRect(IFWL_Widget* pWidget, 78 void GetItemCheckRect(IFWL_Widget* pWidget,
79 CFWL_ListItem* pItem, 79 CFWL_ListItem* pItem,
80 CFX_RectF& rtCheck) override; 80 CFX_RectF& rtCheck) override;
81 FWL_Error SetItemCheckRect(IFWL_Widget* pWidget, 81 void SetItemCheckRect(IFWL_Widget* pWidget,
82 CFWL_ListItem* pItem, 82 CFWL_ListItem* pItem,
83 const CFX_RectF& rtCheck) override; 83 const CFX_RectF& rtCheck) override;
84 uint32_t GetItemCheckState(IFWL_Widget* pWidget, 84 uint32_t GetItemCheckState(IFWL_Widget* pWidget,
85 CFWL_ListItem* pItem) override; 85 CFWL_ListItem* pItem) override;
86 FWL_Error SetItemCheckState(IFWL_Widget* pWidget, 86 void SetItemCheckState(IFWL_Widget* pWidget,
87 CFWL_ListItem* pItem, 87 CFWL_ListItem* pItem,
88 uint32_t dwCheckState) override; 88 uint32_t dwCheckState) override;
89 89
90 private: 90 private:
91 std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray; 91 std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray;
92 CFX_WideString m_wsData; 92 CFX_WideString m_wsData;
93 FX_FLOAT m_fItemHeight; 93 FX_FLOAT m_fItemHeight;
94 }; 94 };
95 95
96 #endif // XFA_FWL_CORE_CFWL_LISTBOX_H_ 96 #endif // XFA_FWL_CORE_CFWL_LISTBOX_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_combobox.cpp ('k') | xfa/fwl/core/cfwl_listbox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698