#include <wx/xrc/xh_sizer.h>
Public Member Functions | |
wxSizerXmlHandler () | |
Constructor. | |
virtual wxObject * | DoCreateResource () |
Creates a sizer, sizeritem or spacer object, depending on the current handled node. | |
virtual bool | CanHandle (wxXmlNode *node) |
Returns true if the given node can be handled by this class. | |
Public Member Functions inherited from wxXmlResourceHandler | |
wxXmlResourceHandler () | |
Default constructor. | |
virtual | ~wxXmlResourceHandler () |
Destructor. | |
wxObject * | CreateResource (wxXmlNode *node, wxObject *parent, wxObject *instance) |
Creates an object (menu, dialog, control, ...) from an XML node. | |
void | SetParentResource (wxXmlResource *res) |
Sets the parent resource. | |
Public Member Functions inherited from wxObject | |
wxObject () | |
Default ctor; initializes to NULL the internal reference data. | |
wxObject (const wxObject &other) | |
Copy ctor. | |
virtual | ~wxObject () |
Destructor. | |
virtual wxClassInfo * | GetClassInfo () const |
This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar). | |
wxObjectRefData * | GetRefData () const |
Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. | |
bool | IsKindOf (const wxClassInfo *info) const |
Determines whether this class is a subclass of (or the same class as) the given class. | |
bool | IsSameAs (const wxObject &obj) const |
Returns true if this object has the same data pointer as obj. | |
void | Ref (const wxObject &clone) |
Makes this object refer to the data in clone. | |
void | SetRefData (wxObjectRefData *data) |
Sets the wxObject::m_refData pointer. | |
void | UnRef () |
Decrements the reference count in the associated data, and if it is zero, deletes the data. | |
void | UnShare () |
This is the same of AllocExclusive() but this method is public. | |
void | operator delete (void *buf) |
The delete operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined. | |
void * | operator new (size_t size, const wxString &filename=NULL, int lineNum=0) |
The new operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined. | |
Protected Member Functions | |
virtual wxSizer * | DoCreateSizer (const wxString &name) |
Creates an object of type wxSizer from the XML node content. | |
virtual bool | IsSizerNode (wxXmlNode *node) const |
Used by CanHandle() to know if the given node contains a sizer supported by this class. | |
Protected Member Functions inherited from wxXmlResourceHandler | |
void | AddStyle (const wxString &name, int value) |
Add a style flag (e.g. | |
void | AddWindowStyles () |
Add styles common to all wxWindow-derived classes. | |
void | CreateChildren (wxObject *parent, bool this_hnd_only=false) |
Creates children. | |
void | CreateChildrenPrivately (wxObject *parent, wxXmlNode *rootnode=NULL) |
Helper function. | |
wxObject * | CreateResFromNode (wxXmlNode *node, wxObject *parent, wxObject *instance=NULL) |
Creates a resource from a node. | |
wxAnimation * | GetAnimation (const wxString ¶m="animation") |
Creates an animation (see wxAnimation) from the filename specified in param. | |
wxBitmap | GetBitmap (const wxString ¶m="bitmap", const wxArtClient &defaultArtClient=wxART_OTHER, wxSize size=wxDefaultSize) |
Gets a bitmap. | |
wxBitmap | GetBitmap (const wxXmlNode *node, const wxArtClient &defaultArtClient=wxART_OTHER, wxSize size=wxDefaultSize) |
Gets a bitmap from an XmlNode. | |
bool | GetBool (const wxString ¶m, bool defaultv=false) |
Gets a bool flag (1, t, yes, on, true are true, everything else is false). | |
wxColour | GetColour (const wxString ¶m, const wxColour &defaultColour=wxNullColour) |
Gets colour in HTML syntax (#RRGGBB). | |
wxFileSystem & | GetCurFileSystem () |
Returns the current file system. | |
wxCoord | GetDimension (const wxString ¶m, wxCoord defaultv=0, wxWindow *windowToUse=0) |
Gets a dimension (may be in dialog units). | |
wxDirection | GetDirection (const wxString ¶m, wxDirection dirDefault=wxLEFT) |
Gets a direction. | |
wxFont | GetFont (const wxString ¶m="font") |
Gets a font. | |
int | GetID () |
Returns the XRCID. | |
wxIcon | GetIcon (const wxString ¶m="icon", const wxArtClient &defaultArtClient=wxART_OTHER, wxSize size=wxDefaultSize) |
Returns an icon. | |
wxIcon | GetIcon (const wxXmlNode *node, const wxArtClient &defaultArtClient=wxART_OTHER, wxSize size=wxDefaultSize) |
Gets an icon from an XmlNode. | |
wxIconBundle | GetIconBundle (const wxString ¶m, const wxArtClient &defaultArtClient=wxART_OTHER) |
Returns an icon bundle. | |
wxImageList * | GetImageList (const wxString ¶m="imagelist") |
Creates an image list from the param markup data. | |
long | GetLong (const wxString ¶m, long defaultv=0) |
Gets the integer value from the parameter. | |
float | GetFloat (const wxString ¶m, float defaultv=0) |
Gets a float value from the parameter. | |
wxString | GetName () |
Returns the resource name. | |
bool | IsObjectNode (const wxXmlNode *node) const |
Checks if the given node is an object node. | |
wxString | GetNodeContent (wxXmlNode *node) |
Gets node content from wxXML_ENTITY_NODE. | |
wxXmlNode * | GetNodeParent (const wxXmlNode *node) const |
Gets the parent of the node given. | |
wxXmlNode * | GetNodeNext (const wxXmlNode *node) const |
Gets the next sibling node related to the given node, possibly NULL. | |
wxXmlNode * | GetNodeChildren (const wxXmlNode *node) const |
Gets the first child of the given node or NULL. | |
wxXmlNode * | GetParamNode (const wxString ¶m) |
Finds the node or returns NULL. | |
wxString | GetParamValue (const wxString ¶m) |
Finds the parameter value or returns the empty string. | |
wxString | GetParamValue (const wxXmlNode *node) |
Returns the node parameter value. | |
wxPoint | GetPosition (const wxString ¶m="pos") |
Gets the position (may be in dialog units). | |
wxSize | GetSize (const wxString ¶m="size", wxWindow *windowToUse=0) |
Gets the size (may be in dialog units). | |
int | GetStyle (const wxString ¶m="style", int defaults=0) |
Gets style flags from text in form "flag | flag2| flag3 |..." Only understands flags added with AddStyle(). | |
wxString | GetText (const wxString ¶m, bool translate=true) |
Gets text from param and does some conversions: | |
bool | HasParam (const wxString ¶m) |
Check to see if a parameter exists. | |
bool | IsOfClass (wxXmlNode *node, const wxString &classname) |
Convenience function. | |
void | SetupWindow (wxWindow *wnd) |
Sets common window options. | |
void | ReportError (wxXmlNode *context, const wxString &message) |
Reports error in XRC resources to the user. | |
void | ReportError (const wxString &message) |
Like ReportError(wxXmlNode*, const wxString&), but uses the node of currently processed object (m_node) as the context. | |
void | ReportParamError (const wxString ¶m, const wxString &message) |
Like ReportError(wxXmlNode*, const wxString&), but uses the node of parameter param of the currently processed object as the context. | |
wxXmlResource * | GetResource () const |
After CreateResource has been called this will return the current wxXmlResource object. | |
wxXmlNode * | GetNode () const |
After CreateResource has been called this will return the XML node being processed. | |
wxString | GetClass () const |
After CreateResource has been called this will return the class name of the XML resource node being processed. | |
wxObject * | GetParent () const |
After CreateResource has been called this will return the current item's parent, if any. | |
wxObject * | GetInstance () const |
After CreateResource has been called this will return the instance that the XML resource content should be created upon, if it has already been created. | |
wxWindow * | GetParentAsWindow () const |
After CreateResource has been called this will return the item's parent as a wxWindow. | |
Protected Member Functions inherited from wxObject | |
void | AllocExclusive () |
Ensure that this object's data is not shared with any other object. | |
virtual wxObjectRefData * | CreateRefData () const |
Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it. | |
virtual wxObjectRefData * | CloneRefData (const wxObjectRefData *data) const |
Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data. | |
Additional Inherited Members | |
Protected Attributes inherited from wxObject | |
wxObjectRefData * | m_refData |
Pointer to an object which is the object's reference-counted data. | |
wxSizerXmlHandler::wxSizerXmlHandler | ( | ) |
Constructor.
Initializes the attributes and adds the supported styles.
|
virtual |
Returns true if the given node can be handled by this class.
If the node concerns a sizer object, the method IsSizerNode is called to know if the class is managed or not. If the node concerns a sizer item or a spacer, true is returned. Otherwise false is returned.
Implements wxXmlResourceHandler.
|
virtual |
Creates a sizer, sizeritem or spacer object, depending on the current handled node.
Implements wxXmlResourceHandler.
Creates an object of type wxSizer from the XML node content.
This virtual method can be overridden to add support for custom sizer classes to the derived handler.
Notice that if you override this method you would typically overload IsSizerNode() as well.
Example of use of this method:
|
protectedvirtual |
Used by CanHandle() to know if the given node contains a sizer supported by this class.
This method should be overridden to allow this handler to be used for the custom sizer types.
See the example in DoCreateSizer() description for how it can be used.