| 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_ComboBox::DataProvider { |
| 17 public: | 17 public: |
| 18 explicit CFWL_ComboBox(const IFWL_App* pApp); | 18 explicit CFWL_ComboBox(const IFWL_App* pApp); |
| 19 ~CFWL_ComboBox() override; | 19 ~CFWL_ComboBox() override; |
| 20 | 20 |
| 21 void Initialize(); | 21 void Initialize(); |
| 22 | 22 |
| 23 // IFWL_Widget::DataProvider | |
| 24 void GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption) override; | |
| 25 | |
| 26 // IFWL_ListBox::DataProvider | 23 // IFWL_ListBox::DataProvider |
| 27 int32_t CountItems(const IFWL_Widget* pWidget) const override; | 24 int32_t CountItems(const IFWL_Widget* pWidget) const override; |
| 28 CFWL_ListItem* GetItem(const IFWL_Widget* pWidget, | 25 CFWL_ListItem* GetItem(const IFWL_Widget* pWidget, |
| 29 int32_t nIndex) const override; | 26 int32_t nIndex) const override; |
| 30 int32_t GetItemIndex(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; | 27 int32_t GetItemIndex(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; |
| 31 uint32_t GetItemStyles(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; | 28 uint32_t GetItemStyles(IFWL_Widget* pWidget, CFWL_ListItem* pItem) override; |
| 32 void GetItemText(IFWL_Widget* pWidget, | 29 void GetItemText(IFWL_Widget* pWidget, |
| 33 CFWL_ListItem* pItem, | 30 CFWL_ListItem* pItem, |
| 34 CFX_WideString& wsText) override; | 31 CFX_WideString& wsText) override; |
| 35 void GetItemRect(IFWL_Widget* pWidget, | 32 void GetItemRect(IFWL_Widget* pWidget, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 88 |
| 92 void GetBBox(CFX_RectF& rect); | 89 void GetBBox(CFX_RectF& rect); |
| 93 void EditModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved); | 90 void EditModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved); |
| 94 | 91 |
| 95 private: | 92 private: |
| 96 std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray; | 93 std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray; |
| 97 FX_FLOAT m_fMaxListHeight; | 94 FX_FLOAT m_fMaxListHeight; |
| 98 }; | 95 }; |
| 99 | 96 |
| 100 #endif // XFA_FWL_CORE_CFWL_COMBOBOX_H_ | 97 #endif // XFA_FWL_CORE_CFWL_COMBOBOX_H_ |
| OLD | NEW |