OLD | NEW |
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 13 matching lines...) Expand all Loading... |
24 #define FWL_STYLEEXT_LTB_Icon (1L << 8) | 24 #define FWL_STYLEEXT_LTB_Icon (1L << 8) |
25 #define FWL_STYLEEXT_LTB_Check (1L << 9) | 25 #define FWL_STYLEEXT_LTB_Check (1L << 9) |
26 #define FWL_STYLEEXT_LTB_AlignMask (3L << 4) | 26 #define FWL_STYLEEXT_LTB_AlignMask (3L << 4) |
27 #define FWL_STYLEEXT_LTB_ShowScrollBarFocus (1L << 10) | 27 #define FWL_STYLEEXT_LTB_ShowScrollBarFocus (1L << 10) |
28 #define FWL_ITEMSTATE_LTB_Selected (1L << 0) | 28 #define FWL_ITEMSTATE_LTB_Selected (1L << 0) |
29 #define FWL_ITEMSTATE_LTB_Focused (1L << 1) | 29 #define FWL_ITEMSTATE_LTB_Focused (1L << 1) |
30 #define FWL_ITEMSTATE_LTB_Checked (1L << 2) | 30 #define FWL_ITEMSTATE_LTB_Checked (1L << 2) |
31 | 31 |
32 class CFX_DIBitmap; | 32 class CFX_DIBitmap; |
33 | 33 |
34 BEGIN_FWL_EVENT_DEF(CFWL_EvtLtbSelChanged, CFWL_EventType::SelectChanged) | 34 FWL_EVENT_DEF(CFWL_EvtLtbSelChanged, |
35 CFX_Int32Array iarraySels; | 35 CFWL_EventType::SelectChanged, |
36 END_FWL_EVENT_DEF | 36 CFX_Int32Array iarraySels;) |
37 | 37 |
38 BEGIN_FWL_EVENT_DEF(CFWL_EvtLtbDrawItem, CFWL_EventType::DrawItem) | 38 FWL_EVENT_DEF(CFWL_EvtLtbDrawItem, |
39 CFX_Graphics* m_pGraphics; | 39 CFWL_EventType::DrawItem, |
40 CFX_Matrix m_matrix; | 40 CFX_Graphics* m_pGraphics; |
41 int32_t m_index; | 41 CFX_Matrix m_matrix; |
42 CFX_RectF m_rect; | 42 int32_t m_index; |
43 END_FWL_EVENT_DEF | 43 CFX_RectF m_rect;) |
44 | 44 |
45 class IFWL_ListItem {}; | 45 class IFWL_ListItem {}; |
46 | 46 |
47 class IFWL_ListBoxDP : public IFWL_DataProvider { | 47 class IFWL_ListBoxDP : public IFWL_DataProvider { |
48 public: | 48 public: |
49 virtual int32_t CountItems(IFWL_Widget* pWidget) = 0; | 49 virtual int32_t CountItems(IFWL_Widget* pWidget) = 0; |
50 virtual IFWL_ListItem* GetItem(IFWL_Widget* pWidget, int32_t nIndex) = 0; | 50 virtual IFWL_ListItem* GetItem(IFWL_Widget* pWidget, int32_t nIndex) = 0; |
51 virtual int32_t GetItemIndex(IFWL_Widget* pWidget, IFWL_ListItem* pItem) = 0; | 51 virtual int32_t GetItemIndex(IFWL_Widget* pWidget, IFWL_ListItem* pItem) = 0; |
52 virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget, | 52 virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget, |
53 IFWL_ListItem* pItem, | 53 IFWL_ListItem* pItem, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 int32_t GetSelIndex(int32_t nIndex); | 105 int32_t GetSelIndex(int32_t nIndex); |
106 FWL_Error SetSelItem(IFWL_ListItem* pItem, FX_BOOL bSelect = TRUE); | 106 FWL_Error SetSelItem(IFWL_ListItem* pItem, FX_BOOL bSelect = TRUE); |
107 FWL_Error GetItemText(IFWL_ListItem* pItem, CFX_WideString& wsText); | 107 FWL_Error GetItemText(IFWL_ListItem* pItem, CFX_WideString& wsText); |
108 FWL_Error GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE); | 108 FWL_Error GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE); |
109 | 109 |
110 protected: | 110 protected: |
111 IFWL_ListBox(); | 111 IFWL_ListBox(); |
112 }; | 112 }; |
113 | 113 |
114 #endif // XFA_FWL_BASEWIDGET_IFWL_LISTBOX_H_ | 114 #endif // XFA_FWL_BASEWIDGET_IFWL_LISTBOX_H_ |
OLD | NEW |