1 /* 2 * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #ifndef ARGUMENTS_H 7 #define ARGUMENTS_H 8 9 #include <Rect.h> 10 11 class Arguments { 12 public: 13 Arguments(int defaultArgcNum, const char *const *defaultArgv); 14 ~Arguments(); 15 16 void Parse(int argc, const char *const *argv); 17 18 BRect Bounds() const { return fBounds; } 19 const char *Title() const { return fTitle; } 20 bool StandardShell() const { return fStandardShell; } 21 bool FullScreen() const { return fFullScreen; } 22 bool UsageRequested() const { return fUsageRequested; } 23 void GetShellArguments(int &argc, const char *const *&argv) const; 24 25 private: 26 void _SetShellArguments(int argc, const char *const *argv); 27 28 bool fUsageRequested; 29 BRect fBounds; 30 bool fStandardShell; 31 bool fFullScreen; 32 int fShellArgumentCount; 33 const char **fShellArguments; 34 const char *fTitle; 35 }; 36 37 38 #endif // ARGUMENTS_H 39