| 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_CORE_CFWL_COMBOBOX_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_COMBOBOX_H_ |
| 8 #define XFA_FWL_CORE_CFWL_COMBOBOX_H_ | 8 #define XFA_FWL_CORE_CFWL_COMBOBOX_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "xfa/fwl/core/cfwl_widget.h" | 13 #include "xfa/fwl/core/cfwl_widget.h" |
| 14 #include "xfa/fwl/core/ifwl_combobox.h" | 14 #include "xfa/fwl/core/ifwl_combobox.h" |
| 15 | 15 |
| 16 class CFWL_ComboBox : public CFWL_Widget, public IFWL_ComboBox::DataProvider { | 16 class CFWL_ComboBox : public CFWL_Widget, public IFWL_Widget::DataProvider { |
| 17 public: | 17 public: |
| 18 explicit CFWL_ComboBox(const CFWL_App* pApp); | 18 explicit CFWL_ComboBox(const CFWL_App* pApp); |
| 19 ~CFWL_ComboBox() override; | 19 ~CFWL_ComboBox() override; |
| 20 | 20 |
| 21 void Initialize(); | 21 void Initialize(); |
| 22 | 22 |
| 23 // IFWL_ComboBox::DataProvider | |
| 24 FX_FLOAT GetListHeight(IFWL_Widget* pWidget) override; | |
| 25 | |
| 26 void AddString(const CFX_WideStringC& wsText); | 23 void AddString(const CFX_WideStringC& wsText); |
| 27 bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range. | 24 bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range. |
| 28 void RemoveAll(); | 25 void RemoveAll(); |
| 29 | 26 |
| 30 void GetTextByIndex(int32_t iIndex, CFX_WideString& wsText) const; | 27 void GetTextByIndex(int32_t iIndex, CFX_WideString& wsText) const; |
| 31 int32_t GetCurSel() const; | 28 int32_t GetCurSel() const; |
| 32 void SetCurSel(int32_t iSel); | 29 void SetCurSel(int32_t iSel); |
| 33 | 30 |
| 34 void SetEditText(const CFX_WideString& wsText); | 31 void SetEditText(const CFX_WideString& wsText); |
| 35 void GetEditText(CFX_WideString& wsText, | 32 void GetEditText(CFX_WideString& wsText, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 47 bool EditCanSelectAll(); | 44 bool EditCanSelectAll(); |
| 48 bool EditCopy(CFX_WideString& wsCopy); | 45 bool EditCopy(CFX_WideString& wsCopy); |
| 49 bool EditCut(CFX_WideString& wsCut); | 46 bool EditCut(CFX_WideString& wsCut); |
| 50 bool EditPaste(const CFX_WideString& wsPaste); | 47 bool EditPaste(const CFX_WideString& wsPaste); |
| 51 void EditSelectAll(); | 48 void EditSelectAll(); |
| 52 void EditDelete(); | 49 void EditDelete(); |
| 53 void EditDeSelect(); | 50 void EditDeSelect(); |
| 54 | 51 |
| 55 void GetBBox(CFX_RectF& rect); | 52 void GetBBox(CFX_RectF& rect); |
| 56 void EditModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved); | 53 void EditModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved); |
| 57 | |
| 58 private: | |
| 59 FX_FLOAT m_fMaxListHeight; | |
| 60 }; | 54 }; |
| 61 | 55 |
| 62 #endif // XFA_FWL_CORE_CFWL_COMBOBOX_H_ | 56 #endif // XFA_FWL_CORE_CFWL_COMBOBOX_H_ |
| OLD | NEW |