xref: /haiku/src/apps/haikudepot/ui/App.h (revision 529cd177b573aaba391c8adc9c9f5ad76a14bf81)
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 			BRect				_GetNextWindowFrame(bool singlePackageMode);
34 
35 private:
36 			MainWindow*			fMainWindow;
37 			int32				fWindowCount;
38 
39 			BMessage			fSettings;
40 			bool				fSettingsRead;
41 };
42 
43 
44 #endif // APP_H
45