MGUI::DLG_XML Class Reference

#include <mgui/xmldlg.h>

Inheritance diagram for MGUI::DLG_XML:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DLG_XML ()
virtual ~DLG_XML ()
bool GetCtrlByID (const MIUNICODE *id, MGUI::FORM_EDIT_RANGE *&ctrl) const
bool GetCtrlByID (const MIUNICODE *id, MGUI::CTRL_EDIT_NUMBER *&ctrl) const
bool GetCtrlByID (const MIUNICODE *id, MGUI::CTRL_EDIT_STRING *&ctrl) const
bool GetCtrlByID (const MIUNICODE *id, MGUI::CTRL_TOGGLEBUTTON *&ctrl) const
bool GetCtrlByID (const MIUNICODE *id, MGUI::CTRL_PUSHBUTTON *&ctrl) const
bool GetCtrlByID (const MIUNICODE *id, MGUI::CTRL_GROUPBOX *&ctrl) const
bool GetCtrlByID (const MIUNICODE *id, MGUI::CTRL_LABEL *&ctrl) const
MGUI::FORMGetCtrlByID (const MIUNICODE *id) const
MGUI::LAYOUT_PANE_BASEGetPaneByID (const MIUNICODE *id) const
ERRVALUE GetValues (MGUI::XMLFORM_DATA &values) const
ERRVALUE SetValues (const MGUI::XMLFORM_DATA &values)
ERRVALUE SetXMLNode (const XMLNODE *xmlnode, SML::CONTEXT *context=0)

Protected Member Functions

GUIXMLPRIVDATA * GetPriv () const
virtual ERRVALUE v_CreateContent ()
virtual void v_OnApply ()
virtual void v_OnCancel ()
virtual void v_OnClose ()
virtual void v_OnCloseRequest ()
virtual void v_OnDestroy ()
virtual void v_OnOK ()
virtual void v_OnOpen ()

Constructor & Destructor Documentation

MGUI::DLG_XML::DLG_XML (  ) 
virtual MGUI::DLG_XML::~DLG_XML (  )  [virtual]

Member Function Documentation

bool MGUI::DLG_XML::GetCtrlByID ( const MIUNICODE id,
MGUI::FORM_EDIT_RANGE *&  ctrl 
) const

Get a control by it's XML id attribute.

Returns true if there was such a control, false if not. Also returns false if there was a control with the given id but was not of the requested type.

bool MGUI::DLG_XML::GetCtrlByID ( const MIUNICODE id,
MGUI::CTRL_EDIT_NUMBER *&  ctrl 
) const

Get a control by it's XML id attribute.

Returns true if there was such a control, false if not. Also returns false if there was a control with the given id but was not of the requested type.

bool MGUI::DLG_XML::GetCtrlByID ( const MIUNICODE id,
MGUI::CTRL_EDIT_STRING *&  ctrl 
) const

Get a control by it's XML id attribute.

Returns true if there was such a control, false if not. Also returns false if there was a control with the given id but was not of the requested type.

bool MGUI::DLG_XML::GetCtrlByID ( const MIUNICODE id,
MGUI::CTRL_TOGGLEBUTTON *&  ctrl 
) const

Get a control by it's XML id attribute.

Returns true if there was such a control, false if not. Also returns false if there was a control with the given id but was not of the requested type.

bool MGUI::DLG_XML::GetCtrlByID ( const MIUNICODE id,
MGUI::CTRL_PUSHBUTTON *&  ctrl 
) const

Get a control by it's XML id attribute.

Returns true if there was such a control, false if not. Also returns false if there was a control with the given id but was not of the requested type.

bool MGUI::DLG_XML::GetCtrlByID ( const MIUNICODE id,
MGUI::CTRL_GROUPBOX *&  ctrl 
) const

Get a control by it's XML id attribute.

Returns true if there was such a control, false if not. Also returns false if there was a control with the given id but was not of the requested type.

bool MGUI::DLG_XML::GetCtrlByID ( const MIUNICODE id,
MGUI::CTRL_LABEL *&  ctrl 
) const

Get a control by it's XML id attribute.

Returns true if there was such a control, false if not. Also returns false if there was a control with the given id but was not of the requested type.

