OLD | NEW |
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_BUTTON_CUSTOM_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
6 #define UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
10 #include "ui/gfx/animation/animation_delegate.h" | 10 #include "ui/gfx/animation/animation_delegate.h" |
11 #include "ui/views/controls/button/button.h" | 11 #include "ui/views/controls/button/button.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 class ThrobAnimation; | 14 class ThrobAnimation; |
15 } | 15 } |
16 | 16 |
17 namespace views { | 17 namespace views { |
18 | 18 |
19 class CustomButtonStateChangedDelegate; | 19 class CustomButtonStateChangedDelegate; |
20 | 20 |
21 // A button with custom rendering. The common base class of ImageButton, | 21 // A button with custom rendering. The common base class of ImageButton and |
22 // LabelButton and TextButton. | 22 // TextButton. |
23 // Note that this type of button is not focusable by default and will not be | 23 // Note that this type of button is not focusable by default and will not be |
24 // part of the focus chain. Call SetFocusable(true) to make it part of the | 24 // part of the focus chain. Call SetFocusable(true) to make it part of the |
25 // focus chain. | 25 // focus chain. |
26 class VIEWS_EXPORT CustomButton : public Button, | 26 class VIEWS_EXPORT CustomButton : public Button, |
27 public gfx::AnimationDelegate { | 27 public gfx::AnimationDelegate { |
28 public: | 28 public: |
29 // The menu button's class name. | 29 // The menu button's class name. |
30 static const char kViewClassName[]; | 30 static const char kViewClassName[]; |
31 | 31 |
32 static const CustomButton* AsCustomButton(const views::View* view); | 32 static const CustomButton* AsCustomButton(const views::View* view); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 protected: | 152 protected: |
153 CustomButtonStateChangedDelegate() {} | 153 CustomButtonStateChangedDelegate() {} |
154 | 154 |
155 private: | 155 private: |
156 DISALLOW_COPY_AND_ASSIGN(CustomButtonStateChangedDelegate); | 156 DISALLOW_COPY_AND_ASSIGN(CustomButtonStateChangedDelegate); |
157 }; | 157 }; |
158 | 158 |
159 } // namespace views | 159 } // namespace views |
160 | 160 |
161 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 161 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
OLD | NEW |