xref: /haiku/src/tests/kits/interface/layout/widget_layout_test/tests/ButtonTest.cpp (revision 651a825f3e76248ec63b669fd786c022b369fdd8)
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 "ButtonTest.h"
7 
8 #include <stdio.h>
9 
10 #include <Button.h>
11 
12 #include "GroupView.h"
13 
14 
15 // constructor
ButtonTest()16 ButtonTest::ButtonTest()
17 	: ControlTest("Button"),
18 	  fButton(new BButton(""))
19 {
20 	SetView(fButton);
21 }
22 
23 
24 // destructor
~ButtonTest()25 ButtonTest::~ButtonTest()
26 {
27 }
28 
29 
30 // CreateTest
31 Test*
CreateTest()32 ButtonTest::CreateTest()
33 {
34 	return new ButtonTest;
35 }
36 
37 
38 // ActivateTest
39 void
ActivateTest(View * controls)40 ButtonTest::ActivateTest(View* controls)
41 {
42 	GroupView* group = new GroupView(B_VERTICAL);
43 	group->SetFrame(controls->Bounds());
44 	controls->AddChild(group);
45 
46 	ControlTest::ActivateTest(group);
47 
48 	group->AddChild(new Glue());
49 }
50 
51 
52 // DectivateTest
53 void
DectivateTest()54 ButtonTest::DectivateTest()
55 {
56 }
57