Class used to pass data back and forth between programs and MGUI::DLG_XML and MGUI::LAYOUT_PANE_XML. More...
#include <mgui/xmldata.h>

Public Types | |
| enum | PROPERTY { PROPERTY_Value = 0, PROPERTY_Min, PROPERTY_Max } |
Public Member Functions | |
| XMLFORM_DATA (const XMLFORM_DATA &) | |
| XMLFORM_DATA (const XMLNODE *InitialValues) | |
| XMLFORM_DATA () | |
| XMLNODE * | GetRecordNode () const |
| bool | GetValue (const char *id, COLOR &value) const |
| bool | GetValue (const char *id, bool &value) const |
| bool | GetValue (const char *id, INT32 &value, XMLFORM_DATA::PROPERTY property=PROPERTY_Value) const |
| bool | GetValue (const char *id, double &value, XMLFORM_DATA::PROPERTY property=PROPERTY_Value) const |
| bool | GetValue (const char *id, MISTRING &value) const |
| void | SetValue (const char *id, const COLOR &value) |
| void | SetValue (const char *id, bool value) |
| void | SetValue (const char *id, double value, XMLFORM_DATA::PROPERTY property=PROPERTY_Value) |
| void | SetValue (const char *id, const MISTRING &value) |
Class used to pass data back and forth between programs and MGUI::DLG_XML and MGUI::LAYOUT_PANE_XML.
The actual form data is stored in an XML document which looks something like this...
<?xml version="1.0" encoding="utf-8"?> <struct> <member id="FirstName">John</member> <member id="LastName">Doe</member> <member id="Age" value="45"/> </struct>
Although I may settle on placing the value always in a "value" attribute instead of as the content of the <member> tag, or always in the contents of the member tag as a CDATA section
Data storage:
Toggle Buttons: Toggle buttons are treated as numeric fields with 1 or 0 as the only possible values. You can use the XMLNODE Get/Set property methods which take and return bool to retrieve this.
| MGUI::XMLFORM_DATA::XMLFORM_DATA | ( | ) |
Default constructor.
| MGUI::XMLFORM_DATA::XMLFORM_DATA | ( | const XMLNODE * | InitialValues | ) |
Constructor.
Copies initial values from the given node
| MGUI::XMLFORM_DATA::XMLFORM_DATA | ( | const XMLFORM_DATA & | ) |
Copy constructor.
| XMLNODE* MGUI::XMLFORM_DATA::GetRecordNode | ( | ) | const [inline] |
Returns the main record node.
| bool MGUI::XMLFORM_DATA::GetValue | ( | const char * | id, | |
| COLOR & | value | |||
| ) | const |
Retrieve the value of a single control (INT32).
| id | ID of the control to get value of | |
| value | Value returned |
| bool MGUI::XMLFORM_DATA::GetValue | ( | const char * | id, | |
| bool & | value | |||
| ) | const |
Retrieve the value of a single control (INT32).
| id | ID of the control to get value of | |
| value | Value returned |
| bool MGUI::XMLFORM_DATA::GetValue | ( | const char * | id, | |
| INT32 & | value, | |||
| XMLFORM_DATA::PROPERTY | property = PROPERTY_Value | |||
| ) | const |
Retrieve the value of a single control (INT32) Some controls have more than one value.
For example, a range control would have a PROPERTY_Min and a PROPERTY_Max. Currently, only numeric controls can have more than one property
| id | ID of the control to get value of | |
| value | Value returned |
| bool MGUI::XMLFORM_DATA::GetValue | ( | const char * | id, | |
| double & | value, | |||
| XMLFORM_DATA::PROPERTY | property = PROPERTY_Value | |||
| ) | const |
Retrieve the value of a single control (double) Some controls have more than one value.
For example, a range control would have a PROPERTY_Min and a PROPERTY_Max. Currently, only numeric controls can have more than one property
| id | ID of the control to get value of | |
| value | Value returned |
| bool MGUI::XMLFORM_DATA::GetValue | ( | const char * | id, | |
| MISTRING & | value | |||
| ) | const |
Retrieve the value of a single control (MISTRING) Always stores strings as the <member> tag's contents.
| id | ID of the control to get value of | |
| value | Value returned |
| void MGUI::XMLFORM_DATA::SetValue | ( | const char * | id, | |
| const COLOR & | value | |||
| ) |
Set the value of a single control (COLOR).
| id | ID of the control to get value of | |
| value | value to set |
| void MGUI::XMLFORM_DATA::SetValue | ( | const char * | id, | |
| bool | value | |||
| ) |
Set the value of a single control (bool).
| id | ID of the control to get value of | |
| value | Value to set |
| void MGUI::XMLFORM_DATA::SetValue | ( | const char * | id, | |
| double | value, | |||
| XMLFORM_DATA::PROPERTY | property = PROPERTY_Value | |||
| ) |
Set the value of a single control (double).
| id | ID of the control to get value of | |
| value | Value to set |
| void MGUI::XMLFORM_DATA::SetValue | ( | const char * | id, | |
| const MISTRING & | value | |||
| ) |
Set the value of a single control (MISTRING).
| id | ID of the control to get value of | |
| value | Value to set |
1.6.1