2 * Copyright 2008-2009, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
6 * Clemens Zeidler (haiku@Clemens-Zeidler.de)
10 #include <Application.h>
13 #include <GroupLayout.h>
14 #include <GroupLayoutBuilder.h>
18 #include "TouchpadPrefView.h"
21 class TouchpadPrefWindow
: public BWindow
{
23 TouchpadPrefWindow(BRect frame
, const char* title
, window_type type
,
26 BWindow(frame
, title
, type
, flags
)
30 virtual bool QuitRequested()
32 be_app
->PostMessage(B_QUIT_REQUESTED
);
38 #undef B_TRANSLATION_CONTEXT
39 #define B_TRANSLATION_CONTEXT "TouchpadMain"
43 main(int argc
, char* argv
[])
45 BApplication
* app
= new BApplication("application/x-vnd.Haiku-Touchpad");
47 TouchpadPrefWindow
* window
= new TouchpadPrefWindow(BRect(50, 50, 450, 350),
48 B_TRANSLATE_SYSTEM_NAME("Touchpad"), B_TITLED_WINDOW
,
49 B_NOT_RESIZABLE
| B_NOT_ZOOMABLE
50 | B_ASYNCHRONOUS_CONTROLS
| B_AUTO_UPDATE_SIZE_LIMITS
);
51 window
->SetLayout(new BGroupLayout(B_HORIZONTAL
));
52 window
->AddChild(BGroupLayoutBuilder(B_VERTICAL
, 10)
53 .Add(new TouchpadPrefView())
55 .SetInsets(5, 5, 5, 5)