xref: /haiku/src/tests/kits/interface/layout/widget_layout_test/CheckBox.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2007, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef WIDGET_LAYOUT_TEST_CHECK_BOX_H
6 #define WIDGET_LAYOUT_TEST_CHECK_BOX_H
7 
8 
9 #include <Invoker.h>
10 
11 #include "AbstractButton.h"
12 #include "GroupView.h"
13 
14 
15 // CheckBox
16 class CheckBox : public AbstractButton {
17 public:
18 								CheckBox(BMessage* message = NULL,
19 									BMessenger target = BMessenger());
20 
21 	virtual	BSize				MinSize();
22 	virtual	BSize				MaxSize();
23 
24 	virtual	void				Draw(BView* container, BRect updateRect);
25 };
26 
27 
28 // LabeledCheckBox
29 class LabeledCheckBox : public GroupView {
30 public:
31 								LabeledCheckBox(const char* label,
32 									BMessage* message = NULL,
33 									BMessenger target = BMessenger());
34 
35 			void				SetTarget(BMessenger messenger);
36 
37 			void				SetSelected(bool selected);
38 			bool				IsSelected() const;
39 
40 private:
41 			CheckBox*			fCheckBox;
42 };
43 
44 
45 #endif	// WIDGET_LAYOUT_TEST_CHECK_BOX_H
46