xref: /haiku/src/tests/kits/interface/layout/widget_layout_test/tests/ControlTest.h (revision 68ea01249e1e2088933cb12f9c28d4e5c5d1c9ef)
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_CONTROL_TEST_H
6 #define WIDGET_LAYOUT_TEST_CONTROL_TEST_H
7 
8 
9 #include "Test.h"
10 
11 
12 class BButton;
13 class BControl;
14 class BFont;
15 class LabeledCheckBox;
16 class View;
17 
18 
19 class ControlTest : public Test {
20 public:
21 								ControlTest(const char* name);
22 	virtual						~ControlTest();
23 
24 	virtual	void				SetView(BView* view);
25 
26 	virtual	void				ActivateTest(View* controls);
27 	virtual	void				DectivateTest();
28 
29 	virtual	void				MessageReceived(BMessage* message);
30 
31 protected:
32 			enum {
33 				MSG_CHANGE_CONTROL_TEXT	= 'chct',
34 				MSG_CHANGE_CONTROL_FONT	= 'chcf'
35 			};
36 
37 protected:
38 			void				UpdateControlText();
39 			void				UpdateControlFont();
40 
41 protected:
42 			BControl*			fControl;
43 			LabeledCheckBox*	fLongTextCheckBox;
44 			LabeledCheckBox*	fBigFontCheckBox;
45 			BFont*				fDefaultFont;
46 			BFont*				fBigFont;
47 };
48 
49 
50 #endif	// WIDGET_LAYOUT_TEST_CONTROL_TEST_H
51