2 * Copyright 2007 Haiku.
3 * Distributed under the terms of the MIT License.
6 * Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
7 * Ryan Leavengood, leavengood@gmail.com
15 #include <StringView.h>
21 All this code is here is just to not have an empty view at
22 Clicking the Calibrate function.
24 All controls in this view needs to be created and placed dynamically according
25 with the Joystick descriptors
28 CalibWin::CalibWin(BRect frame
,const char *title
, window_look look
,
29 window_feel feel
, uint32 flags
, uint32 workspace
)
30 : BWindow(frame
,title
,look
,feel
,flags
,workspace
)
33 fButton12
= new BButton(BRect(213.00,86.00,268.00,105.00),"Button12","Button",NULL
);
34 fButton11
= new BButton(BRect(148.00,88.00,206.00,110.00),"Button11","Button",NULL
);
35 fButton10
= new BButton(BRect(205.00,168.00,260.00,190.00),"Button10","Button",NULL
);
36 fButton9
= new BButton(BRect(213.00,137.00,263.00,163.00),"Button9","Button", NULL
);
37 fButton8
= new BButton(BRect(144.00,173.00,189.00,194.00),"Button8","Button",NULL
);
38 fButton7
= new BButton(BRect(145.00,145.00,193.00,168.00),"Button7","Button",NULL
);
39 fButton6
= new BButton(BRect(217.00,109.00,261.00,131.00),"Button6","Button",NULL
);
40 fButton5
= new BButton(BRect(147.00,116.00,194.00,139.00),"Button5","Button",NULL
);
41 fButton4
= new BButton(BRect(189.00,263.00,271.00,288.00),"Button4","Button",NULL
);
42 fButton3
= new BButton(BRect(17.00,254.00,100.00,284.00),"Button3","Button",NULL
);
44 fStringView9
= new BStringView(BRect(8.00,175.00,116.00,190.00),"StringView9","Text");
45 fStringView8
= new BStringView(BRect(10.00,154.00,112.00,172.00),"StringView8","Text");
46 fStringView7
= new BStringView(BRect(9.00,132.00,116.00,148.00),"StringView7","Text");
47 fStringView6
= new BStringView(BRect(11.00,114.00,120.00,128.00),"StringView6","Text");
48 fStringView5
= new BStringView(BRect(11.00,93.00,121.00,108.00),"StringView5","Text");
49 fStringView4
= new BStringView(BRect(12.00,73.00,121.00,88.00),"StringView4","Text");
50 fStringView3
= new BStringView(BRect(26.00,17.00,258.00,45.00),"StringView3","Text3");
52 fBox
= new BBox(BRect(12.00,7.00,280.00,67.00),"Box1",
53 B_FOLLOW_LEFT
| B_FOLLOW_TOP
,B_WILL_DRAW
| B_NAVIGABLE
, B_FANCY_BORDER
);
55 fView
= new BView(Bounds(),"View3", B_FOLLOW_NONE
,B_WILL_DRAW
);
57 fView
->SetViewUIColor(B_PANEL_BACKGROUND_COLOR
);
60 fBox
->AddChild(fStringView3
);
62 fView
->AddChild(fButton3
);
63 fView
->AddChild(fButton4
);
64 fView
->AddChild(fBox
);
66 fView
->AddChild(fStringView4
);
67 fView
->AddChild(fStringView5
);
68 fView
->AddChild(fStringView6
);
69 fView
->AddChild(fStringView7
);
70 fView
->AddChild(fStringView8
);
71 fView
->AddChild(fStringView9
);
73 fView
->AddChild(fButton5
);
74 fView
->AddChild(fButton6
);
75 fView
->AddChild(fButton7
);
76 fView
->AddChild(fButton8
);
77 fView
->AddChild(fButton9
);
78 fView
->AddChild(fButton10
);
79 fView
->AddChild(fButton11
);
80 fView
->AddChild(fButton12
);
86 void CalibWin::MessageReceived(BMessage
*message
)
91 BWindow::MessageReceived(message
);
97 bool CalibWin::QuitRequested()
99 return BWindow::QuitRequested();