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 17 matching lines...) Expand all Loading... |
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 void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE; |
34 virtual gfx::Insets GetInsets() const OVERRIDE; | 34 virtual gfx::Insets GetInsets() const OVERRIDE; |
35 virtual gfx::Size GetMinimumSize() const OVERRIDE; | 35 virtual gfx::Size GetMinimumSize() const OVERRIDE; |
36 | 36 |
37 private: | 37 private: |
38 // Border: | |
39 virtual TextButtonBorder* AsTextButtonBorder() OVERRIDE; | |
40 virtual const TextButtonBorder* AsTextButtonBorder() const OVERRIDE; | |
41 | |
42 gfx::Insets insets_; | 38 gfx::Insets insets_; |
43 | 39 |
44 DISALLOW_COPY_AND_ASSIGN(TextButtonBorder); | 40 DISALLOW_COPY_AND_ASSIGN(TextButtonBorder); |
45 }; | 41 }; |
46 | 42 |
47 | 43 |
48 // A Border subclass that paints a TextButton's background layer -- basically | 44 // A Border subclass that paints a TextButton's background layer -- basically |
49 // the button frame in the hot/pushed states. | 45 // the button frame in the hot/pushed states. |
50 // | 46 // |
51 // Note that this type of button is not focusable by default and will not be | 47 // Note that this type of button is not focusable by default and will not be |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 // True if the icon and the text are aligned along both the left and right | 382 // True if the icon and the text are aligned along both the left and right |
387 // margins of the button. | 383 // margins of the button. |
388 bool full_justification_; | 384 bool full_justification_; |
389 | 385 |
390 DISALLOW_COPY_AND_ASSIGN(TextButton); | 386 DISALLOW_COPY_AND_ASSIGN(TextButton); |
391 }; | 387 }; |
392 | 388 |
393 } // namespace views | 389 } // namespace views |
394 | 390 |
395 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 391 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
OLD | NEW |