| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
| 6 #define UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 316 |
| 317 void set_icon_text_spacing(int icon_text_spacing) { | 317 void set_icon_text_spacing(int icon_text_spacing) { |
| 318 icon_text_spacing_ = icon_text_spacing; | 318 icon_text_spacing_ = icon_text_spacing; |
| 319 } | 319 } |
| 320 | 320 |
| 321 // Sets the icon. | 321 // Sets the icon. |
| 322 virtual void SetIcon(const gfx::ImageSkia& icon); | 322 virtual void SetIcon(const gfx::ImageSkia& icon); |
| 323 virtual void SetHoverIcon(const gfx::ImageSkia& icon); | 323 virtual void SetHoverIcon(const gfx::ImageSkia& icon); |
| 324 virtual void SetPushedIcon(const gfx::ImageSkia& icon); | 324 virtual void SetPushedIcon(const gfx::ImageSkia& icon); |
| 325 | 325 |
| 326 bool HasIcon() const { return !icon_.empty(); } | 326 bool HasIcon() const { return !icon_.isNull(); } |
| 327 | 327 |
| 328 // Meanings are reversed for right-to-left layouts. | 328 // Meanings are reversed for right-to-left layouts. |
| 329 enum IconPlacement { | 329 enum IconPlacement { |
| 330 ICON_ON_LEFT, | 330 ICON_ON_LEFT, |
| 331 ICON_ON_RIGHT | 331 ICON_ON_RIGHT |
| 332 }; | 332 }; |
| 333 | 333 |
| 334 IconPlacement icon_placement() { return icon_placement_; } | 334 IconPlacement icon_placement() { return icon_placement_; } |
| 335 void set_icon_placement(IconPlacement icon_placement) { | 335 void set_icon_placement(IconPlacement icon_placement) { |
| 336 icon_placement_ = icon_placement; | 336 icon_placement_ = icon_placement; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 // Overridden from TextButton: | 413 // Overridden from TextButton: |
| 414 virtual void GetExtraParams( | 414 virtual void GetExtraParams( |
| 415 ui::NativeTheme::ExtraParams* params) const OVERRIDE; | 415 ui::NativeTheme::ExtraParams* params) const OVERRIDE; |
| 416 | 416 |
| 417 DISALLOW_COPY_AND_ASSIGN(NativeTextButton); | 417 DISALLOW_COPY_AND_ASSIGN(NativeTextButton); |
| 418 }; | 418 }; |
| 419 | 419 |
| 420 } // namespace views | 420 } // namespace views |
| 421 | 421 |
| 422 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 422 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
| OLD | NEW |