RaySupreme Script API
 All Data Structures Functions Pages
Public Member Functions
ParameterContainer Class Reference

Public Member Functions

string name (void)
 
bool getCheckBoxParam (string name)
 
void setCheckBoxParam (string name, bool value)
 
string getStringParam (string name)
 
void setStringParam (string name, string value)
 
RgbgetColorParam (string name)
 
void setColorParam (string name, Rgb &value)
 
int getListParam (string name)
 
string getListParamString (string name)
 
void setListParam (string name, int value)
 
int getIntParam (string name, int index=0)
 
void setIntParam (string name, int value, int index=0)
 
void setIntGroupParam (std::string name, int value1, int value2, int value3)
 
float getFloatParam (string name, int index=0)
 
void setFloatParam (string name, float value, int index=0)
 
void setFloatGroupParam (string name, float value1, float value2, float value3)
 
string contents (void)
 
void addGroupBox (string name, string title)
 
void addColorParam (string name, string title, Rgb &rgb)
 
void addIntParam (string name, string title, int value, int min, int max)
 
void addFloatParam (string name, string title, float value, float min, float max)
 
void addListParam (string name, string title, ListParameter &listParameter)
 
void addCheckBoxParam (string name, string title, bool defaultValue)
 
void addStringParam (string name, string title, string defaultValue)
 

Detailed Description

The ParameterContainer class contains a list of Parameters. Parameters are identified by their name, which is used as a unique id to access the different kind of Parameters. You can get a list of available Parameters inside a ParameterContainer through the contents() function.

Member Function Documentation

void ParameterContainer::addCheckBoxParam ( string  name,
string  title,
bool  defaultValue 
)

If the ParameterContainer is editable, add a CheckBox Parameter to it.

Parameters
nameThe name of the Parameter to be added.
titleThe descriptive title of the Parameter.
defaultValueThe default value of the Parameter.
void ParameterContainer::addColorParam ( string  name,
string  title,
Rgb rgb 
)

If the ParameterContainer is editable, add a Color Parameter to it. A Color Parameter allows the user to edit the contents of an RGB class visually.

Parameters
nameThe name of the Parameter to be added.
titleThe descriptive title of the Color Parameter.
rgbThe Rgb value which will be used as the default value for the Parameter.
void ParameterContainer::addFloatParam ( string  name,
string  title,
float  value,
float  min,
float  max 
)

If the ParameterContainer is editable, add a Float Parameter to it.

Parameters
nameThe name of the Parameter to be added.
titleThe descriptive title of the Parameter.
valueThe default value of the Parameter.
minThe minimal value allowed for the Parameter.
maxThe maximum value allowed for the Parameter.
void ParameterContainer::addGroupBox ( string  name,
string  title 
)

If the ParameterContainer is editable, add a GroupBox Parameter to it. A GroupBox is actually not a Parameter per se, but a separator with a title, allowing your to group different sets of parameters together.

Parameters
nameThe name of the Parameter to be added.
titleThe Title of the the GroupBox which will be displayed in the GroupBox header.
void ParameterContainer::addIntParam ( string  name,
string  title,
int  value,
int  min,
int  max 
)

If the ParameterContainer is editable, add an Int Parameter to it.

Parameters
nameThe name of the Parameter to be added.
titleThe descriptive title of the Parameter.
valueThe default value of the Parameter.
minThe minimal value allowed for the Parameter.
maxThe maximum value allowed for the Parameter.
void ParameterContainer::addListParam ( string  name,
string  title,
ListParameter listParameter 
)

If the ParameterContainer is editable, add a List Parameter to it.

Parameters
nameThe name of the Parameter to be added.
titleThe descriptive title of the Parameter.
listParameterThe list of items to be added to the Parameter.
void ParameterContainer::addStringParam ( string  name,
string  title,
string  defaultValue 
)

If the ParameterContainer is editable, add a String Parameter to it.

Parameters
nameThe name of the Parameter to be added.
titleThe descriptive title of the Parameter.
defaultValueThe default value of the Parameter.
string ParameterContainer::contents ( void  )

