OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. |
| 4 |
| 5 #ifndef VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WRAPPER_H_ |
| 6 #define VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WRAPPER_H_ |
| 7 |
| 8 namespace gfx{ |
| 9 class Size; |
| 10 } |
| 11 |
| 12 namespace views { |
| 13 |
| 14 class Combobox; |
| 15 class View; |
| 16 |
| 17 class NativeComboboxWrapper { |
| 18 public: |
| 19 // Updates the combobox's content from its model. |
| 20 virtual void UpdateFromModel() = 0; |
| 21 |
| 22 // Updates the displayed selected item from the associated Combobox. |
| 23 virtual void UpdateSelectedItem() = 0; |
| 24 |
| 25 // Updates the enabled state of the combobox from the associated view. |
| 26 virtual void UpdateEnabled() = 0; |
| 27 |
| 28 // Gets the selected index. |
| 29 virtual int GetSelectedItem() const = 0; |
| 30 |
| 31 // Returns true if the Combobox dropdown is open. |
| 32 virtual bool IsDropdownOpen() const = 0; |
| 33 |
| 34 // Returns the preferred size of the combobox. |
| 35 virtual gfx::Size GetPreferredSize() const = 0; |
| 36 |
| 37 // Retrieves the views::View that hosts the native control. |
| 38 virtual View* GetView() = 0; |
| 39 |
| 40 // Sets the focus to the button. |
| 41 virtual void SetFocus() = 0; |
| 42 |
| 43 static NativeComboboxWrapper* CreateWrapper(Combobox* combobox); |
| 44 }; |
| 45 |
| 46 } // namespace views |
| 47 |
| 48 #endif // VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WRAPPER_H_ |
OLD | NEW |