Chromium Code Reviews| 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_CHECKBOX_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ |
| 6 #define UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "ui/views/controls/button/text_button.h" | 12 #include "ui/views/controls/button/text_button.h" |
| 13 | 13 |
| 14 namespace views { | 14 namespace views { |
| 15 | 15 |
| 16 // A border with zero left inset. | 16 // A border with zero left inset. |
| 17 class VIEWS_EXPORT CheckboxNativeThemeBorder | 17 class VIEWS_EXPORT CheckboxNativeThemeBorder |
| 18 : public TextButtonNativeThemeBorder { | 18 : public TextButtonNativeThemeBorder { |
| 19 public: | 19 public: |
| 20 explicit CheckboxNativeThemeBorder(views::NativeThemeDelegate* delegate) | 20 explicit CheckboxNativeThemeBorder(views::NativeThemeDelegate* delegate) |
| 21 : TextButtonNativeThemeBorder(delegate) {} | 21 : TextButtonNativeThemeBorder(delegate), use_custom_insets_(false) {} |
|
sky
2013/04/05 21:10:00
nit: since the constructor wrapped wrap this to th
Dan Beam
2013/04/05 21:57:45
Done.
| |
| 22 virtual ~CheckboxNativeThemeBorder() {} | 22 virtual ~CheckboxNativeThemeBorder() {} |
| 23 | 23 |
| 24 // The insets apply to the whole view (checkbox + text), not just the square | 24 // The insets apply to the whole view (checkbox + text), not just the square |
| 25 // with the checkmark in it. The insets do not visibly affect the checkbox, | 25 // with the checkmark in it. The insets do not visibly affect the checkbox, |
| 26 // except to ensure that there is enough padding between this and other | 26 // except to ensure that there is enough padding between this and other |
| 27 // elements. | 27 // elements. |
| 28 virtual gfx::Insets GetInsets() const OVERRIDE; | 28 virtual gfx::Insets GetInsets() const OVERRIDE; |
| 29 | 29 |
| 30 // Use the |custom_insets_| provided instead of those from the theme. | 30 // Use the |custom_insets_| provided instead of those from the theme. |
| 31 void SetCustomInsets(const gfx::Insets& custom_insets); | 31 void SetCustomInsets(const gfx::Insets& custom_insets); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 | 80 |
| 81 // True if the checkbox is checked. | 81 // True if the checkbox is checked. |
| 82 bool checked_; | 82 bool checked_; |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(Checkbox); | 84 DISALLOW_COPY_AND_ASSIGN(Checkbox); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace views | 87 } // namespace views |
| 88 | 88 |
| 89 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ | 89 #endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ |
| OLD | NEW |