| 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 "views/controls/button/button.h" | 10 #include "views/controls/button/button.h" |
| 10 #include "ui/base/animation/animation_delegate.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 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 | 69 |
| 70 // Returns true if the mouse pointer is over this control. Note that this | 70 // Returns true if the mouse pointer is over this control. Note that this |
| 71 // isn't the same as IsHotTracked() because the mouse may be over the control | 71 // isn't the same as IsHotTracked() because the mouse may be over the control |
| 72 // when it's disabled. | 72 // when it's disabled. |
| 73 bool IsMouseHovered() const; | 73 bool IsMouseHovered() const; |
| 74 | 74 |
| 75 // Overridden from View: | 75 // Overridden from View: |
| 76 virtual void SetHotTracked(bool flag) OVERRIDE; | 76 virtual void SetHotTracked(bool flag) OVERRIDE; |
| 77 virtual bool IsHotTracked() const OVERRIDE; | 77 virtual bool IsHotTracked() const OVERRIDE; |
| 78 virtual void SetEnabled(bool enabled) OVERRIDE; | 78 virtual void OnEnabledChanged() OVERRIDE; |
| 79 virtual bool IsEnabled() const OVERRIDE; | 79 virtual bool IsEnabled() const OVERRIDE; |
| 80 virtual std::string GetClassName() const OVERRIDE; | 80 virtual std::string GetClassName() const OVERRIDE; |
| 81 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 81 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; |
| 82 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; | 82 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; |
| 83 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; | 83 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
| 84 virtual void OnMouseCaptureLost() OVERRIDE; | 84 virtual void OnMouseCaptureLost() OVERRIDE; |
| 85 virtual void OnMouseEntered(const MouseEvent& event) OVERRIDE; | 85 virtual void OnMouseEntered(const MouseEvent& event) OVERRIDE; |
| 86 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; | 86 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; |
| 87 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; | 87 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; |
| 88 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; | 88 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; |
| (...skipping 45 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 |