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

Side by Side Diff: xfa/fwl/basewidget/ifwl_listbox.h

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
Patch Set: Mac XFA build Created 4 years, 7 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
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_BASEWIDGET_IFWL_LISTBOX_H_ 7 #ifndef XFA_FWL_BASEWIDGET_IFWL_LISTBOX_H_
8 #define XFA_FWL_BASEWIDGET_IFWL_LISTBOX_H_ 8 #define XFA_FWL_BASEWIDGET_IFWL_LISTBOX_H_
9 9
10 #include "xfa/fwl/core/ifwl_widget.h" 10 #include "xfa/fwl/core/ifwl_widget.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 class IFWL_ListBoxDP : public IFWL_DataProvider { 55 class IFWL_ListBoxDP : public IFWL_DataProvider {
56 public: 56 public:
57 virtual int32_t CountItems(IFWL_Widget* pWidget) = 0; 57 virtual int32_t CountItems(IFWL_Widget* pWidget) = 0;
58 virtual FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex) = 0; 58 virtual FWL_HLISTITEM GetItem(IFWL_Widget* pWidget, int32_t nIndex) = 0;
59 virtual int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) = 0; 59 virtual int32_t GetItemIndex(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) = 0;
60 virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget, 60 virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
61 FWL_HLISTITEM hItem, 61 FWL_HLISTITEM hItem,
62 int32_t nIndex) = 0; 62 int32_t nIndex) = 0;
63 virtual uint32_t GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) = 0; 63 virtual uint32_t GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) = 0;
64 virtual FWL_ERR GetItemText(IFWL_Widget* pWidget, 64 virtual FWL_Error GetItemText(IFWL_Widget* pWidget,
65 FWL_HLISTITEM hItem, 65 FWL_HLISTITEM hItem,
66 CFX_WideString& wsText) = 0; 66 CFX_WideString& wsText) = 0;
67 virtual FWL_ERR GetItemRect(IFWL_Widget* pWidget, 67 virtual FWL_Error GetItemRect(IFWL_Widget* pWidget,
68 FWL_HLISTITEM hItem, 68 FWL_HLISTITEM hItem,
69 CFX_RectF& rtItem) = 0; 69 CFX_RectF& rtItem) = 0;
70 virtual void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) = 0; 70 virtual void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem) = 0;
71 virtual FWL_ERR SetItemStyles(IFWL_Widget* pWidget, 71 virtual FWL_Error SetItemStyles(IFWL_Widget* pWidget,
72 FWL_HLISTITEM hItem,
73 uint32_t dwStyle) = 0;
74 virtual FWL_Error SetItemText(IFWL_Widget* pWidget,
72 FWL_HLISTITEM hItem, 75 FWL_HLISTITEM hItem,
73 uint32_t dwStyle) = 0; 76 const FX_WCHAR* pszText) = 0;
74 virtual FWL_ERR SetItemText(IFWL_Widget* pWidget, 77 virtual FWL_Error SetItemRect(IFWL_Widget* pWidget,
75 FWL_HLISTITEM hItem, 78 FWL_HLISTITEM hItem,
76 const FX_WCHAR* pszText) = 0; 79 const CFX_RectF& rtItem) = 0;
77 virtual FWL_ERR SetItemRect(IFWL_Widget* pWidget,
78 FWL_HLISTITEM hItem,
79 const CFX_RectF& rtItem) = 0;
80 virtual FX_FLOAT GetItemHeight(IFWL_Widget* pWidget) = 0; 80 virtual FX_FLOAT GetItemHeight(IFWL_Widget* pWidget) = 0;
81 virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget, 81 virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
82 FWL_HLISTITEM hItem) = 0; 82 FWL_HLISTITEM hItem) = 0;
83 virtual FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget, 83 virtual FWL_Error GetItemCheckRect(IFWL_Widget* pWidget,
84 FWL_HLISTITEM hItem, 84 FWL_HLISTITEM hItem,
85 CFX_RectF& rtCheck) = 0; 85 CFX_RectF& rtCheck) = 0;
86 virtual FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget, 86 virtual FWL_Error SetItemCheckRect(IFWL_Widget* pWidget,
87 FWL_HLISTITEM hItem, 87 FWL_HLISTITEM hItem,
88 const CFX_RectF& rtCheck) = 0; 88 const CFX_RectF& rtCheck) = 0;
89 virtual uint32_t GetItemCheckState(IFWL_Widget* pWidget, 89 virtual uint32_t GetItemCheckState(IFWL_Widget* pWidget,
90 FWL_HLISTITEM hItem) = 0; 90 FWL_HLISTITEM hItem) = 0;
91 virtual FWL_ERR SetItemCheckState(IFWL_Widget* pWidget, 91 virtual FWL_Error SetItemCheckState(IFWL_Widget* pWidget,
92 FWL_HLISTITEM hItem, 92 FWL_HLISTITEM hItem,
93 uint32_t dwCheckState) = 0; 93 uint32_t dwCheckState) = 0;
94 }; 94 };
95 95
96 class IFWL_ListBoxCompare { 96 class IFWL_ListBoxCompare {
97 public: 97 public:
98 virtual ~IFWL_ListBoxCompare() {} 98 virtual ~IFWL_ListBoxCompare() {}
99 virtual int32_t Compare(FWL_HLISTITEM hLeft, FWL_HLISTITEM hRight) = 0; 99 virtual int32_t Compare(FWL_HLISTITEM hLeft, FWL_HLISTITEM hRight) = 0;
100 }; 100 };
101 101
102 class IFWL_ListBox : public IFWL_Widget { 102 class IFWL_ListBox : public IFWL_Widget {
103 public: 103 public:
104 static IFWL_ListBox* Create(const CFWL_WidgetImpProperties& properties, 104 static IFWL_ListBox* Create(const CFWL_WidgetImpProperties& properties,
105 IFWL_Widget* pOuter); 105 IFWL_Widget* pOuter);
106 static IFWL_ListBox* CreateComboList( 106 static IFWL_ListBox* CreateComboList(
107 const CFWL_WidgetImpProperties& properties, 107 const CFWL_WidgetImpProperties& properties,
108 IFWL_Widget* pOuter); 108 IFWL_Widget* pOuter);
109 109
110 int32_t CountSelItems(); 110 int32_t CountSelItems();
111 FWL_HLISTITEM GetSelItem(int32_t nIndexSel); 111 FWL_HLISTITEM GetSelItem(int32_t nIndexSel);
112 int32_t GetSelIndex(int32_t nIndex); 112 int32_t GetSelIndex(int32_t nIndex);
113 FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE); 113 FWL_Error SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE);
114 FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText); 114 FWL_Error GetItemText(FWL_HLISTITEM hItem, CFX_WideString& wsText);
115 FWL_ERR GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE); 115 FWL_Error GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE);
116 FWL_ERR* Sort(IFWL_ListBoxCompare* pCom); 116 FWL_Error Sort(IFWL_ListBoxCompare* pCom);
117 117
118 protected: 118 protected:
119 IFWL_ListBox(); 119 IFWL_ListBox();
120 }; 120 };
121 121
122 #endif // XFA_FWL_BASEWIDGET_IFWL_LISTBOX_H_ 122 #endif // XFA_FWL_BASEWIDGET_IFWL_LISTBOX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698