2 * Copyright 2006, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Mikael Konradson, mikael.konradson@gmail.com
10 #include "ControlView.h"
12 #include "FontDemoView.h"
15 #include <GroupLayout.h>
18 #undef B_TRANSLATION_CONTEXT
19 #define B_TRANSLATION_CONTEXT "FontDemo"
21 const BString APP_NAME
= B_TRANSLATE_SYSTEM_NAME("FontDemo");
24 : BApplication("application/x-vnd.Haiku-FontDemo")
26 // Create the demo window where we draw the string
27 BWindow
* demoWindow
= new BWindow(BRect(80, 30, 490, 300), APP_NAME
,
28 B_TITLED_WINDOW
, B_ASYNCHRONOUS_CONTROLS
| B_QUIT_ON_WINDOW_CLOSE
);
30 FontDemoView
* demoView
= new FontDemoView(demoWindow
->Bounds());
31 demoWindow
->AddChild(demoView
);
33 BWindow
* controlWindow
= new BWindow(BRect(500, 30, 700, 420), B_TRANSLATE("Controls"),
34 B_FLOATING_WINDOW_LOOK
, B_FLOATING_APP_WINDOW_FEEL
,
35 B_NOT_CLOSABLE
| B_NOT_ZOOMABLE
| B_NOT_RESIZABLE
36 | B_ASYNCHRONOUS_CONTROLS
| B_AUTO_UPDATE_SIZE_LIMITS
);
38 ControlView
* controlView
= new ControlView();
39 controlWindow
->SetLayout(new BGroupLayout(B_VERTICAL
));
40 controlWindow
->AddChild(controlView
);
42 controlView
->SetTarget(demoView
);
45 controlWindow
->Show();
55 FontDemo::ReadyToRun()