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 void _CheckPackageDaemonRuns(); 36 bool _LaunchPackageDaemon(); 37 38 private: 39 MainWindow* fMainWindow; 40 int32 fWindowCount; 41 42 BMessage fSettings; 43 bool fSettingsRead; 44 }; 45 46 47 #endif // APP_H 48