Chromium Code Reviews| 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 26 matching lines...) Expand all Loading... | |
| 37 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; | 37 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
| 38 virtual void OnMouseCaptureLost() OVERRIDE; | 38 virtual void OnMouseCaptureLost() OVERRIDE; |
| 39 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; | 39 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; |
| 40 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& event) OVERRIDE; | 40 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& event) OVERRIDE; |
| 41 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 41 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 42 | 42 |
| 43 // Overridden from Label: | 43 // Overridden from Label: |
| 44 virtual void SetFont(const gfx::Font& font) OVERRIDE; | 44 virtual void SetFont(const gfx::Font& font) OVERRIDE; |
| 45 | 45 |
| 46 // Set whether the link is enabled. | 46 // Set whether the link is enabled. |
| 47 virtual void SetEnabled(bool f); | 47 virtual void SetEnabled(bool flag) OVERRIDE; |
|
Peter Kasting
2011/04/27 00:22:12
Nit: |flag | is better than |f|. |enabled| might
msw
2011/04/27 01:58:03
I'm following the base definition; I think that's
| |
| 48 | 48 |
| 49 virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type, | 49 virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type, |
| 50 const gfx::Point& p); | 50 const gfx::Point& p) OVERRIDE; |
| 51 | 51 |
| 52 virtual std::string GetClassName() const; | 52 virtual std::string GetClassName() const OVERRIDE; |
| 53 | 53 |
| 54 void SetHighlightedColor(const SkColor& color); | 54 void SetHighlightedColor(const SkColor& color); |
| 55 void SetDisabledColor(const SkColor& color); | 55 void SetDisabledColor(const SkColor& color); |
| 56 void SetNormalColor(const SkColor& color); | 56 void SetNormalColor(const SkColor& color); |
| 57 | 57 |
| 58 // If you'll be displaying the link over some non-system background color, | 58 // If you'll be displaying the link over some non-system background color, |
| 59 // call this with the relevant color and the link will auto-set its colors to | 59 // call this with the relevant color and the link will auto-set its colors to |
| 60 // be readable. | 60 // be readable. |
| 61 void MakeReadableOverBackgroundColor(const SkColor& color); | 61 void MakeReadableOverBackgroundColor(const SkColor& color); |
| 62 | 62 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 84 | 84 |
| 85 // The color when the link is neither highlighted nor disabled. | 85 // The color when the link is neither highlighted nor disabled. |
| 86 SkColor normal_color_; | 86 SkColor normal_color_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(Link); | 88 DISALLOW_COPY_AND_ASSIGN(Link); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 } // namespace views | 91 } // namespace views |
| 92 | 92 |
| 93 #endif // VIEWS_CONTROLS_LINK_H_ | 93 #endif // VIEWS_CONTROLS_LINK_H_ |
| OLD | NEW |