#include <CUI_SAXLoader.h>
Public Member Functions | |
CUI_SAXLoader (CUI_UI *ui) | |
constructor | |
~CUI_SAXLoader () | |
destructor | |
virtual void | endDocument () |
Called at the end of the XML document. | |
virtual void | endElement (const XMLCh *const name) |
Called at the end of an element . | |
virtual void | characters (const XMLCh *const chars, const unsigned int length) |
Called when characters exist between and . | |
virtual void | startDocument () |
Called at the beginning of the document. | |
virtual void | startElement (const XMLCh *const name, AttributeList &attributes) |
Called at the beginning of an element . | |
virtual void | warning (const SAXParseException &exception) |
warning exception handler | |
virtual void | error (const SAXParseException &exception) |
error exception handler | |
virtual void | fatalError (const SAXParseException &exception) |
fatal error exception handler | |
Static Public Member Functions | |
char * | BinToChar (const XMLCh *const string) |
convert an XMLCh string to a char *string | |
Private Types | |
typedef std::stack< CUI_SAXElement * > | ELEMSTACK |
type - STL stack of SAX Elements | |
Private Member Functions | |
virtual void | LoadDataRect (CUI_SAXElement *elem) |
virtual void | LoadDataPoint2d (CUI_SAXElement *elem) |
Load a two dimensional point. | |
virtual void | LoadDataState (CUI_SAXElement *elem) |
Load a state. | |
virtual void | LoadDataListItem (CUI_SAXElement *elem, CUI_ListItem *list=NULL) |
Load a list item. | |
virtual void | LoadDataMenuItem (CUI_SAXElement *elem) |
Load a menu item. | |
virtual void | LoadDataRadioItem (CUI_SAXElement *elem) |
Load a radio item. | |
virtual void | LoadResourcePolyBorder (CUI_SAXElement *elem) |
virtual void | LoadResourceCoordSys (CUI_SAXElement *elem) |
Load a coordinate system. | |
virtual void | LoadResourceFBMFont (CUI_SAXElement *elem) |
Load a fixed width bitmap font. | |
virtual void | LoadControlFrame (CUI_SAXElement *elem, CUI_Frame *frame=NULL) |
virtual void | LoadControlDraggableFrame (CUI_SAXElement *elem) |
Load a draggableFrame. | |
virtual void | LoadControlDraggableViewFrame (CUI_SAXElement *elem) |
Load a draggable view Frame. | |
virtual void | LoadControlTextLabel (CUI_SAXElement *elem, CUI_Widget *frame=NULL) |
Load a draggableFrame. | |
virtual void | LoadControlButton (CUI_SAXElement *elem) |
Load a button. | |
virtual void | LoadControlResizeButton (CUI_SAXElement *elem) |
Load a resize button. | |
virtual void | LoadControlProgressBar (CUI_SAXElement *elem, CUI_ProgressBar *frame=NULL) |
Load a progress bar. | |
virtual void | LoadControlSliderBar (CUI_SAXElement *elem) |
Load a slider bar. | |
virtual void | LoadControlTextBox (CUI_SAXElement *elem, CUI_TextBox *frame=NULL) |
Load a text box. | |
virtual void | LoadControlEditTextBox (CUI_SAXElement *elem) |
Load a text box. | |
virtual void | LoadControlListBox (CUI_SAXElement *elem, CUI_ListBox *frame=NULL) |
Load a list box. | |
virtual void | LoadControlComboBox (CUI_SAXElement *elem) |
Load a text box. | |
virtual void | LoadControlMenu (CUI_SAXElement *elem) |
Load a menu. | |
virtual void | LoadControlRadioGroup (CUI_SAXElement *elem) |
Load a radio group. | |
virtual void | LoadControlScrollFrame (CUI_SAXElement *elem) |
Load a scrollable frame. | |
virtual void | LoadControlScrollTextBox (CUI_SAXElement *elem) |
Load a scrollable text box. | |
Private Attributes | |
CUI_UI * | m_ui |
ELEMSTACK | m_elementStack |
stack of frame hierarchy | |
unsigned long | m_warnings |
number of warnings | |
unsigned long | m_errors |
number of errors |
Requires the xerxces-c dll and lots of include files.
See http://xml.apache.org/xerces-c/index.html
GUI Data is stored intnerally in the SAXElement class
GUI Resources are added to the UI in the LoadResourceX functions
GUI Elements are added in endElement
|
convert an XMLCh string to a char *string Function that calls this is responsible for freeing the memory |
|
Called when characters exist between and . if element is a type that accepts characters as text, call SetText |
|
Called at the end of the XML document. Inform the user of any errors |
|
Called at the end of an element . Based on type, add to parent |
|
Load a frame |
|
Load a list box. Needs to add to ui right after being added - otherwise, set* functions won't affect the child elements |
|
Load a rectangle |
|
Load a polygonal border |
|
Called at the beginning of the document. Initialize and clear the stack |
|
Called at the beginning of an element . Create the SAXElement, call the correct LoadX |