| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 static const char kViewClassName[]; | 320 static const char kViewClassName[]; |
| 321 | 321 |
| 322 TextButton(ButtonListener* listener, const std::wstring& text); | 322 TextButton(ButtonListener* listener, const std::wstring& text); |
| 323 virtual ~TextButton(); | 323 virtual ~TextButton(); |
| 324 | 324 |
| 325 void set_icon_text_spacing(int icon_text_spacing) { | 325 void set_icon_text_spacing(int icon_text_spacing) { |
| 326 icon_text_spacing_ = icon_text_spacing; | 326 icon_text_spacing_ = icon_text_spacing; |
| 327 } | 327 } |
| 328 | 328 |
| 329 // Sets the icon. | 329 // Sets the icon. |
| 330 void SetIcon(const SkBitmap& icon); | 330 virtual void SetIcon(const SkBitmap& icon); |
| 331 void SetHoverIcon(const SkBitmap& icon); | 331 virtual void SetHoverIcon(const SkBitmap& icon); |
| 332 void SetPushedIcon(const SkBitmap& icon); | 332 virtual void SetPushedIcon(const SkBitmap& icon); |
| 333 | 333 |
| 334 bool HasIcon() const { return !icon_.empty(); } | 334 bool HasIcon() const { return !icon_.empty(); } |
| 335 | 335 |
| 336 // Meanings are reversed for right-to-left layouts. | 336 // Meanings are reversed for right-to-left layouts. |
| 337 enum IconPlacement { | 337 enum IconPlacement { |
| 338 ICON_ON_LEFT, | 338 ICON_ON_LEFT, |
| 339 ICON_ON_RIGHT | 339 ICON_ON_RIGHT |
| 340 }; | 340 }; |
| 341 | 341 |
| 342 IconPlacement icon_placement() { return icon_placement_; } | 342 IconPlacement icon_placement() { return icon_placement_; } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 // Overridden from TextButton: | 421 // Overridden from TextButton: |
| 422 virtual void GetExtraParams( | 422 virtual void GetExtraParams( |
| 423 gfx::NativeTheme::ExtraParams* params) const OVERRIDE; | 423 gfx::NativeTheme::ExtraParams* params) const OVERRIDE; |
| 424 | 424 |
| 425 DISALLOW_COPY_AND_ASSIGN(NativeTextButton); | 425 DISALLOW_COPY_AND_ASSIGN(NativeTextButton); |
| 426 }; | 426 }; |
| 427 | 427 |
| 428 } // namespace views | 428 } // namespace views |
| 429 | 429 |
| 430 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 430 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
| OLD | NEW |