| 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 _FWL_LISTBOX_LIGHT_H | 7 #ifndef _FWL_LISTBOX_LIGHT_H |
| 8 #define _FWL_LISTBOX_LIGHT_H | 8 #define _FWL_LISTBOX_LIGHT_H |
| 9 class CFWL_Widget; | 9 class CFWL_Widget; |
| 10 class CFWL_WidgetProperties; | 10 class CFWL_WidgetProperties; |
| 11 class IFWL_ListBoxDP; | 11 class IFWL_ListBoxDP; |
| 12 class CFWL_ListBox; | 12 class CFWL_ListBox; |
| 13 class CFWL_ListItem; | 13 class CFWL_ListItem; |
| 14 class CFWL_ListBox : public CFWL_Widget | 14 class CFWL_ListBox : public CFWL_Widget |
| 15 { | 15 { |
| 16 public: | 16 public: |
| 17 static CFWL_ListBox* Create(); | 17 static CFWL_ListBox* Create(); |
| 18 FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NU
LL); | 18 FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NU
LL); |
| 19 FWL_ERR AddDIBitmap(CFX_DIBitmap * pDIB, FWL_HLISTITEM hItem); | 19 FWL_ERR AddDIBitmap(CFX_DIBitmap * pDIB, FWL_HLISTITEM hItem); |
| 20 FWL_HLISTITEM AddString(FX_WSTR wsAdd, FX_BOOL bSelect = FALSE); | 20 FWL_HLISTITEM AddString(FX_WSTR wsAdd, FX_BOOL bSelect = FALSE); |
| 21 FX_BOOL DeleteString(FWL_HLISTITEM hItem); | 21 FX_BOOL DeleteString(FWL_HLISTITEM hItem); |
| 22 FX_BOOL DeleteAll(); | 22 FX_BOOL DeleteAll(); |
| 23 FX_INT32» CountSelItems(); | 23 int32_t» CountSelItems(); |
| 24 FWL_HLISTITEM» GetSelItem(FX_INT32 nIndexSel); | 24 FWL_HLISTITEM» GetSelItem(int32_t nIndexSel); |
| 25 FX_INT32» GetSelIndex(FX_INT32 nIndex); | 25 int32_t» GetSelIndex(int32_t nIndex); |
| 26 FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE); | 26 FWL_ERR SetSelItem(FWL_HLISTITEM hItem, FX_BOOL bSelect = TRUE); |
| 27 FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString &wsText)
; | 27 FWL_ERR GetItemText(FWL_HLISTITEM hItem, CFX_WideString &wsText)
; |
| 28 FWL_ERR GetScrollPos(FX_FLOAT &fPos, FX_BOOL bVert = TRUE); | 28 FWL_ERR GetScrollPos(FX_FLOAT &fPos, FX_BOOL bVert = TRUE); |
| 29 FWL_ERR SetItemHeight(FX_FLOAT fItemHeight); | 29 FWL_ERR SetItemHeight(FX_FLOAT fItemHeight); |
| 30 FWL_HLISTITEM GetFocusItem(); | 30 FWL_HLISTITEM GetFocusItem(); |
| 31 FWL_ERR SetFocusItem(FWL_HLISTITEM hItem); | 31 FWL_ERR SetFocusItem(FWL_HLISTITEM hItem); |
| 32 FWL_ERR* Sort(IFWL_ListBoxCompare *pCom); | 32 FWL_ERR* Sort(IFWL_ListBoxCompare *pCom); |
| 33 FX_INT32» CountItems(); | 33 int32_t» CountItems(); |
| 34 FWL_HLISTITEM» GetItem(FX_INT32 nIndex); | 34 FWL_HLISTITEM» GetItem(int32_t nIndex); |
| 35 FWL_ERR SetItemString(FWL_HLISTITEM hItem, FX_WSTR wsText); | 35 FWL_ERR SetItemString(FWL_HLISTITEM hItem, FX_WSTR wsText); |
| 36 FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString &wsTex
t); | 36 FWL_ERR GetItemString(FWL_HLISTITEM hItem, CFX_WideString &wsTex
t); |
| 37 FWL_ERR SetItemData(FWL_HLISTITEM hItem, FX_LPVOID pData); | 37 FWL_ERR SetItemData(FWL_HLISTITEM hItem, FX_LPVOID pData); |
| 38 FX_LPVOID GetItemData(FWL_HLISTITEM hItem); | 38 FX_LPVOID GetItemData(FWL_HLISTITEM hItem); |
| 39 FWL_HLISTITEM GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy); | 39 FWL_HLISTITEM GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy); |
| 40 FX_DWORD GetItemStates(FWL_HLISTITEM hItem); | 40 FX_DWORD GetItemStates(FWL_HLISTITEM hItem); |
| 41 CFWL_ListBox(); | 41 CFWL_ListBox(); |
| 42 virtual ~CFWL_ListBox(); | 42 virtual ~CFWL_ListBox(); |
| 43 protected: | 43 protected: |
| 44 class CFWL_ListBoxDP : public IFWL_ListBoxDP | 44 class CFWL_ListBoxDP : public IFWL_ListBoxDP |
| 45 { | 45 { |
| 46 public: | 46 public: |
| 47 CFWL_ListBoxDP(); | 47 CFWL_ListBoxDP(); |
| 48 ~CFWL_ListBoxDP(); | 48 ~CFWL_ListBoxDP(); |
| 49 virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCapti
on); | 49 virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCapti
on); |
| 50 | 50 |
| 51 virtual»FX_INT32» » CountItems(IFWL_Widget *pWidget); | 51 virtual»int32_t»» CountItems(IFWL_Widget *pWidget); |
| 52 virtual»FWL_HLISTITEM» GetItem(IFWL_Widget *pWidget, FX_INT32 nIndex); | 52 virtual»FWL_HLISTITEM» GetItem(IFWL_Widget *pWidget, int32_t nIndex); |
| 53 virtual»FX_INT32» » GetItemIndex(IFWL_Widget *pWidget, FWL_H
LISTITEM hItem); | 53 virtual»int32_t»» GetItemIndex(IFWL_Widget *pWidget, FWL_HLISTITEM
hItem); |
| 54 virtual FX_BOOL»» » SetItemIndex(IFWL_Widget *pWidget, FWL_H
LISTITEM hItem, FX_INT32 nIndex); | 54 virtual FX_BOOL»» » SetItemIndex(IFWL_Widget *pWidget, FWL_H
LISTITEM hItem, int32_t nIndex); |
| 55 | 55 |
| 56 virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidget, FWL_
HLISTITEM hItem); | 56 virtual FX_DWORD GetItemStyles(IFWL_Widget *pWidget, FWL_
HLISTITEM hItem); |
| 57 virtual FWL_ERR GetItemText(IFWL_Widget *pWidget, FWL_HL
ISTITEM hItem, CFX_WideString &wsText); | 57 virtual FWL_ERR GetItemText(IFWL_Widget *pWidget, FWL_HL
ISTITEM hItem, CFX_WideString &wsText); |
| 58 virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget, FWL_HL
ISTITEM hItem, CFX_RectF &rtItem); | 58 virtual FWL_ERR GetItemRect(IFWL_Widget *pWidget, FWL_HL
ISTITEM hItem, CFX_RectF &rtItem); |
| 59 virtual FX_LPVOID GetItemData(IFWL_Widget *pWidget, FWL_HL
ISTITEM hItem); | 59 virtual FX_LPVOID GetItemData(IFWL_Widget *pWidget, FWL_HL
ISTITEM hItem); |
| 60 | 60 |
| 61 virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidget, FWL_
HLISTITEM hItem, FX_DWORD dwStyle); | 61 virtual FWL_ERR SetItemStyles(IFWL_Widget *pWidget, FWL_
HLISTITEM hItem, FX_DWORD dwStyle); |
| 62 virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HL
ISTITEM hItem, FX_LPCWSTR pszText); | 62 virtual FWL_ERR SetItemText(IFWL_Widget *pWidget, FWL_HL
ISTITEM hItem, FX_LPCWSTR pszText); |
| 63 virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget, FWL_HL
ISTITEM hItem, const CFX_RectF &rtItem); | 63 virtual FWL_ERR SetItemRect(IFWL_Widget *pWidget, FWL_HL
ISTITEM hItem, const CFX_RectF &rtItem); |
| 64 virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget); | 64 virtual FX_FLOAT GetItemHeight(IFWL_Widget *pWidget); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 89 } | 89 } |
| 90 CFX_RectF m_rtItem; | 90 CFX_RectF m_rtItem; |
| 91 FX_DWORD m_dwStates; | 91 FX_DWORD m_dwStates; |
| 92 CFX_WideString m_wsText; | 92 CFX_WideString m_wsText; |
| 93 CFX_DIBitmap *m_pDIB; | 93 CFX_DIBitmap *m_pDIB; |
| 94 FX_LPVOID m_pData; | 94 FX_LPVOID m_pData; |
| 95 FX_DWORD m_dwCheckState; | 95 FX_DWORD m_dwCheckState; |
| 96 CFX_RectF m_rtCheckBox; | 96 CFX_RectF m_rtCheckBox; |
| 97 }; | 97 }; |
| 98 #endif | 98 #endif |
| OLD | NEW |