1 /* 2 * Copyright 2013, Stephan Aßmus <superstippi@gmx.de>. 3 * Copyright 2018, 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 private: 40 MainWindow* fMainWindow; 41 int32 fWindowCount; 42 43 BMessage fSettings; 44 bool fSettingsRead; 45 }; 46 47 48 #endif // APP_H 49