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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 // Overridden from View: | 346 // Overridden from View: |
347 virtual gfx::Size GetPreferredSize() OVERRIDE; | 347 virtual gfx::Size GetPreferredSize() OVERRIDE; |
348 virtual std::string GetClassName() const OVERRIDE; | 348 virtual std::string GetClassName() const OVERRIDE; |
349 | 349 |
350 // Overridden from TextButtonBase: | 350 // Overridden from TextButtonBase: |
351 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE; | 351 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE; |
352 | 352 |
353 protected: | 353 protected: |
354 SkBitmap icon() const { return icon_; } | 354 SkBitmap icon() const { return icon_; } |
355 | 355 |
356 // Returns the image to paint. This is invoked from paint. | |
357 virtual const SkBitmap& GetImageToPaint() const; | |
358 | |
359 // Overridden from NativeThemeDelegate: | 356 // Overridden from NativeThemeDelegate: |
360 virtual gfx::NativeTheme::Part GetThemePart() const OVERRIDE; | 357 virtual gfx::NativeTheme::Part GetThemePart() const OVERRIDE; |
361 | 358 |
362 // Overridden from TextButtonBase: | 359 // Overridden from TextButtonBase: |
363 virtual void GetExtraParams( | 360 virtual void GetExtraParams( |
364 gfx::NativeTheme::ExtraParams* params) const OVERRIDE; | 361 gfx::NativeTheme::ExtraParams* params) const OVERRIDE; |
365 virtual gfx::Rect GetTextBounds() const OVERRIDE; | 362 virtual gfx::Rect GetTextBounds() const OVERRIDE; |
366 | 363 |
367 private: | 364 private: |
368 // The position of the icon. | 365 // The position of the icon. |
(...skipping 12 matching lines...) Expand all Loading... |
381 | 378 |
382 // Space between icon and text. | 379 // Space between icon and text. |
383 int icon_text_spacing_; | 380 int icon_text_spacing_; |
384 | 381 |
385 DISALLOW_COPY_AND_ASSIGN(TextButton); | 382 DISALLOW_COPY_AND_ASSIGN(TextButton); |
386 }; | 383 }; |
387 | 384 |
388 } // namespace views | 385 } // namespace views |
389 | 386 |
390 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 387 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
OLD | NEW |