fat: Greatly simplify and clean up dosfs_get_file_map().
[haiku.git] / src / preferences / touchpad / main.cpp
blob4e1027e99b2e550561d23b76909a16c29485a544
1 /*
2 * Copyright 2008-2009, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Clemens Zeidler (haiku@Clemens-Zeidler.de)
7 */
10 #include <Application.h>
11 #include <Window.h>
12 #include <Catalog.h>
13 #include <GroupLayout.h>
14 #include <GroupLayoutBuilder.h>
15 #include <Locale.h>
18 #include "TouchpadPrefView.h"
21 class TouchpadPrefWindow : public BWindow {
22 public:
23 TouchpadPrefWindow(BRect frame, const char* title, window_type type,
24 uint32 flags)
26 BWindow(frame, title, type, flags)
30 virtual bool QuitRequested()
32 be_app->PostMessage(B_QUIT_REQUESTED);
33 return true;
38 #undef B_TRANSLATION_CONTEXT
39 #define B_TRANSLATION_CONTEXT "TouchpadMain"
42 int
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())
54 .End()
55 .SetInsets(5, 5, 5, 5)
57 window->Show();
59 app->Run();
60 delete app;
62 return 0;