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

Side by Side Diff: xfa/include/fwl/lightwidget/listbox.h

Issue 1835703002: Remove FX_DWORD from XFA, part 2 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months 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/include/fwl/lightwidget/edit.h ('k') | xfa/include/fwl/lightwidget/scrollbar.h » ('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_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_ 7 #ifndef XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_
8 #define XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_ 8 #define XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 25 matching lines...) Expand all
36 FWL_HLISTITEM GetFocusItem(); 36 FWL_HLISTITEM GetFocusItem();
37 FWL_ERR SetFocusItem(FWL_HLISTITEM hItem); 37 FWL_ERR SetFocusItem(FWL_HLISTITEM hItem);
38 FWL_ERR* Sort(IFWL_ListBoxCompare* pCom); 38 FWL_ERR* Sort(IFWL_ListBoxCompare* pCom);
39 int32_t CountItems(); 39 int32_t CountItems();
40 FWL_HLISTITEM GetItem(int32_t nIndex); 40 FWL_HLISTITEM GetItem(int32_t nIndex);
41 FWL_ERR SetItemString(FWL_HLISTITEM hItem, const CFX_WideStringC& wsText); 41 FWL_ERR SetItemString(FWL_HLISTITEM hItem, const CFX_WideStringC& wsText);
42 FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString& wsText); 42 FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString& wsText);
43 FWL_ERR SetItemData(FWL_HLISTITEM hItem, void* pData); 43 FWL_ERR SetItemData(FWL_HLISTITEM hItem, void* pData);
44 void* GetItemData(FWL_HLISTITEM hItem); 44 void* GetItemData(FWL_HLISTITEM hItem);
45 FWL_HLISTITEM GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy); 45 FWL_HLISTITEM GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy);
46 FX_DWORD GetItemStates(FWL_HLISTITEM hItem); 46 uint32_t GetItemStates(FWL_HLISTITEM hItem);
47 CFWL_ListBox(); 47 CFWL_ListBox();
48 virtual ~CFWL_ListBox(); 48 virtual ~CFWL_ListBox();
49 49
50 protected: 50 protected:
51 class CFWL_ListBoxDP : public IFWL_ListBoxDP { 51 class CFWL_ListBoxDP : public IFWL_ListBoxDP {
52 public: 52 public:
53 CFWL_ListBoxDP(); 53 CFWL_ListBoxDP();
54 ~CFWL_ListBoxDP(); 54 ~CFWL_ListBoxDP();
55 55
56 // IFWL_DataProvider: 56 // IFWL_DataProvider:
57 FWL_ERR GetCaption(IFWL_Widget* pWidget, 57 FWL_ERR GetCaption(IFWL_Widget* pWidget,
58 CFX_WideString& wsCaption) override; 58 CFX_WideString& wsCaption) override;
59 59
60 // IFWL_ListBoxDP: 60 // IFWL_ListBoxDP:
61 int32_t CountItems(IFWL_Widget* pWidget) override; 61 int32_t CountItems(IFWL_Widget* pWidget) override;
62 FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex) override; 62 FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex) override;
63 int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) override; 63 int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) override;
64 FX_BOOL SetItemIndex(IFWL_Widget* pWidget, 64 FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
65 FWL_HLISTITEM hItem, 65 FWL_HLISTITEM hItem,
66 int32_t nIndex) override; 66 int32_t nIndex) override;
67 FX_DWORD GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) override; 67 uint32_t GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) override;
68 FWL_ERR GetItemText(IFWL_Widget* pWidget, 68 FWL_ERR GetItemText(IFWL_Widget* pWidget,
69 FWL_HLISTITEM hItem, 69 FWL_HLISTITEM hItem,
70 CFX_WideString& wsText) override; 70 CFX_WideString& wsText) override;
71 FWL_ERR GetItemRect(IFWL_Widget* pWidget, 71 FWL_ERR GetItemRect(IFWL_Widget* pWidget,
72 FWL_HLISTITEM hItem, 72 FWL_HLISTITEM hItem,
73 CFX_RectF& rtItem) override; 73 CFX_RectF& rtItem) override;
74 void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) override; 74 void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) override;
75 FWL_ERR SetItemStyles(IFWL_Widget* pWidget, 75 FWL_ERR SetItemStyles(IFWL_Widget* pWidget,
76 FWL_HLISTITEM hItem, 76 FWL_HLISTITEM hItem,
77 FX_DWORD dwStyle) override; 77 uint32_t dwStyle) override;
78 FWL_ERR SetItemText(IFWL_Widget* pWidget, 78 FWL_ERR SetItemText(IFWL_Widget* pWidget,
79 FWL_HLISTITEM hItem, 79 FWL_HLISTITEM hItem,
80 const FX_WCHAR* pszText) override; 80 const FX_WCHAR* pszText) override;
81 FWL_ERR SetItemRect(IFWL_Widget* pWidget, 81 FWL_ERR SetItemRect(IFWL_Widget* pWidget,
82 FWL_HLISTITEM hItem, 82 FWL_HLISTITEM hItem,
83 const CFX_RectF& rtItem) override; 83 const CFX_RectF& rtItem) override;
84 FX_FLOAT GetItemHeight(IFWL_Widget* pWidget) override; 84 FX_FLOAT GetItemHeight(IFWL_Widget* pWidget) override;
85 CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget, 85 CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
86 FWL_HLISTITEM hItem) override; 86 FWL_HLISTITEM hItem) override;
87 FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget, 87 FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget,
88 FWL_HLISTITEM hItem, 88 FWL_HLISTITEM hItem,
89 CFX_RectF& rtCheck) override; 89 CFX_RectF& rtCheck) override;
90 FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget, 90 FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget,
91 FWL_HLISTITEM hItem, 91 FWL_HLISTITEM hItem,
92 const CFX_RectF& rtCheck) override; 92 const CFX_RectF& rtCheck) override;
93 FX_DWORD GetItemCheckState(IFWL_Widget* pWidget, 93 uint32_t GetItemCheckState(IFWL_Widget* pWidget,
94 FWL_HLISTITEM hItem) override; 94 FWL_HLISTITEM hItem) override;
95 FWL_ERR SetItemCheckState(IFWL_Widget* pWidget, 95 FWL_ERR SetItemCheckState(IFWL_Widget* pWidget,
96 FWL_HLISTITEM hItem, 96 FWL_HLISTITEM hItem,
97 FX_DWORD dwCheckState) override; 97 uint32_t dwCheckState) override;
98 98
99 std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray; 99 std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray;
100 CFX_WideString m_wsData; 100 CFX_WideString m_wsData;
101 FX_FLOAT m_fItemHeight; 101 FX_FLOAT m_fItemHeight;
102 }; 102 };
103 103
104 CFWL_ListBoxDP m_ListBoxDP; 104 CFWL_ListBoxDP m_ListBoxDP;
105 }; 105 };
106 106
107 class CFWL_ListItem { 107 class CFWL_ListItem {
108 public: 108 public:
109 CFWL_ListItem() { 109 CFWL_ListItem() {
110 m_rtItem.Reset(); 110 m_rtItem.Reset();
111 m_dwStates = 0; 111 m_dwStates = 0;
112 m_wsText = L""; 112 m_wsText = L"";
113 m_pDIB = NULL; 113 m_pDIB = NULL;
114 m_pData = NULL; 114 m_pData = NULL;
115 m_dwCheckState = 0; 115 m_dwCheckState = 0;
116 m_rtCheckBox.Reset(); 116 m_rtCheckBox.Reset();
117 } 117 }
118 CFX_RectF m_rtItem; 118 CFX_RectF m_rtItem;
119 FX_DWORD m_dwStates; 119 uint32_t m_dwStates;
120 CFX_WideString m_wsText; 120 CFX_WideString m_wsText;
121 CFX_DIBitmap* m_pDIB; 121 CFX_DIBitmap* m_pDIB;
122 void* m_pData; 122 void* m_pData;
123 FX_DWORD m_dwCheckState; 123 uint32_t m_dwCheckState;
124 CFX_RectF m_rtCheckBox; 124 CFX_RectF m_rtCheckBox;
125 }; 125 };
126 126
127 #endif // XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_ 127 #endif // XFA_INCLUDE_FWL_LIGHTWIDGET_LISTBOX_H_
OLDNEW
« no previous file with comments | « xfa/include/fwl/lightwidget/edit.h ('k') | xfa/include/fwl/lightwidget/scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698