| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 7 |
| 8 #include "app/gfx/chrome_font.h" | 8 #include "app/gfx/chrome_font.h" |
| 9 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
| 10 #include "views/border.h" | 10 #include "views/border.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 gfx::Size text_size_; | 111 gfx::Size text_size_; |
| 112 | 112 |
| 113 // Track the size of the largest text string seen so far, so that | 113 // Track the size of the largest text string seen so far, so that |
| 114 // changing text_ will not resize the button boundary. | 114 // changing text_ will not resize the button boundary. |
| 115 gfx::Size max_text_size_; | 115 gfx::Size max_text_size_; |
| 116 | 116 |
| 117 // The alignment of the text string within the button. | 117 // The alignment of the text string within the button. |
| 118 TextAlignment alignment_; | 118 TextAlignment alignment_; |
| 119 | 119 |
| 120 // The font used to paint the text. | 120 // The font used to paint the text. |
| 121 ChromeFont font_; | 121 gfx::Font font_; |
| 122 | 122 |
| 123 // Text color. | 123 // Text color. |
| 124 SkColor color_; | 124 SkColor color_; |
| 125 | 125 |
| 126 // An icon displayed with the text. | 126 // An icon displayed with the text. |
| 127 SkBitmap icon_; | 127 SkBitmap icon_; |
| 128 | 128 |
| 129 // The width of the button will never be larger than this value. A value <= 0 | 129 // The width of the button will never be larger than this value. A value <= 0 |
| 130 // indicates the width is not constrained. | 130 // indicates the width is not constrained. |
| 131 int max_width_; | 131 int max_width_; |
| 132 | 132 |
| 133 DISALLOW_EVIL_CONSTRUCTORS(TextButton); | 133 DISALLOW_EVIL_CONSTRUCTORS(TextButton); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace views | 136 } // namespace views |
| 137 | 137 |
| 138 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 138 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
| OLD | NEW |