GeoGen Development snapshot a3
Functions

ggen_scriptarg.h File Reference

Go to the source code of this file.

Functions

void GGen_AddBoolArg (const GGen_String &name, const GGen_String &label, const GGen_String &description, bool default_value)
void GGen_AddEnumArg (const GGen_String &name, const GGen_String &label, const GGen_String &description, int default_value, const GGen_String &options)
void GGen_AddIntArg (const GGen_String &name, const GGen_String &label, const GGen_String &description, int default_value, int min_value, int max_value, int step_size)
int GGen_GetArgValue (const GGen_String &name)

Detailed Description

Contains functions working with script arguments.


Function Documentation

void GGen_AddBoolArg ( const GGen_String &  name,
const GGen_String &  label,
const GGen_String &  description,
bool  default_value 
)

Defines a new boolean script argument. Can be called only within script header.

Parameters:
nameUnique internal name.
labelLabel (name presented to users).
descriptionDetailed description.
default_valueDefault value.
void GGen_AddEnumArg ( const GGen_String &  name,
const GGen_String &  label,
const GGen_String &  description,
int  default_value,
const GGen_String &  options 
)

Defines a new enumeration script argument. Can be called only within script header.

Parameters:
nameUnique internal name.
labelLabel (name presented to users).
descriptionDetailed description.
default_valueDefault value (index of default option starting at 0).
optionsSemicolon-separated list of options.
void GGen_AddIntArg ( const GGen_String &  name,
const GGen_String &  label,
const GGen_String &  description,
int  default_value,
int  min_value,
int  max_value,
int  step_size 
)

Defines a new integral script argument. Can be called only within script header.

Parameters:
nameUnique internal name.
labelLabel (name presented to users).
descriptionDetailed description.
default_valueDefault value.
min_valueMinimum value.
max_valueMaximum value.
step_sizeStep size (UI only - represents value change for various up/down arrows or sliders). This setting will not be enforced - user can be allowed to manually type in values between steps.
int GGen_GetArgValue ( const GGen_String &  name)

Returns value of one script argument. Can be called only within script body.

Parameters:
nameName of the argument.
Returns:
Value of the argument. Always integral - boolean values are returned as 0/1 and enumeration values as index of the chosen option.