OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CHECKBOX_H_ | 5 #ifndef VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ |
6 #define VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ | 6 #define VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "views/controls/button/text_button.h" | 11 #include "views/controls/button/text_button.h" |
12 | 12 |
13 namespace views { | 13 namespace views { |
14 | 14 |
15 // A native themed class representing a checkbox. This class does not use | 15 // A native themed class representing a checkbox. This class does not use |
16 // platform specific objects to replicate the native platforms looks and feel. | 16 // platform specific objects to replicate the native platforms looks and feel. |
17 class VIEWS_API Checkbox : public TextButtonBase { | 17 class VIEWS_EXPORT Checkbox : public TextButtonBase { |
18 public: | 18 public: |
19 // The button's class name. | 19 // The button's class name. |
20 static const char kViewClassName[]; | 20 static const char kViewClassName[]; |
21 | 21 |
22 explicit Checkbox(const std::wstring& label); | 22 explicit Checkbox(const std::wstring& label); |
23 virtual ~Checkbox(); | 23 virtual ~Checkbox(); |
24 | 24 |
25 // Sets a listener for this checkbox. Checkboxes aren't required to have them | 25 // Sets a listener for this checkbox. Checkboxes aren't required to have them |
26 // since their state can be read independently of them being toggled. | 26 // since their state can be read independently of them being toggled. |
27 void set_listener(ButtonListener* listener) { listener_ = listener; } | 27 void set_listener(ButtonListener* listener) { listener_ = listener; } |
(...skipping 26 matching lines...) Expand all Loading... |
54 | 54 |
55 // True if the checkbox is checked. | 55 // True if the checkbox is checked. |
56 bool checked_; | 56 bool checked_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(Checkbox); | 58 DISALLOW_COPY_AND_ASSIGN(Checkbox); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace views | 61 } // namespace views |
62 | 62 |
63 #endif // VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ | 63 #endif // VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ |
OLD | NEW |