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_BUTTON_TEXT_BUTTON_H_ | 5 #ifndef VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
6 #define VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 6 #define VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 void ClearEmbellishing(); | 181 void ClearEmbellishing(); |
182 | 182 |
183 // Paint the button into the specified canvas. If |mode| is |PB_FOR_DRAG|, the | 183 // Paint the button into the specified canvas. If |mode| is |PB_FOR_DRAG|, the |
184 // function paints a drag image representation into the canvas. | 184 // function paints a drag image representation into the canvas. |
185 enum PaintButtonMode { PB_NORMAL, PB_FOR_DRAG }; | 185 enum PaintButtonMode { PB_NORMAL, PB_FOR_DRAG }; |
186 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode); | 186 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode); |
187 | 187 |
188 // Overridden from View: | 188 // Overridden from View: |
189 virtual gfx::Size GetPreferredSize() OVERRIDE; | 189 virtual gfx::Size GetPreferredSize() OVERRIDE; |
190 virtual gfx::Size GetMinimumSize() OVERRIDE; | 190 virtual gfx::Size GetMinimumSize() OVERRIDE; |
191 virtual void SetEnabled(bool enabled) OVERRIDE; | 191 virtual void OnEnabledChanged() OVERRIDE; |
192 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 192 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
193 | 193 |
194 // Text colors. | 194 // Text colors. |
195 static const SkColor kEnabledColor; | 195 static const SkColor kEnabledColor; |
196 static const SkColor kHighlightColor; | 196 static const SkColor kHighlightColor; |
197 static const SkColor kDisabledColor; | 197 static const SkColor kDisabledColor; |
198 static const SkColor kHoverColor; | 198 static const SkColor kHoverColor; |
199 | 199 |
200 // Returns views/TextButton. | 200 // Returns views/TextButton. |
201 virtual std::string GetClassName() const; | 201 virtual std::string GetClassName() const; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 | 363 |
364 // Space between icon and text. | 364 // Space between icon and text. |
365 int icon_text_spacing_; | 365 int icon_text_spacing_; |
366 | 366 |
367 DISALLOW_COPY_AND_ASSIGN(TextButton); | 367 DISALLOW_COPY_AND_ASSIGN(TextButton); |
368 }; | 368 }; |
369 | 369 |
370 } // namespace views | 370 } // namespace views |
371 | 371 |
372 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 372 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
OLD | NEW |