| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/events/event_constants.h" | 10 #include "ui/events/event_constants.h" |
| 11 #include "ui/gfx/animation/animation_delegate.h" | 11 #include "ui/gfx/animation/animation_delegate.h" |
| 12 #include "ui/gfx/animation/throb_animation.h" | 12 #include "ui/gfx/animation/throb_animation.h" |
| 13 #include "ui/views/animation/ink_drop_host.h" | 13 #include "ui/views/animation/ink_drop_host.h" |
| 14 #include "ui/views/animation/ink_drop_state.h" | 14 #include "ui/views/animation/ink_drop_state.h" |
| 15 #include "ui/views/controls/button/button.h" | 15 #include "ui/views/controls/button/button.h" |
| 16 | 16 |
| 17 namespace views { | 17 namespace views { |
| 18 | 18 |
| 19 class InkDropDelegate; | 19 class InkDropDelegate; |
| 20 | 20 |
| 21 // A button with custom rendering. The base of ImageButton and LabelButton. | 21 // A button with custom rendering. The base of ImageButton and LabelButton. |
| 22 // Note that this type of button is not focusable by default and will not be | 22 // Note that this type of button is not focusable by default and will not be |
| 23 // part of the focus chain. Call SetFocusable(true) to make it part of the | 23 // part of the focus chain, unless in accessibility mode. Call |
| 24 // focus chain. | 24 // SetFocusable(true) to make it part of the focus chain. |
| 25 class VIEWS_EXPORT CustomButton : public Button, | 25 class VIEWS_EXPORT CustomButton : public Button, |
| 26 public gfx::AnimationDelegate, | 26 public gfx::AnimationDelegate, |
| 27 public views::InkDropHost { | 27 public views::InkDropHost { |
| 28 public: | 28 public: |
| 29 // An enum describing the events on which a button should notify its listener. | 29 // An enum describing the events on which a button should notify its listener. |
| 30 enum NotifyAction { | 30 enum NotifyAction { |
| 31 NOTIFY_ON_PRESS, | 31 NOTIFY_ON_PRESS, |
| 32 NOTIFY_ON_RELEASE, | 32 NOTIFY_ON_RELEASE, |
| 33 }; | 33 }; |
| 34 | 34 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // The animation action to trigger on the |ink_drop_delegate_| when the button | 193 // The animation action to trigger on the |ink_drop_delegate_| when the button |
| 194 // is clicked. | 194 // is clicked. |
| 195 InkDropState ink_drop_action_on_click_; | 195 InkDropState ink_drop_action_on_click_; |
| 196 | 196 |
| 197 DISALLOW_COPY_AND_ASSIGN(CustomButton); | 197 DISALLOW_COPY_AND_ASSIGN(CustomButton); |
| 198 }; | 198 }; |
| 199 | 199 |
| 200 } // namespace views | 200 } // namespace views |
| 201 | 201 |
| 202 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 202 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
| OLD | NEW |