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

Side by Side Diff: xfa/include/fwl/basewidget/fwl_listbox.h

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 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/basewidget/fwl_edit.h ('k') | xfa/include/fwl/basewidget/fwl_monthcalendar.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 _FWL_LISTBOX_H 7 #ifndef _FWL_LISTBOX_H
8 #define _FWL_LISTBOX_H 8 #define _FWL_LISTBOX_H
9 class CFWL_WidgetImpProperties; 9 class CFWL_WidgetImpProperties;
10 class IFWL_Widget; 10 class IFWL_Widget;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #define FWL_EVT_LTB_SelChanged L"FWL_EVENT_LTB_SelChang ed" 47 #define FWL_EVT_LTB_SelChanged L"FWL_EVENT_LTB_SelChang ed"
48 #define FWL_EVT_LTB_DrawItem L"FWL_EVENT_LTB_DrawItem " 48 #define FWL_EVT_LTB_DrawItem L"FWL_EVENT_LTB_DrawItem "
49 #define FWL_EVTHASH_LTB_SelChanged 1701781688 49 #define FWL_EVTHASH_LTB_SelChanged 1701781688
50 #define FWL_EVTHASH_LTB_DrawItem 1050853991 50 #define FWL_EVTHASH_LTB_DrawItem 1050853991
51 BEGIN_FWL_EVENT_DEF(CFWL_EvtLtbSelChanged, FWL_EVTHASH_LTB_SelChanged) 51 BEGIN_FWL_EVENT_DEF(CFWL_EvtLtbSelChanged, FWL_EVTHASH_LTB_SelChanged)
52 CFX_Int32Array iarraySels; 52 CFX_Int32Array iarraySels;
53 END_FWL_EVENT_DEF 53 END_FWL_EVENT_DEF
54 BEGIN_FWL_EVENT_DEF(CFWL_EvtLtbDrawItem, FWL_EVTHASH_LTB_DrawItem) 54 BEGIN_FWL_EVENT_DEF(CFWL_EvtLtbDrawItem, FWL_EVTHASH_LTB_DrawItem)
55 CFX_Graphics *m_pGraphics; 55 CFX_Graphics *m_pGraphics;
56 CFX_Matrix m_matrix; 56 CFX_Matrix m_matrix;
57 FX_INT32 m_index; 57 int32_t m_index;
58 CFX_RectF m_rect; 58 CFX_RectF m_rect;
59 END_FWL_EVENT_DEF 59 END_FWL_EVENT_DEF
60 typedef struct _FWL_HLISTITEM { 60 typedef struct _FWL_HLISTITEM {
61 FX_LPVOID pData; 61 FX_LPVOID pData;
62 }* FWL_HLISTITEM; 62 }* FWL_HLISTITEM;
63 typedef struct _FWL_ListBoxItemData { 63 typedef struct _FWL_ListBoxItemData {
64 IFWL_ListBoxDP *pDataProvider; 64 IFWL_ListBoxDP *pDataProvider;
65 FX_INT32 iIndex; 65 int32_t iIndex;
66 } FWL_ListBoxItemData; 66 } FWL_ListBoxItemData;
67 class IFWL_ListBoxDP : public IFWL_DataProvider 67 class IFWL_ListBoxDP : public IFWL_DataProvider
68 { 68 {
69 public: 69 public:
70 virtual» FX_INT32» » » CountItems(IFWL_Widget *pWidget) = 0; 70 virtual» int32_t»» » CountItems(IFWL_Widget *pWidget) = 0;
71 virtual» FWL_HLISTITEM» » GetItem(IFWL_Widget *pWidget, FX_INT32 n Index) = 0; 71 virtual» FWL_HLISTITEM» » GetItem(IFWL_Widget *pWidget, int32_t nI ndex) = 0;
72 virtual» FX_INT32» » » GetItemIndex(IFWL_Widget *pWidge t, FWL_HLISTITEM hItem) = 0; 72 virtual» int32_t»» » GetItemIndex(IFWL_Widget *pWidget, FWL_H LISTITEM hItem) = 0;
73 virtual FX_BOOL» » » » SetItemIndex(IFWL_Widget *pWidge t, FWL_HLISTITEM hItem, FX_INT32 nIndex) = 0; 73 virtual FX_BOOL» » » » SetItemIndex(IFWL_Widget *pWidge t, FWL_HLISTITEM hItem, int32_t nIndex) = 0;
74 virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidg et, FWL_HLISTITEM hItem) = 0; 74 virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidg et, FWL_HLISTITEM hItem) = 0;
75 virtual FWL_ERR GetItemText(IFWL_Widget *pWidget , FWL_HLISTITEM hItem, CFX_WideString &wsText) = 0; 75 virtual FWL_ERR GetItemText(IFWL_Widget *pWidget , FWL_HLISTITEM hItem, CFX_WideString &wsText) = 0;
76 virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget , FWL_HLISTITEM hItem, CFX_RectF &rtItem) = 0; 76 virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget , FWL_HLISTITEM hItem, CFX_RectF &rtItem) = 0;
77 virtual FX_LPVOID GetItemData(IFWL_Widget *pWidget, FWL_HL ISTITEM hItem) = 0; 77 virtual FX_LPVOID GetItemData(IFWL_Widget *pWidget, FWL_HL ISTITEM hItem) = 0;
78 virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidg et, FWL_HLISTITEM hItem, FX_DWORD dwStyle) = 0; 78 virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidg et, FWL_HLISTITEM hItem, FX_DWORD dwStyle) = 0;
79 virtual FWL_ERR SetItemText(IFWL_Widget *pWidget , FWL_HLISTITEM hItem, FX_LPCWSTR pszText) = 0; 79 virtual FWL_ERR SetItemText(IFWL_Widget *pWidget , FWL_HLISTITEM hItem, FX_LPCWSTR pszText) = 0;
80 virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget , FWL_HLISTITEM hItem, const CFX_RectF &rtItem) = 0; 80 virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget , FWL_HLISTITEM hItem, const CFX_RectF &rtItem) = 0;
81 virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget) = 0; 81 virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget) = 0;
82 virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget *pWidget, FWL_HL ISTITEM hItem) = 0; 82 virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget *pWidget, FWL_HL ISTITEM hItem) = 0;
83 virtual FWL_ERR GetItemCheckRect(IFWL_Widget *pW idget, FWL_HLISTITEM hItem, CFX_RectF& rtCheck) = 0; 83 virtual FWL_ERR GetItemCheckRect(IFWL_Widget *pW idget, FWL_HLISTITEM hItem, CFX_RectF& rtCheck) = 0;
84 virtual FWL_ERR SetItemCheckRect(IFWL_Widget *pW idget, FWL_HLISTITEM hItem, const CFX_RectF& rtCheck) = 0; 84 virtual FWL_ERR SetItemCheckRect(IFWL_Widget *pW idget, FWL_HLISTITEM hItem, const CFX_RectF& rtCheck) = 0;
85 virtual FX_DWORD GetItemCheckState(IFWL_Widget *p Widget, FWL_HLISTITEM hItem) = 0; 85 virtual FX_DWORD GetItemCheckState(IFWL_Widget *p Widget, FWL_HLISTITEM hItem) = 0;
86 virtual FWL_ERR SetItemCheckState(IFWL_Widget *p Widget, FWL_HLISTITEM hItem, FX_DWORD dwCheckState) = 0; 86 virtual FWL_ERR SetItemCheckState(IFWL_Widget *p Widget, FWL_HLISTITEM hItem, FX_DWORD dwCheckState) = 0;
87 }; 87 };
88 class IFWL_ListBoxCompare 88 class IFWL_ListBoxCompare
89 { 89 {
90 public: 90 public:
91 virtual FX_INT32 Compare(FWL_HLISTITEM hLeft, FWL_HLISTITEM hRight) = 0; 91 virtual int32_t Compare(FWL_HLISTITEM hLeft, FWL_HLISTITEM hRight) = 0;
92 }; 92 };
93 class IFWL_ListBox : public IFWL_Widget 93 class IFWL_ListBox : public IFWL_Widget
94 { 94 {
95 public: 95 public:
96 static IFWL_ListBox* Create(); 96 static IFWL_ListBox* Create();
97 FWL_ERR Initialize(IFWL_Widget *pOuter = NULL); 97 FWL_ERR Initialize(IFWL_Widget *pOuter = NULL);
98 FWL_ERR Initialize(const CFWL_WidgetImpProperties &prope rties, IFWL_Widget *pOuter = NULL); 98 FWL_ERR Initialize(const CFWL_WidgetImpProperties &prope rties, IFWL_Widget *pOuter = NULL);
99 FX_INT32» » CountSelItems(); 99 int32_t» » CountSelItems();
100 FWL_HLISTITEM» GetSelItem(FX_INT32 nIndexSel); 100 FWL_HLISTITEM» GetSelItem(int32_t nIndexSel);
101 FX_INT32» » GetSelIndex(FX_INT32 nIndex); 101 int32_t» » GetSelIndex(int32_t nIndex);
102 FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE); 102 FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE);
103 FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString &wsText); 103 FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString &wsText);
104 FWL_ERR GetScrollPos(FX_FLOAT &fPos, FX_BOOL bVert = TRU E); 104 FWL_ERR GetScrollPos(FX_FLOAT &fPos, FX_BOOL bVert = TRU E);
105 FWL_ERR* Sort(IFWL_ListBoxCompare *pCom); 105 FWL_ERR* Sort(IFWL_ListBoxCompare *pCom);
106 protected: 106 protected:
107 IFWL_ListBox(); 107 IFWL_ListBox();
108 virtual ~IFWL_ListBox(); 108 virtual ~IFWL_ListBox();
109 }; 109 };
110 #endif 110 #endif
OLDNEW
« no previous file with comments | « xfa/include/fwl/basewidget/fwl_edit.h ('k') | xfa/include/fwl/basewidget/fwl_monthcalendar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698