| 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 12 matching lines...) Expand all Loading... |
| 23 // A Border subclass for TextButtons that allows configurable insets for the | 23 // A Border subclass for TextButtons that allows configurable insets for the |
| 24 // button. | 24 // button. |
| 25 class VIEWS_EXPORT TextButtonBorder : public Border { | 25 class VIEWS_EXPORT TextButtonBorder : public Border { |
| 26 public: | 26 public: |
| 27 TextButtonBorder(); | 27 TextButtonBorder(); |
| 28 virtual ~TextButtonBorder(); | 28 virtual ~TextButtonBorder(); |
| 29 | 29 |
| 30 void SetInsets(const gfx::Insets& insets); | 30 void SetInsets(const gfx::Insets& insets); |
| 31 | 31 |
| 32 // Border: | 32 // Border: |
| 33 virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE; |
| 33 virtual gfx::Insets GetInsets() const OVERRIDE; | 34 virtual gfx::Insets GetInsets() const OVERRIDE; |
| 34 | 35 |
| 35 private: | 36 private: |
| 36 // Border: | 37 // Border: |
| 37 virtual TextButtonBorder* AsTextButtonBorder() OVERRIDE; | 38 virtual TextButtonBorder* AsTextButtonBorder() OVERRIDE; |
| 38 virtual const TextButtonBorder* AsTextButtonBorder() const OVERRIDE; | 39 virtual const TextButtonBorder* AsTextButtonBorder() const OVERRIDE; |
| 39 | 40 |
| 40 gfx::Insets insets_; | 41 gfx::Insets insets_; |
| 41 | 42 |
| 42 DISALLOW_COPY_AND_ASSIGN(TextButtonBorder); | 43 DISALLOW_COPY_AND_ASSIGN(TextButtonBorder); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 // True if the button should ignore the minimum size for the platform. Default | 368 // True if the button should ignore the minimum size for the platform. Default |
| 368 // is true. Set to false to prevent narrower buttons. | 369 // is true. Set to false to prevent narrower buttons. |
| 369 bool ignore_minimum_size_; | 370 bool ignore_minimum_size_; |
| 370 | 371 |
| 371 DISALLOW_COPY_AND_ASSIGN(TextButton); | 372 DISALLOW_COPY_AND_ASSIGN(TextButton); |
| 372 }; | 373 }; |
| 373 | 374 |
| 374 } // namespace views | 375 } // namespace views |
| 375 | 376 |
| 376 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 377 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
| OLD | NEW |