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
6#include "CheckBoxTest.h"
7
8#include <stdio.h>
9
10#include <CheckBox.h>
11
12#include "GroupView.h"
13
14
15// constructor
16CheckBoxTest::CheckBoxTest()
17	: ControlTest("CheckBox"),
18	  fCheckBox(new BCheckBox(""))
19{
20	SetView(fCheckBox);
21}
22
23
24// destructor
25CheckBoxTest::~CheckBoxTest()
26{
27}
28
29
30// CreateTest
31Test*
32CheckBoxTest::CreateTest()
33{
34	return new CheckBoxTest;
35}
36
37
38// ActivateTest
39void
40CheckBoxTest::ActivateTest(View* controls)
41{
42	// BControl sets its background color to that of its parent in
43	// AttachedToWindow(). Override.
44	rgb_color background = ui_color(B_PANEL_BACKGROUND_COLOR);
45	fControl->SetViewColor(background);
46	fControl->SetLowColor(background);
47
48	GroupView* group = new GroupView(B_VERTICAL);
49	group->SetFrame(controls->Bounds());
50	controls->AddChild(group);
51
52	ControlTest::ActivateTest(group);
53
54	group->AddChild(new Glue());
55}
56
57
58// DectivateTest
59void
60CheckBoxTest::DectivateTest()
61{
62}
63