| 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_LIGHTWIDGET_CFWL_COMBOBOX_H_ | 7 #ifndef XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_ |
| 8 #define XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_ | 8 #define XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "xfa/fwl/basewidget/ifwl_combobox.h" | 13 #include "xfa/fwl/basewidget/ifwl_combobox.h" |
| 14 #include "xfa/fwl/lightwidget/cfwl_widget.h" | 14 #include "xfa/fwl/lightwidget/cfwl_widget.h" |
| 15 | 15 |
| 16 class CFWL_WidgetProperties; | 16 class CFWL_WidgetProperties; |
| 17 class IFWL_ComboBoxDP; | 17 class IFWL_ComboBoxDP; |
| 18 class CFWL_ComboBoxDP; | 18 class CFWL_ComboBoxDP; |
| 19 class CFWL_ComboBoxItem; | 19 class CFWL_ComboBoxItem; |
| 20 | 20 |
| 21 class CFWL_ComboBox : public CFWL_Widget { | 21 class CFWL_ComboBox : public CFWL_Widget { |
| 22 public: | 22 public: |
| 23 static CFWL_ComboBox* Create(); | 23 static CFWL_ComboBox* Create(); |
| 24 FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = NULL); | 24 FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr); |
| 25 int32_t AddString(const CFX_WideStringC& wsText); | 25 int32_t AddString(const CFX_WideStringC& wsText); |
| 26 int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon); | 26 int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon); |
| 27 bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range. | 27 bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range. |
| 28 void RemoveAll(); | 28 void RemoveAll(); |
| 29 int32_t CountItems(); | 29 int32_t CountItems(); |
| 30 FWL_Error GetTextByIndex(int32_t iIndex, CFX_WideString& wsText); | 30 FWL_Error GetTextByIndex(int32_t iIndex, CFX_WideString& wsText); |
| 31 int32_t GetCurSel(); | 31 int32_t GetCurSel(); |
| 32 FWL_Error SetCurSel(int32_t iSel); | 32 FWL_Error SetCurSel(int32_t iSel); |
| 33 FWL_Error SetEditText(const CFX_WideString& wsText); | 33 FWL_Error SetEditText(const CFX_WideString& wsText); |
| 34 int32_t GetEditTextLength() const; | 34 int32_t GetEditTextLength() const; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 CFX_RectF m_rtItem; | 132 CFX_RectF m_rtItem; |
| 133 uint32_t m_dwStyles; | 133 uint32_t m_dwStyles; |
| 134 CFX_WideString m_wsText; | 134 CFX_WideString m_wsText; |
| 135 CFX_DIBitmap* m_pDIB; | 135 CFX_DIBitmap* m_pDIB; |
| 136 uint32_t m_dwCheckState; | 136 uint32_t m_dwCheckState; |
| 137 CFX_RectF m_rtCheckBox; | 137 CFX_RectF m_rtCheckBox; |
| 138 void* m_pData; | 138 void* m_pData; |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 #endif // XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_ | 141 #endif // XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_ |
| OLD | NEW |