diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-02 04:47:36 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-02 04:47:36 +0000 |
commit | a0d0d38b5d45d7be151bad91a2231d3679432d13 (patch) | |
tree | 65866dc75a0ca59d3bd51804db05560e41b9ebf2 /views/controls/combobox/native_combobox_wrapper.h | |
parent | 73c8cb87ca07481b24f7823c1f2f99f0b530ef11 (diff) | |
download | chromium_src-a0d0d38b5d45d7be151bad91a2231d3679432d13.zip chromium_src-a0d0d38b5d45d7be151bad91a2231d3679432d13.tar.gz chromium_src-a0d0d38b5d45d7be151bad91a2231d3679432d13.tar.bz2 |
Make Combobox portable
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/113991
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/combobox/native_combobox_wrapper.h')
-rw-r--r-- | views/controls/combobox/native_combobox_wrapper.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/views/controls/combobox/native_combobox_wrapper.h b/views/controls/combobox/native_combobox_wrapper.h new file mode 100644 index 0000000..27e1c8b --- /dev/null +++ b/views/controls/combobox/native_combobox_wrapper.h @@ -0,0 +1,48 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this +// source code is governed by a BSD-style license that can be found in the +// LICENSE file. + +#ifndef VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WRAPPER_H_ +#define VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WRAPPER_H_ + +namespace gfx{ +class Size; +} + +namespace views { + +class Combobox; +class View; + +class NativeComboboxWrapper { + public: + // Updates the combobox's content from its model. + virtual void UpdateFromModel() = 0; + + // Updates the displayed selected item from the associated Combobox. + virtual void UpdateSelectedItem() = 0; + + // Updates the enabled state of the combobox from the associated view. + virtual void UpdateEnabled() = 0; + + // Gets the selected index. + virtual int GetSelectedItem() const = 0; + + // Returns true if the Combobox dropdown is open. + virtual bool IsDropdownOpen() const = 0; + + // Returns the preferred size of the combobox. + virtual gfx::Size GetPreferredSize() const = 0; + + // Retrieves the views::View that hosts the native control. + virtual View* GetView() = 0; + + // Sets the focus to the button. + virtual void SetFocus() = 0; + + static NativeComboboxWrapper* CreateWrapper(Combobox* combobox); +}; + +} // namespace views + +#endif // VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WRAPPER_H_ |