| Index: ui/views/controls/button/multi_target_button.h
|
| diff --git a/ui/views/controls/button/multi_target_button.h b/ui/views/controls/button/multi_target_button.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bec15083c47944f2df9f0d2206e6cc9b5328160c
|
| --- /dev/null
|
| +++ b/ui/views/controls/button/multi_target_button.h
|
| @@ -0,0 +1,52 @@
|
| +// Copyright 2013 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 UI_VIEWS_CONTROLS_BUTTON_MULTI_TARGET_BUTTON_H_
|
| +#define UI_VIEWS_CONTROLS_BUTTON_MULTI_TARGET_BUTTON_H_
|
| +
|
| +#include "ui/views/controls/button/button.h"
|
| +#include "ui/views/controls/button/button_dropdown.h"
|
| +#include "ui/views/controls/button/menu_button_listener.h"
|
| +#include "ui/views/view.h"
|
| +
|
| +namespace ui {
|
| +class MenuModel;
|
| +}
|
| +
|
| +namespace views {
|
| +
|
| +class LabelButton;
|
| +class MenuButton;
|
| +class MenuDelegate;
|
| +class MenuRunner;
|
| +
|
| +// A button with a drop down menu to select other options.
|
| +class VIEWS_EXPORT MultiTargetButton : public views::View,
|
| + public views::ButtonListener,
|
| + public views::MenuButtonListener {
|
| + public:
|
| + explicit MultiTargetButton(ui::MenuModel* menu_model);
|
| +
|
| + virtual ~MultiTargetButton();
|
| +
|
| + // views::ButtonListener:
|
| + virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
|
| +
|
| + // views::MenuButtonListener:
|
| + virtual void OnMenuButtonClicked(View* source, const gfx::Point& point)
|
| + OVERRIDE;
|
| +
|
| + private:
|
| + ui::MenuModel* menu_model_;
|
| + LabelButton* button_;
|
| + MenuButton* drop_arrow_button_;
|
| +
|
| + scoped_ptr<MenuRunner> menu_runner_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(MultiTargetButton);
|
| +};
|
| +
|
| +} // namespace views
|
| +
|
| +#endif // UI_VIEWS_CONTROLS_BUTTON_MULTI_TARGET_BUTTON_H_
|
|
|