Returns a string listing the contexts of the ParameterContainer, i.e. each Parameter's name, type and values.

Returns
bool ParameterContainer::getCheckBoxParam ( string  name)

Returns the value of a CheckBox Parameter identified by it's name.

Parameters
nameThe name of the Parameter.
Returns
The Parameter value.
Rgb* ParameterContainer::getColorParam ( string  name)

Returns the value of a Color Parameter.

Parameters
nameThe name of the Parameter.
Returns
The Parameter value.
float ParameterContainer::getFloatParam ( string  name,
int  index = 0 
)

Returns the value of a Float Parameter.

Parameters
nameThe name of the Parameter.
indexThe index of the value to be returned. Float Parameters can have up to 3 values.
Returns
The Parameter value.
int ParameterContainer::getIntParam ( string  name,
int  index = 0 
)

Returns the value of an Int Parameter.

Parameters
nameThe name of the Parameter.
Returns
The Parameter value.

Returns the value of an Int Parameter.

Parameters
nameThe name of the Parameter.
indexThe index of the value to be returned. Int Parameters can have up to 3 values.
Returns
The Parameter value.
int ParameterContainer::getListParam ( string  name)

Returns the current value (index) of a list parameter.

Parameters
nameThe name of the Parameter.
Returns
The index of the currently selected item.
string ParameterContainer::getListParamString ( string  name)

Returns the currently displayed string of a list parameter.

Parameters
nameThe name of the Parameter.
Returns
The string value which is currently displayed for the list paramater.
string ParameterContainer::getStringParam ( string  name)

Returns the value of a String Parameter.

Parameters
nameThe name of the Parameter.
Returns
The Parameter value.
string ParameterContainer::name ( void  )

Returns the name of the ParameterContainer itself.

Returns
The name of the ParameterContainer.
void ParameterContainer::setCheckBoxParam ( string  name,
bool  value 
)

Sets the value of a CheckBox parameter.

Parameters
nameThe name of the Parameter.
valueThe Parameter value to be set.
void ParameterContainer::setColorParam ( string  name,
Rgb value 
)

Sets the value of a Color Parameter.

Parameters
nameThe name of the Parameter.
valueThe Parameter value to be set.
void ParameterContainer::setFloatGroupParam ( string  name,
float  value1,
float  value2,
float  value3 
)

Sets the value of a group of Float parameters directly.

Parameters
nameThe name of the Parameter.
value1The Parameter value to be set for value 1.
value2The Parameter value to be set for value 2.
value3The Parameter value to be set for value 3.
void ParameterContainer::setFloatParam ( string  name,
float  value,
int  index = 0 
)

Sets the value of a Float Parameter.

Parameters
nameThe name of the Parameter.
valueThe Parameter value to be set.
indexThe index of the value to be set. Float Parameters can have up to 3 values.
void ParameterContainer::setIntGroupParam ( std::string  name,
int  value1,
int  value2,
int  value3 
)

Sets the value of a group of Int parameters directly.

Parameters
nameThe name of the Parameter.
value1The Parameter value to be set for value 1.
value2The Parameter value to be set for value 2.
value3The Parameter value to be set for value 3.
void ParameterContainer::setIntParam ( string  name,
int  value,
int  index = 0 
)

Sets the value of an Int parameter.

Parameters
nameThe name of the Parameter.
valueThe Parameter value to be set.

Sets the value of an Int parameter.

Parameters
nameThe name of the Parameter.
valueThe Parameter value to be set.
indexThe index of the value to be set. Int Parameters can have up to 3 values.
void ParameterContainer::setListParam ( string  name,
int  value 
)

Sets the value of a Color parameter.

Parameters
nameThe name of the Parameter.
valueThe Parameter value to be set.
void ParameterContainer::setStringParam ( string  name,
string  value 
)

Sets the value of a String parameter.

Parameters
nameThe name of the Parameter.
valueThe Parameter value to be set.