Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: views/controls/listbox/native_listbox_wrapper.h

Issue 2815034: Win: Add listbox view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/listbox/native_listbox_win.cc ('k') | views/controls/tabbed_pane/native_tabbed_pane_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/listbox/native_listbox_wrapper.h
===================================================================
--- views/controls/listbox/native_listbox_wrapper.h (revision 0)
+++ views/controls/listbox/native_listbox_wrapper.h (revision 0)
@@ -0,0 +1,39 @@
+// Copyright (c) 2010 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_LISTBOX_NATIVE_LISTBOX_WRAPPER_H_
+#define VIEWS_CONTROLS_LISTBOX_NATIVE_LISTBOX_WRAPPER_H_
+
+#include "gfx/native_widget_types.h"
+#include "gfx/rect.h"
+#include "views/controls/listbox/listbox.h"
+
+namespace views {
+
+// An interface implemented by an object that provides a platform-native
+// listbox.
+class NativeListboxWrapper {
+ public:
+ // Returns the number of rows in the table.
+ virtual int GetRowCount() const = 0;
+
+ // Returns the 0-based index of the currently selected row.
+ virtual int SelectedRow() const = 0;
+
+ // Selects the specified row, making sure it's visible.
+ virtual void SelectRow(int row) = 0;
+
+ // Retrieves the views::View that hosts the native control.
+ virtual View* GetView() = 0;
+
+ // Creates an appropriate NativeListboxWrapper for the platform.
+ static NativeListboxWrapper* CreateNativeWrapper(
+ Listbox* listbox,
+ const std::vector<string16>& strings,
+ Listbox::Listener* listener);
+};
+
+} // namespace views
+
+#endif // VIEWS_CONTROLS_LISTBOX_NATIVE_LISTBOX_WRAPPER_H_
Property changes on: views\controls\listbox\native_listbox_wrapper.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « views/controls/listbox/native_listbox_win.cc ('k') | views/controls/tabbed_pane/native_tabbed_pane_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698