| V_Sim API - Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
ToolOption; ToolOption * tool_option_copy (const ToolOption *from); void tool_option_free (ToolOption *option); const gchar * tool_option_getLabel (ToolOption *option); const gchar * tool_option_getName (ToolOption *option); GType tool_option_getType (ToolOption *option); GValue * tool_option_getValue (ToolOption *option); gchar * tool_option_getValueAndLabel (ToolOption *option); ToolOption * tool_option_new (const gchar *name,const gchar *label,GType g_type);
This wrapper is a simple way to store integers, floating point values or booleans in a table, accessing with a string key and remembering their types.
typedef struct _ToolOption ToolOption;
An opaque structure to store values. It is equivalent to GValue but with a name and a label.
ToolOption * tool_option_copy (const ToolOption *from);
Create a new ToolOption using the values from option from.
|
an existing ToolOption. |
Returns : |
a newly created option, use tool_option_free() to free it. [transfer none]
|
void tool_option_free (ToolOption *option);
Free the memory used by the data.
|
the Option to free. |
const gchar * tool_option_getLabel (ToolOption *option);
Get the label of the option.
|
the Option to get the label of. |
Returns : |
a string owned by V_Sim, should not be freed. |
const gchar * tool_option_getName (ToolOption *option);
Get the name of the option.
|
the Option to get the name of. |
Returns : |
a string owned by V_Sim, should not be freed. |
GType tool_option_getType (ToolOption *option);
Get the type of the option.
|
the Option to get the type of. |
Returns : |
a OptionTypes value. |
GValue * tool_option_getValue (ToolOption *option);
Get the location of the storage for the option.
gchar * tool_option_getValueAndLabel (ToolOption *option);
This method returns a string with the value followed by the label in parenthesis and with Pango markup for smaller font.
|
the Option to get the value from. |
Returns : |
a newly created markup string. |
ToolOption * tool_option_new (const gchar *name,const gchar *label,GType g_type);
Create a new Option using the name as identifier.
|
a string identifying the option ; |
|
a string describing shortly the option (must be in UTF-8). |
|
the type of option to create. |
Returns : |
a newly created option, use tool_option_free() to free it. [transfer none]
|