Rename vector icon header files.
[chromium-blink-merge.git] / ui / views / examples / button_example.h
blob566d3f09bf2e085c68902fa462a67ac037688e81
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
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_EXAMPLES_BUTTON_EXAMPLE_H_
6 #define UI_VIEWS_EXAMPLES_BUTTON_EXAMPLE_H_
8 #include "base/macros.h"
9 #include "ui/views/controls/button/button.h"
10 #include "ui/views/examples/example_base.h"
12 namespace views {
14 class ImageButton;
15 class LabelButton;
17 namespace examples {
19 // ButtonExample simply counts the number of clicks.
20 class VIEWS_EXAMPLES_EXPORT ButtonExample : public ExampleBase,
21 public ButtonListener {
22 public:
23 ButtonExample();
24 ~ButtonExample() override;
26 // ExampleBase:
27 void CreateExampleView(View* container) override;
29 private:
30 void LabelButtonPressed(const ui::Event& event);
32 // ButtonListener:
33 void ButtonPressed(Button* sender, const ui::Event& event) override;
35 // Example buttons.
36 LabelButton* label_button_;
37 ImageButton* image_button_;
39 const gfx::ImageSkia* icon_;
41 // The number of times the buttons are pressed.
42 int count_;
44 DISALLOW_COPY_AND_ASSIGN(ButtonExample);
47 } // namespace examples
48 } // namespace views
50 #endif // UI_VIEWS_EXAMPLES_BUTTON_EXAMPLE_H_