Added help support for display help on screen to osgProducer::Viewer.
This commit is contained in:
@@ -34,6 +34,13 @@ class SG_EXPORT ApplicationUsage
|
||||
|
||||
typedef std::map<std::string,std::string> UsageMap;
|
||||
|
||||
|
||||
void setApplicatonName(const std::string& name) { _applicationName = name; }
|
||||
const std::string& getApplicatonName() const { return _applicationName; }
|
||||
|
||||
void setDescription(const std::string& desc) { _description = desc; }
|
||||
const std::string& getDescription() const { return _description; }
|
||||
|
||||
enum Type
|
||||
{
|
||||
COMMAND_LINE_OPTION,
|
||||
@@ -63,13 +70,16 @@ class SG_EXPORT ApplicationUsage
|
||||
const UsageMap& getKeyboardMouseBindings() const { return _keyboardMouse; }
|
||||
|
||||
|
||||
void getFormatedString(std::string& str, const UsageMap& um,unsigned int widthOfOutput=80);
|
||||
|
||||
void write(std::ostream& output,const UsageMap& um,unsigned int widthOfOutput=80);
|
||||
|
||||
void write(std::ostream& output,unsigned int widthOfOutput=80);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
std::string _applicationName;
|
||||
std::string _description;
|
||||
std::string _commandLineUsage;
|
||||
UsageMap _commandLineOptions;
|
||||
UsageMap _environmentalVariables;
|
||||
|
||||
@@ -27,6 +27,13 @@ class SG_EXPORT Viewport : public StateAttribute
|
||||
|
||||
|
||||
Viewport();
|
||||
|
||||
Viewport(int x,int y,int width,int height):
|
||||
_x(x),
|
||||
_y(y),
|
||||
_width(width),
|
||||
_height(height) {}
|
||||
|
||||
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||
Viewport(const Viewport& vp,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
|
||||
|
||||
Reference in New Issue
Block a user