OLD | NEW |
1 // Copyright (c) 2010 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 |
11 #include "views/controls/label.h" | 11 #include "views/controls/label.h" |
(...skipping 29 matching lines...) Expand all Loading... |
41 Link(); | 41 Link(); |
42 explicit Link(const std::wstring& title); | 42 explicit Link(const std::wstring& title); |
43 virtual ~Link(); | 43 virtual ~Link(); |
44 | 44 |
45 void SetController(LinkController* controller); | 45 void SetController(LinkController* controller); |
46 const LinkController* GetController(); | 46 const LinkController* GetController(); |
47 | 47 |
48 // Overridden from View: | 48 // Overridden from View: |
49 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 49 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; |
50 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; | 50 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; |
51 virtual void OnMouseReleased(const MouseEvent& event, | 51 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
52 bool canceled) OVERRIDE; | 52 virtual void OnMouseCaptureLost() OVERRIDE; |
53 virtual bool OnKeyPressed(const KeyEvent& e) OVERRIDE; | 53 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; |
54 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e) OVERRIDE; | 54 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& event) OVERRIDE; |
55 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 55 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
56 | 56 |
57 // Overridden from Label: | 57 // Overridden from Label: |
58 virtual void SetFont(const gfx::Font& font) OVERRIDE; | 58 virtual void SetFont(const gfx::Font& font) OVERRIDE; |
59 | 59 |
60 // Set whether the link is enabled. | 60 // Set whether the link is enabled. |
61 virtual void SetEnabled(bool f); | 61 virtual void SetEnabled(bool f); |
62 | 62 |
63 virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type, | 63 virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type, |
64 const gfx::Point& p); | 64 const gfx::Point& p); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 // The color when the link is neither highlighted nor disabled. | 99 // The color when the link is neither highlighted nor disabled. |
100 SkColor normal_color_; | 100 SkColor normal_color_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(Link); | 102 DISALLOW_COPY_AND_ASSIGN(Link); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace views | 105 } // namespace views |
106 | 106 |
107 #endif // VIEWS_CONTROLS_LINK_H_ | 107 #endif // VIEWS_CONTROLS_LINK_H_ |
OLD | NEW |