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_LINK_H_ | 5 #ifndef VIEWS_CONTROLS_LINK_H_ |
6 #define VIEWS_CONTROLS_LINK_H_ | 6 #define VIEWS_CONTROLS_LINK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 explicit Link(const std::wstring& title); | 28 explicit Link(const std::wstring& title); |
29 virtual ~Link(); | 29 virtual ~Link(); |
30 | 30 |
31 const LinkListener* listener() { return listener_; } | 31 const LinkListener* listener() { return listener_; } |
32 void set_listener(LinkListener* listener) { listener_ = listener; } | 32 void set_listener(LinkListener* listener) { listener_ = listener; } |
33 | 33 |
34 // Overridden from View: | 34 // Overridden from View: |
35 virtual void OnEnabledChanged() OVERRIDE; | 35 virtual void OnEnabledChanged() OVERRIDE; |
36 virtual std::string GetClassName() const OVERRIDE; | 36 virtual std::string GetClassName() const OVERRIDE; |
37 virtual gfx::NativeCursor GetCursor(const MouseEvent& event) OVERRIDE; | 37 virtual gfx::NativeCursor GetCursor(const MouseEvent& event) OVERRIDE; |
| 38 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; |
38 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 39 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; |
39 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; | 40 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; |
40 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; | 41 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
41 virtual void OnMouseCaptureLost() OVERRIDE; | 42 virtual void OnMouseCaptureLost() OVERRIDE; |
42 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; | 43 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; |
43 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& event) OVERRIDE; | 44 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& event) OVERRIDE; |
44 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 45 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
45 | 46 |
46 // Overridden from Label: | 47 // Overridden from Label: |
47 virtual void SetFont(const gfx::Font& font) OVERRIDE; | 48 virtual void SetFont(const gfx::Font& font) OVERRIDE; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 80 |
80 // The color when the link is neither highlighted nor disabled. | 81 // The color when the link is neither highlighted nor disabled. |
81 SkColor normal_color_; | 82 SkColor normal_color_; |
82 | 83 |
83 DISALLOW_COPY_AND_ASSIGN(Link); | 84 DISALLOW_COPY_AND_ASSIGN(Link); |
84 }; | 85 }; |
85 | 86 |
86 } // namespace views | 87 } // namespace views |
87 | 88 |
88 #endif // VIEWS_CONTROLS_LINK_H_ | 89 #endif // VIEWS_CONTROLS_LINK_H_ |
OLD | NEW |