xref: /haiku/src/apps/haikudepot/ui/App.h (revision 9642f7705b27e5c270c15fa526d14e1848c2c27d)
1 /*
2  * Copyright 2013, Stephan Aßmus <superstippi@gmx.de>.
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef APP_H
6 #define APP_H
7 
8 
9 #include <Application.h>
10 
11 
12 class BEntry;
13 class MainWindow;
14 
15 
16 class App : public BApplication {
17 public:
18 								App();
19 	virtual						~App();
20 
21 	virtual	bool				QuitRequested();
22 	virtual	void				ReadyToRun();
23 	virtual	void				MessageReceived(BMessage* message);
24 	virtual void				RefsReceived(BMessage* message);
25 	virtual void				ArgvReceived(int32 argc, char* argv[]);
26 
27 private:
28 			void				_Open(const BEntry& entry);
29 			void				_ShowWindow(MainWindow* window);
30 
31 			bool				_LoadSettings(BMessage& settings);
32 			void				_StoreSettings(const BMessage& windowSettings);
33 
34 			void				_CheckPackageDaemonRuns();
35 			bool				_LaunchPackageDaemon();
36 
37 private:
38 			MainWindow*			fMainWindow;
39 			int32				fWindowCount;
40 
41 			BMessage			fSettings;
42 			bool				fSettingsRead;
43 };
44 
45 
46 #endif // APP_H
47