| 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_COMBOBOX_H | 7 #ifndef _FWL_COMBOBOX_H |
| 8 #define _FWL_COMBOBOX_H | 8 #define _FWL_COMBOBOX_H |
| 9 class CFWL_WidgetImpProperties; | 9 class CFWL_WidgetImpProperties; |
| 10 class IFWL_Widget; | 10 class IFWL_Widget; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 #define FWL_EVTHASH_CMB_SelChanged 2923227784 | 67 #define FWL_EVTHASH_CMB_SelChanged 2923227784 |
| 68 #define FWL_EVTHASH_CMB_HoverChanged 944325448 | 68 #define FWL_EVTHASH_CMB_HoverChanged 944325448 |
| 69 #define FWL_EVTHASH_CMB_DrawItem 917354551 | 69 #define FWL_EVTHASH_CMB_DrawItem 917354551 |
| 70 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPreDropDown, FWL_EVTHASH_CMB_PreDropDown) | 70 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPreDropDown, FWL_EVTHASH_CMB_PreDropDown) |
| 71 END_FWL_EVENT_DEF | 71 END_FWL_EVENT_DEF |
| 72 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPostDropDown, FWL_EVTHASH_CMB_PostDropDown) | 72 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPostDropDown, FWL_EVTHASH_CMB_PostDropDown) |
| 73 END_FWL_EVENT_DEF | 73 END_FWL_EVENT_DEF |
| 74 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbCloseUp, FWL_EVTHASH_CMB_CloseUp) | 74 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbCloseUp, FWL_EVTHASH_CMB_CloseUp) |
| 75 END_FWL_EVENT_DEF | 75 END_FWL_EVENT_DEF |
| 76 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbEditChanged, FWL_EVTHASH_CMB_EditChanged) | 76 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbEditChanged, FWL_EVTHASH_CMB_EditChanged) |
| 77 FX_INT32 nChangeType; | 77 int32_t nChangeType; |
| 78 CFX_WideString wsInsert; | 78 CFX_WideString wsInsert; |
| 79 CFX_WideString wsDelete; | 79 CFX_WideString wsDelete; |
| 80 END_FWL_EVENT_DEF | 80 END_FWL_EVENT_DEF |
| 81 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbSelChanged, FWL_EVTHASH_CMB_SelChanged) | 81 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbSelChanged, FWL_EVTHASH_CMB_SelChanged) |
| 82 CFX_Int32Array iArraySels; | 82 CFX_Int32Array iArraySels; |
| 83 FX_BOOL bLButtonUp; | 83 FX_BOOL bLButtonUp; |
| 84 END_FWL_EVENT_DEF | 84 END_FWL_EVENT_DEF |
| 85 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbHoverChanged, FWL_EVTHASH_CMB_HoverChanged) | 85 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbHoverChanged, FWL_EVTHASH_CMB_HoverChanged) |
| 86 FX_INT32 m_iCurHover; | 86 int32_t m_iCurHover; |
| 87 END_FWL_EVENT_DEF | 87 END_FWL_EVENT_DEF |
| 88 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbDrawItem, FWL_EVTHASH_CMB_DrawItem) | 88 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbDrawItem, FWL_EVTHASH_CMB_DrawItem) |
| 89 CFX_Graphics *m_pGraphics; | 89 CFX_Graphics *m_pGraphics; |
| 90 CFX_Matrix m_matrix; | 90 CFX_Matrix m_matrix; |
| 91 FX_INT32 m_index; | 91 int32_t m_index; |
| 92 CFX_RectF m_rtItem; | 92 CFX_RectF m_rtItem; |
| 93 END_FWL_EVENT_DEF | 93 END_FWL_EVENT_DEF |
| 94 class IFWL_ComboBoxDP : public IFWL_ListBoxDP | 94 class IFWL_ComboBoxDP : public IFWL_ListBoxDP |
| 95 { | 95 { |
| 96 public: | 96 public: |
| 97 virtual FX_FLOAT GetListHeight(IFWL_Widget *pWidget) = 0; | 97 virtual FX_FLOAT GetListHeight(IFWL_Widget *pWidget) = 0; |
| 98 }; | 98 }; |
| 99 class IFWL_ComboBox : public IFWL_Widget | 99 class IFWL_ComboBox : public IFWL_Widget |
| 100 { | 100 { |
| 101 public: | 101 public: |
| 102 static IFWL_ComboBox* Create(); | 102 static IFWL_ComboBox* Create(); |
| 103 FWL_ERR Initialize(IFWL_Widget *pOuter = NULL); | 103 FWL_ERR Initialize(IFWL_Widget *pOuter = NULL); |
| 104 FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, I
FWL_Widget *pOuter = NULL); | 104 FWL_ERR Initialize(const CFWL_WidgetImpProperties &properties, I
FWL_Widget *pOuter = NULL); |
| 105 FX_INT32» GetCurSel(); | 105 int32_t» GetCurSel(); |
| 106 FWL_ERR» » SetCurSel(FX_INT32 iSel); | 106 FWL_ERR» » SetCurSel(int32_t iSel); |
| 107 FWL_ERR SetEditText(const CFX_WideString &wsText); | 107 FWL_ERR SetEditText(const CFX_WideString &wsText); |
| 108 FX_INT32» GetEditTextLength() const; | 108 int32_t» GetEditTextLength() const; |
| 109 FWL_ERR» » GetEditText(CFX_WideString &wsText, FX_INT32 nStart = 0,
FX_INT32 nCount = -1) const; | 109 FWL_ERR» » GetEditText(CFX_WideString &wsText, int32_t nStart = 0,
int32_t nCount = -1) const; |
| 110 FWL_ERR» » SetEditSelRange(FX_INT32 nStart, FX_INT32 nCount = -1); | 110 FWL_ERR» » SetEditSelRange(int32_t nStart, int32_t nCount = -1); |
| 111 FX_INT32» GetEditSelRange(FX_INT32 nIndex, FX_INT32 &nStart); | 111 int32_t» GetEditSelRange(int32_t nIndex, int32_t &nStart); |
| 112 FX_INT32» GetEditLimit(); | 112 int32_t» GetEditLimit(); |
| 113 FWL_ERR» » SetEditLimit(FX_INT32 nLimit); | 113 FWL_ERR» » SetEditLimit(int32_t nLimit); |
| 114 FWL_ERR» » EditDoClipboard(FX_INT32 iCmd); | 114 FWL_ERR» » EditDoClipboard(int32_t iCmd); |
| 115 FX_BOOL EditRedo(FX_BSTR bsRecord); | 115 FX_BOOL EditRedo(FX_BSTR bsRecord); |
| 116 FX_BOOL EditUndo(FX_BSTR bsRecord); | 116 FX_BOOL EditUndo(FX_BSTR bsRecord); |
| 117 IFWL_ListBox* GetListBoxt(); | 117 IFWL_ListBox* GetListBoxt(); |
| 118 FX_BOOL AfterFocusShowDropList(); | 118 FX_BOOL AfterFocusShowDropList(); |
| 119 FX_ERR OpenDropDownList(FX_BOOL bActivate); | 119 FX_ERR OpenDropDownList(FX_BOOL bActivate); |
| 120 FX_BOOL EditCanUndo(); | 120 FX_BOOL EditCanUndo(); |
| 121 FX_BOOL EditCanRedo(); | 121 FX_BOOL EditCanRedo(); |
| 122 FX_BOOL EditUndo(); | 122 FX_BOOL EditUndo(); |
| 123 FX_BOOL EditRedo(); | 123 FX_BOOL EditRedo(); |
| 124 FX_BOOL EditCanCopy(); | 124 FX_BOOL EditCanCopy(); |
| 125 FX_BOOL EditCanCut(); | 125 FX_BOOL EditCanCut(); |
| 126 FX_BOOL EditCanSelectAll(); | 126 FX_BOOL EditCanSelectAll(); |
| 127 FX_BOOL EditCopy(CFX_WideString &wsCopy); | 127 FX_BOOL EditCopy(CFX_WideString &wsCopy); |
| 128 FX_BOOL EditCut(CFX_WideString &wsCut); | 128 FX_BOOL EditCut(CFX_WideString &wsCut); |
| 129 FX_BOOL EditPaste(const CFX_WideString &wsPaste); | 129 FX_BOOL EditPaste(const CFX_WideString &wsPaste); |
| 130 FX_BOOL EditSelectAll(); | 130 FX_BOOL EditSelectAll(); |
| 131 FX_BOOL EditDelete(); | 131 FX_BOOL EditDelete(); |
| 132 FX_BOOL EditDeSelect(); | 132 FX_BOOL EditDeSelect(); |
| 133 FWL_ERR GetBBox(CFX_RectF &rect); | 133 FWL_ERR GetBBox(CFX_RectF &rect); |
| 134 FWL_ERR EditModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dw
StylesExRemoved); | 134 FWL_ERR EditModifyStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dw
StylesExRemoved); |
| 135 protected: | 135 protected: |
| 136 IFWL_ComboBox(); | 136 IFWL_ComboBox(); |
| 137 virtual ~IFWL_ComboBox(); | 137 virtual ~IFWL_ComboBox(); |
| 138 }; | 138 }; |
| 139 #endif | 139 #endif |
| OLD | NEW |