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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 gfx::Insets insets_; | 42 gfx::Insets insets_; |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(TextButtonBorder); | 44 DISALLOW_COPY_AND_ASSIGN(TextButtonBorder); |
45 }; | 45 }; |
46 | 46 |
47 | 47 |
48 // A Border subclass that paints a TextButton's background layer -- basically | 48 // A Border subclass that paints a TextButton's background layer -- basically |
49 // the button frame in the hot/pushed states. | 49 // the button frame in the hot/pushed states. |
50 // | 50 // |
51 // Note that this type of button is not focusable by default and will not be | 51 // Note that this type of button is not focusable by default and will not be |
52 // part of the focus chain. Call set_focusable(true) to make it part of the | 52 // part of the focus chain. Call SetFocusable(true) to make it part of the |
53 // focus chain. | 53 // focus chain. |
54 class VIEWS_EXPORT TextButtonDefaultBorder : public TextButtonBorder { | 54 class VIEWS_EXPORT TextButtonDefaultBorder : public TextButtonBorder { |
55 public: | 55 public: |
56 TextButtonDefaultBorder(); | 56 TextButtonDefaultBorder(); |
57 virtual ~TextButtonDefaultBorder(); | 57 virtual ~TextButtonDefaultBorder(); |
58 | 58 |
59 // TextButtonDefaultBorder takes and retains ownership of these |painter|s. | 59 // TextButtonDefaultBorder takes and retains ownership of these |painter|s. |
60 void set_normal_painter(Painter* painter) { normal_painter_.reset(painter); } | 60 void set_normal_painter(Painter* painter) { normal_painter_.reset(painter); } |
61 void set_hot_painter(Painter* painter) { hot_painter_.reset(painter); } | 61 void set_hot_painter(Painter* painter) { hot_painter_.reset(painter); } |
62 void set_pushed_painter(Painter* painter) { pushed_painter_.reset(painter); } | 62 void set_pushed_painter(Painter* painter) { pushed_painter_.reset(painter); } |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 // True if the button should ignore the minimum size for the platform. Default | 381 // True if the button should ignore the minimum size for the platform. Default |
382 // is true. Set to false to prevent narrower buttons. | 382 // is true. Set to false to prevent narrower buttons. |
383 bool ignore_minimum_size_; | 383 bool ignore_minimum_size_; |
384 | 384 |
385 DISALLOW_COPY_AND_ASSIGN(TextButton); | 385 DISALLOW_COPY_AND_ASSIGN(TextButton); |
386 }; | 386 }; |
387 | 387 |
388 } // namespace views | 388 } // namespace views |
389 | 389 |
390 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ | 390 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ |
OLD | NEW |