libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / apps / fontdemo / FontDemo.cpp
blob4a81307341a0b2890ae616ad40a0375e1bdca02c
1 /*
2 * Copyright 2006, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Mikael Konradson, mikael.konradson@gmail.com
7 */
10 #include "ControlView.h"
11 #include "FontDemo.h"
12 #include "FontDemoView.h"
14 #include <Catalog.h>
15 #include <GroupLayout.h>
16 #include <Window.h>
18 #undef B_TRANSLATION_CONTEXT
19 #define B_TRANSLATION_CONTEXT "FontDemo"
21 const BString APP_NAME = B_TRANSLATE_SYSTEM_NAME("FontDemo");
23 FontDemo::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);
44 demoWindow->Show();
45 controlWindow->Show();
49 FontDemo::~FontDemo()
54 void
55 FontDemo::ReadyToRun()
61 // #pragma mark -
64 int
65 main()
67 FontDemo fontdemo;
68 fontdemo.Run();
69 return 0;