MGUI::FORM* MGUI::DLG_XML::GetCtrlByID ( const MIUNICODE id  )  const

Get a control by it's XML id attribute.

This version just returns a pointer to an MGUI::FORM. This should only be used in cases where you don't really care what the control type is. If you expect the control to be of a specific type, use the override that takes a referenct to a pointer.

Returns:
NULL if there was no such control.
MGUI::LAYOUT_PANE_BASE* MGUI::DLG_XML::GetPaneByID ( const MIUNICODE id  )  const

Get a pane by it's XML id attribute.

Returns:
NULL if there was no such pane.
GUIXMLPRIVDATA* MGUI::DLG_XML::GetPriv (  )  const [inline, protected]
ERRVALUE MGUI::DLG_XML::GetValues ( MGUI::XMLFORM_DATA values  )  const

Get the current values of the controls.

Controls with no id attribute are ignored

ERRVALUE MGUI::DLG_XML::SetValues ( const MGUI::XMLFORM_DATA values  ) 

Get the current values of the controls.

Controls with no id attribute are ignored

ERRVALUE MGUI::DLG_XML::SetXMLNode ( const XMLNODE xmlnode,
SML::CONTEXT context = 0 
)

Create a layout from a <form> in an XML document.

Parameters:
xmlnode XML document node describing the dialog
context Context to use if being created from SML
virtual ERRVALUE MGUI::DLG_XML::v_CreateContent (  )  [protected, virtual]

Create dialog shell contents.

Derived class MUST implement this. Function must return 0 for success or an error code. This will be called by the dialog creation code and must not be called directly. This is normally overridden only by the specific dialog implementation and not by the code that actually uses that dialog implementation. Implementation should call GetMainForm() or GetMainPane() to determine the form or pane to create the controls in. Note that you cannot override the dialog title in v_CreateContent, title must be set first. This function should not open another dialog, modal or non-modal.

Implements MGUI::DLGSHELL.

virtual void MGUI::DLG_XML::v_OnApply (  )  [protected, virtual]

Creates the body from the form contents.

Reimplemented from MGUI::DLGSHELL.

virtual void MGUI::DLG_XML::v_OnCancel (  )  [protected, virtual]

Called when 'Cancel' button is pressed.

Derived class must call base class v_OnCancel() method AFTER performing its own processing to actually close the dialog. In some cases the user may be given an opportunity to verify that they intended to press the Cancel button. If they elect not to cancel then the base class v_OnCancel() method should not be called. This will cause the dialog to remain open and allow the user to retain the settings. Derived classes should generally declare this method as private.

Reimplemented from MGUI::DLGSHELL.

virtual void MGUI::DLG_XML::v_OnClose (  )  [protected, virtual]

Called when dialog gets closed.

Reimplemented from MGUI::DLGSHELL.

virtual void MGUI::DLG_XML::v_OnCloseRequest (  )  [protected, virtual]

Called when user requests that shell be 'closed'.

Default implementation simply calls Close(). May be overridden if different behavior desired.

Reimplemented from MGUI::DLGSHELL.

virtual void MGUI::DLG_XML::v_OnDestroy (  )  [protected, virtual]

Called when dialog is destroyed.

Reimplemented from MGUI::DLGSHELL.

virtual void MGUI::DLG_XML::v_OnOK (  )  [protected, virtual]

Called when 'OK' button is pressed.

Derived class must call base class v_OnOK() method AFTER performing its own processing to actually close the dialog. If the dialog settings do not pass their associated validation test then an appropriate message should be displayed for the user and the base class v_OnOK() method should not be called. This will cause the dialog to remain open and allow the user to correct the settings. In addition, if an 'Apply' button has been created using the appropriate DLGSHELL methods then v_OnApply will be called before closing. Derived classes should generally declare this method as private.

Reimplemented from MGUI::DLGSHELL.

virtual void MGUI::DLG_XML::v_OnOpen (  )  [protected, virtual]

Called after dialog is actually opened.

Reimplemented from MGUI::DLGSHELL.


The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:35:52 2012 for TNTsdk 2012 by  doxygen 1.6.1