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

Side by Side Diff: ui/views/controls/combobox/combobox.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 | « no previous file | ui/views/controls/combobox/combobox.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_COMBOBOX_COMBOBOX_H_ 5 #ifndef UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_
6 #define UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ 6 #define UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 24 matching lines...) Expand all
35 35
36 // A non-editable combobox (aka a drop-down list or selector). 36 // A non-editable combobox (aka a drop-down list or selector).
37 // Combobox has two distinct parts, the drop down arrow and the text. Combobox 37 // Combobox has two distinct parts, the drop down arrow and the text. Combobox
38 // offers two distinct behaviors: 38 // offers two distinct behaviors:
39 // * STYLE_NORMAL: typical combobox, clicking on the text and/or button shows 39 // * STYLE_NORMAL: typical combobox, clicking on the text and/or button shows
40 // the drop down, arrow keys change selection, selected index can be changed by 40 // the drop down, arrow keys change selection, selected index can be changed by
41 // the user to something other than the first item. 41 // the user to something other than the first item.
42 // * STYLE_ACTION: clicking on the text notifies the listener. The menu can be 42 // * STYLE_ACTION: clicking on the text notifies the listener. The menu can be
43 // shown only by clicking on the arrow. The selected index is always reverted to 43 // shown only by clicking on the arrow. The selected index is always reverted to
44 // 0 after the listener is notified. 44 // 0 after the listener is notified.
45 class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener { 45 class VIEWS_EXPORT Combobox : public View,
46 public PrefixDelegate,
47 public ButtonListener {
46 public: 48 public:
47 // The style of the combobox. 49 // The style of the combobox.
48 enum Style { 50 enum Style {
49 STYLE_NORMAL, 51 STYLE_NORMAL,
50 STYLE_ACTION, 52 STYLE_ACTION,
51 }; 53 };
52 54
53 // The combobox's class name. 55 // The combobox's class name.
54 static const char kViewClassName[]; 56 static const char kViewClassName[];
55 57
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 223
222 // Used for making calbacks. 224 // Used for making calbacks.
223 base::WeakPtrFactory<Combobox> weak_ptr_factory_; 225 base::WeakPtrFactory<Combobox> weak_ptr_factory_;
224 226
225 DISALLOW_COPY_AND_ASSIGN(Combobox); 227 DISALLOW_COPY_AND_ASSIGN(Combobox);
226 }; 228 };
227 229
228 } // namespace views 230 } // namespace views
229 231
230 #endif // UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ 232 #endif // UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698