BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / launchbox / MainWindow.h
blob50de629b542c6a7ff1583db81bd93d140e31a1fe
1 /*
2 * Copyright 2006-2011, Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5 #ifndef MAIN_WINDOW_H
6 #define MAIN_WINDOW_H
8 #include <Window.h>
11 class PadView;
13 enum {
14 MSG_SHOW_BORDER = 'shbr',
15 MSG_HIDE_BORDER = 'hdbr',
17 MSG_TOGGLE_AUTORAISE = 'tgar',
18 MSG_SHOW_ON_ALL_WORKSPACES = 'awrk',
20 MSG_SET_DESCRIPTION = 'dscr',
22 MSG_ADD_WINDOW = 'addw',
23 MSG_SETTINGS_CHANGED = 'stch',
27 class MainWindow : public BWindow {
28 public:
29 MainWindow(const char* name, BRect frame,
30 bool addDefaultButtons = false);
31 MainWindow(const char* name, BRect frame,
32 BMessage* settings);
33 virtual ~MainWindow();
35 // BWindow interface
36 virtual bool QuitRequested();
37 virtual void MessageReceived(BMessage* message);
39 virtual void Show();
40 virtual void ScreenChanged(BRect frame, color_space format);
41 virtual void WorkspaceActivated(int32 workspace, bool active);
42 virtual void FrameMoved(BPoint origin);
43 virtual void FrameResized(float width, float height);
45 // MainWindow
46 void ToggleAutoRaise();
47 bool AutoRaise() const
48 { return fAutoRaise; }
49 bool ShowOnAllWorkspaces() const
50 { return fShowOnAllWorkspaces; }
52 BPoint ScreenPosition() const
53 { return fScreenPosition; }
55 bool LoadSettings(const BMessage* message);
56 void SaveSettings(BMessage* message);
57 BMessage* Settings() const
58 { return fSettings; }
60 private:
61 void _GetLocation();
62 void _AdjustLocation(BRect frame);
63 void _AddDefaultButtons();
64 void _AddEmptyButtons();
66 void _NotifySettingsChanged();
68 private:
69 BMessage* fSettings;
70 PadView* fPadView;
72 float fBorderDist;
73 BPoint fScreenPosition;
74 // not really the position, 0...1 = left...right
76 bool fAutoRaise;
77 bool fShowOnAllWorkspaces;
80 #endif // MAIN_WINDOW_H