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

Side by Side Diff: ui/views/controls/button/multi_target_button.h

Issue 59383003: Add the button style for combobox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 1 month 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MULTI_TARGET_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_MULTI_TARGET_BUTTON_H_
7
8 #include "ui/views/controls/button/button.h"
9 #include "ui/views/controls/button/button_dropdown.h"
10 #include "ui/views/controls/button/menu_button_listener.h"
11 #include "ui/views/view.h"
12
13 namespace ui {
14 class MenuModel;
15 }
16
17 namespace views {
18
19 class LabelButton;
20 class MenuButton;
21 class MenuDelegate;
22 class MenuRunner;
23
24 // A button with a drop down menu to select other options.
25 class VIEWS_EXPORT MultiTargetButton : public views::View,
26 public views::ButtonListener,
27 public views::MenuButtonListener {
28 public:
29 explicit MultiTargetButton(ui::MenuModel* menu_model);
30
31 virtual ~MultiTargetButton();
32
33 // views::ButtonListener:
34 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
35
36 // views::MenuButtonListener:
37 virtual void OnMenuButtonClicked(View* source, const gfx::Point& point)
38 OVERRIDE;
39
40 private:
41 ui::MenuModel* menu_model_;
42 LabelButton* button_;
43 MenuButton* drop_arrow_button_;
44
45 scoped_ptr<MenuRunner> menu_runner_;
46
47 DISALLOW_COPY_AND_ASSIGN(MultiTargetButton);
48 };
49
50 } // namespace views
51
52 #endif // UI_VIEWS_CONTROLS_BUTTON_MULTI_TARGET_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698