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 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 #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 "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 OnEnabledChanged() OVERRIDE; | 78 virtual void OnEnabledChanged() OVERRIDE; |
79 virtual bool IsEnabled() const OVERRIDE; | |
80 virtual std::string GetClassName() const OVERRIDE; | 79 virtual std::string GetClassName() const OVERRIDE; |
81 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 80 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; |
82 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; | 81 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; |
83 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; | 82 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
84 virtual void OnMouseCaptureLost() OVERRIDE; | 83 virtual void OnMouseCaptureLost() OVERRIDE; |
85 virtual void OnMouseEntered(const MouseEvent& event) OVERRIDE; | 84 virtual void OnMouseEntered(const MouseEvent& event) OVERRIDE; |
86 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; | 85 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; |
87 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; | 86 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; |
88 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; | 87 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; |
89 virtual bool OnKeyReleased(const KeyEvent& event) OVERRIDE; | 88 virtual bool OnKeyReleased(const KeyEvent& event) OVERRIDE; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 139 |
141 // See description above setter. | 140 // See description above setter. |
142 bool request_focus_on_press_; | 141 bool request_focus_on_press_; |
143 | 142 |
144 DISALLOW_COPY_AND_ASSIGN(CustomButton); | 143 DISALLOW_COPY_AND_ASSIGN(CustomButton); |
145 }; | 144 }; |
146 | 145 |
147 } // namespace views | 146 } // namespace views |
148 | 147 |
149 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 148 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
OLD | NEW |