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