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

Side by Side Diff: ui/views/controls/prefix_delegate.h

Issue 2289143004: Add ink drop ripple (but no highlight) to comboboxes in harmony. (Closed)
Patch Set: remove explicit and improve combobox example Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/views/controls/menu/submenu_view.cc ('k') | ui/views/controls/prefix_selector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium 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 #ifndef UI_VIEWS_CONTROLS_PREFIX_DELEGATE_H_ 5 #ifndef UI_VIEWS_CONTROLS_PREFIX_DELEGATE_H_
6 #define UI_VIEWS_CONTROLS_PREFIX_DELEGATE_H_ 6 #define UI_VIEWS_CONTROLS_PREFIX_DELEGATE_H_
7 7
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 #include "ui/views/views_export.h"
9 10
10 namespace views { 11 namespace views {
11 12
12 // An interface used to expose lists of items for selection by text input. 13 // An interface used to expose lists of items for selection by text input.
13 class VIEWS_EXPORT PrefixDelegate : public View { 14 class VIEWS_EXPORT PrefixDelegate {
14 public: 15 public:
15 // Returns the total number of selectable items. 16 // Returns the total number of selectable items.
16 virtual int GetRowCount() = 0; 17 virtual int GetRowCount() = 0;
17 18
18 // Returns the row of the currently selected item, or -1 if no item is 19 // Returns the row of the currently selected item, or -1 if no item is
19 // selected. 20 // selected.
20 virtual int GetSelectedRow() = 0; 21 virtual int GetSelectedRow() = 0;
21 22
22 // Sets the selection to the specified row. 23 // Sets the selection to the specified row.
23 virtual void SetSelectedRow(int row) = 0; 24 virtual void SetSelectedRow(int row) = 0;
24 25
25 // Returns the item at the specified row. 26 // Returns the item at the specified row.
26 virtual base::string16 GetTextForRow(int row) = 0; 27 virtual base::string16 GetTextForRow(int row) = 0;
27
28 protected:
29 ~PrefixDelegate() override {}
30 }; 28 };
31 29
32 } // namespace views 30 } // namespace views
33 31
34 #endif // UI_VIEWS_CONTROLS_PREFIX_DELEGATE_H_ 32 #endif // UI_VIEWS_CONTROLS_PREFIX_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/submenu_view.cc ('k') | ui/views/controls/prefix_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698