1bb4632f1SStefano Ceccherini /* 2*dace9eadSlazybullfrog * Copyright 2005-2018, Haiku, Inc. All rights reserved. 3*dace9eadSlazybullfrog * Copyright 2005, Ingo Weinhold, <bonefish@users.sf.net> 4*dace9eadSlazybullfrog * 5bb4632f1SStefano Ceccherini * Distributed under the terms of the MIT License. 6*dace9eadSlazybullfrog * 7*dace9eadSlazybullfrog * Authors: 8*dace9eadSlazybullfrog * Jeremiah Bailey, <jjbailey@gmail.com> 9*dace9eadSlazybullfrog * Ingo Weinhold, <bonefish@users.sf.net> 10bb4632f1SStefano Ceccherini */ 11bb4632f1SStefano Ceccherini 12*dace9eadSlazybullfrog 13bb4632f1SStefano Ceccherini #ifndef ARGUMENTS_H 14bb4632f1SStefano Ceccherini #define ARGUMENTS_H 15bb4632f1SStefano Ceccherini 16bb4632f1SStefano Ceccherini #include <Rect.h> 17bb4632f1SStefano Ceccherini 18bb4632f1SStefano Ceccherini class Arguments { 19bb4632f1SStefano Ceccherini public: 20f7c51167SStefano Ceccherini Arguments(int defaultArgcNum, const char* const* defaultArgv); 21bb4632f1SStefano Ceccherini ~Arguments(); 22bb4632f1SStefano Ceccherini 23bb4632f1SStefano Ceccherini void Parse(int argc, const char* const* argv); 24bb4632f1SStefano Ceccherini Bounds()25bb4632f1SStefano Ceccherini BRect Bounds() const { return fBounds; } Title()26bb4632f1SStefano Ceccherini const char* Title() const { return fTitle; } WorkingDir()27*dace9eadSlazybullfrog const char* WorkingDir() const { return fWorkingDirectory; } StandardShell()28bb4632f1SStefano Ceccherini bool StandardShell() const { return fStandardShell; } FullScreen()29bb4632f1SStefano Ceccherini bool FullScreen() const { return fFullScreen; } UsageRequested()30bb4632f1SStefano Ceccherini bool UsageRequested() const { return fUsageRequested; } 31bb4632f1SStefano Ceccherini void GetShellArguments(int& argc, const char* const*& argv) const; 32bb4632f1SStefano Ceccherini 33bb4632f1SStefano Ceccherini private: 34bb4632f1SStefano Ceccherini void _SetShellArguments(int argc, const char* const* argv); 35bb4632f1SStefano Ceccherini 36bb4632f1SStefano Ceccherini bool fUsageRequested; 37bb4632f1SStefano Ceccherini BRect fBounds; 38bb4632f1SStefano Ceccherini bool fStandardShell; 39bb4632f1SStefano Ceccherini bool fFullScreen; 40bb4632f1SStefano Ceccherini int fShellArgumentCount; 41bb4632f1SStefano Ceccherini const char** fShellArguments; 42bb4632f1SStefano Ceccherini const char* fTitle; 43*dace9eadSlazybullfrog const char* fWorkingDirectory; 44bb4632f1SStefano Ceccherini }; 45bb4632f1SStefano Ceccherini 46bb4632f1SStefano Ceccherini 47bb4632f1SStefano Ceccherini #endif // ARGUMENTS_H 48