OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 7 |
8 #include "app/animation.h" | 8 #include "app/animation.h" |
9 #include "views/controls/button/button.h" | 9 #include "views/controls/button/button.h" |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 virtual bool OnMouseDragged(const MouseEvent& e); | 65 virtual bool OnMouseDragged(const MouseEvent& e); |
66 virtual void OnMouseReleased(const MouseEvent& e, bool canceled); | 66 virtual void OnMouseReleased(const MouseEvent& e, bool canceled); |
67 virtual void OnMouseEntered(const MouseEvent& e); | 67 virtual void OnMouseEntered(const MouseEvent& e); |
68 virtual void OnMouseMoved(const MouseEvent& e); | 68 virtual void OnMouseMoved(const MouseEvent& e); |
69 virtual void OnMouseExited(const MouseEvent& e); | 69 virtual void OnMouseExited(const MouseEvent& e); |
70 virtual bool OnKeyPressed(const KeyEvent& e); | 70 virtual bool OnKeyPressed(const KeyEvent& e); |
71 virtual bool OnKeyReleased(const KeyEvent& e); | 71 virtual bool OnKeyReleased(const KeyEvent& e); |
72 virtual void OnDragDone(); | 72 virtual void OnDragDone(); |
73 virtual void ShowContextMenu(int x, int y, bool is_mouse_gesture); | 73 virtual void ShowContextMenu(int x, int y, bool is_mouse_gesture); |
74 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); | 74 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); |
| 75 virtual void SetHotTracked(bool flag); |
| 76 virtual bool IsHotTracked() const; |
| 77 virtual void WillLoseFocus(); |
75 | 78 |
76 // Overridden from AnimationDelegate: | 79 // Overridden from AnimationDelegate: |
77 virtual void AnimationProgressed(const Animation* animation); | 80 virtual void AnimationProgressed(const Animation* animation); |
78 | 81 |
79 // Returns true if the button should become pressed when the user | 82 // Returns true if the button should become pressed when the user |
80 // holds the mouse down over the button. For this implementation, | 83 // holds the mouse down over the button. For this implementation, |
81 // we simply return IsTriggerableEvent(e). | 84 // we simply return IsTriggerableEvent(e). |
82 virtual bool ShouldEnterPushedState(const MouseEvent& e); | 85 virtual bool ShouldEnterPushedState(const MouseEvent& e); |
83 | 86 |
84 // The button state (defined in implementation) | 87 // The button state (defined in implementation) |
(...skipping 16 matching lines...) Expand all Loading... |
101 | 104 |
102 // Mouse event flags which can trigger button actions. | 105 // Mouse event flags which can trigger button actions. |
103 int triggerable_event_flags_; | 106 int triggerable_event_flags_; |
104 | 107 |
105 DISALLOW_COPY_AND_ASSIGN(CustomButton); | 108 DISALLOW_COPY_AND_ASSIGN(CustomButton); |
106 }; | 109 }; |
107 | 110 |
108 } // namespace views | 111 } // namespace views |
109 | 112 |
110 #endif // VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ | 113 #endif // VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ |
OLD | NEW |