OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 5 #ifndef VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
6 #define VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 6 #define VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/base/animation/animation_delegate.h" | 9 #include "ui/base/animation/animation_delegate.h" |
10 #include "views/controls/button/button.h" | 10 #include "views/controls/button/button.h" |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 class ThrobAnimation; | 13 class ThrobAnimation; |
14 } | 14 } |
15 | 15 |
16 namespace views { | 16 namespace views { |
17 | 17 |
18 // A button with custom rendering. The common base class of ImageButton and | 18 // A button with custom rendering. The common base class of ImageButton and |
19 // TextButton. | 19 // TextButton. |
20 // Note that this type of button is not focusable by default and will not be | 20 // Note that this type of button is not focusable by default and will not be |
21 // part of the focus chain. Call set_focusable(true) to make it part of the | 21 // part of the focus chain. Call set_focusable(true) to make it part of the |
22 // focus chain. | 22 // focus chain. |
23 class VIEWS_API CustomButton : public Button, | 23 class VIEWS_EXPORT CustomButton : public Button, |
24 public ui::AnimationDelegate { | 24 public ui::AnimationDelegate { |
25 public: | 25 public: |
26 // The menu button's class name. | 26 // The menu button's class name. |
27 static const char kViewClassName[]; | 27 static const char kViewClassName[]; |
28 | 28 |
29 virtual ~CustomButton(); | 29 virtual ~CustomButton(); |
30 | 30 |
31 // Possible states | 31 // Possible states |
32 enum ButtonState { | 32 enum ButtonState { |
33 BS_NORMAL = 0, | 33 BS_NORMAL = 0, |
34 BS_HOT, | 34 BS_HOT, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 // See description above setter. | 135 // See description above setter. |
136 bool request_focus_on_press_; | 136 bool request_focus_on_press_; |
137 | 137 |
138 DISALLOW_COPY_AND_ASSIGN(CustomButton); | 138 DISALLOW_COPY_AND_ASSIGN(CustomButton); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace views | 141 } // namespace views |
142 | 142 |
143 #endif // VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 143 #endif // VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
OLD | NEW |