SizerXmlHandler is a class for resource handlers capable of creating a wx.Sizer object from an XML
node.
wx.xrc.XmlResourceHandler is an abstract base class for resource handlers capable of creating a control from an XML
node.
See XML Based Resource System for details.
Class Hierarchy¶Inheritance diagram for class
XmlResourceHandler:
Known Subclasses¶SizerXmlHandler
Methods Summary¶Default constructor.
Add a style flag (e.g.
Add styles common to all Window-derived classes.
Returns True
if it understands this node and can create a resource from it, False
otherwise.
Creates children.
Helper function.
Creates a resource from a node.
Creates an object (menu, dialog, control, â¦) from an XML
node.
Called from CreateResource after variables were filled.
Creates an animation (see wx.adv.Animation) from the filename specified in param.
Gets a bitmap.
Gets a bitmap bundle.
Gets a bool flag (1, t, yes, on, True
are True
, everything else is False
).
After CreateResource has been called this will return the class name of the XML
resource node being processed.
Gets colour in HTML syntax (#``RRGGBB``).
Returns the current file system.
Gets a dimension (may be in dialog units).
Gets a direction.
Gets a float value from the parameter.
Gets a font.
Returns the wx.xrc.XRCID
.
Returns an icon.
Returns an icon bundle.
Creates an image list from the param markup data.
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.
Gets the integer value from the parameter.
Returns the resource name.
After CreateResource has been called this will return the XML
node being processed.
Gets the first child of the given node or None
.
Gets node content from wx.xml.XML_ENTITY_NODE
.
Gets the next sibling node related to the given node, possibly None
.
Gets the parent of the node given.
Finds the node or returns None
.
Finds the parameter value or returns the empty string.
After CreateResource has been called this will return the current itemâs parent, if any.
After CreateResource has been called this will return the itemâs parent as a wx.Window.
Gets the position (may be in dialog units).
After CreateResource has been called this will return the current wx.xrc.XmlResource object.
Gets the size (may be in dialog units).
Gets style flags from text in form âflag | flag2| flag3 |â¦â Only understands flags added with AddStyle
.
Gets text from param and does some conversions
Check to see if a parameter exists.
Checks if the given node is an object node.
Convenience function.
Reports error in XRC
resources to the user.
Like ReportError
, but uses the node of parameter param of the currently processed object as the context.
Sets the parent resource.
Sets common window options.
Properties Summary¶ Class API¶Possible constructors:
XmlResourceHandler() -> None
SizerXmlHandler is a class for resource handlers capable of creating a Sizer object from an XML
node.
Default constructor.
None
Add a style flag (e.g.
MB_DOCKABLE
) to the list of flags understood by this handler.
name (string)
value (int)
None
Add styles common to all Window-derived classes.
None
Returns True
if it understands this node and can create a resource from it, False
otherwise.
node (wx.xml.XmlNode)
bool
Creates children.
parent (wx.Object)
this_hnd_only (bool)
None
Helper function.
parent (wx.Object)
rootnode (wx.xml.XmlNode)
None
Creates a resource from a node.
node (wx.xml.XmlNode)
parent (wx.Object)
instance (wx.Object)
Creates an object (menu, dialog, control, â¦) from an XML
node.
Should check for validity. parent is a higher-level object (usually window, dialog or panel) that is often necessary to create the resource.
If instance is not None
it should not create a new instance via ânewâ but should rather use this one, and call its Create method.
node (wx.xml.XmlNode)
parent (wx.Object)
instance (wx.Object)
Called from CreateResource after variables were filled.
Creates an animation (see wx.adv.Animation) from the filename specified in param.
It is recommended to provide ctrl argument to this function (which is only available in wxWidgets 3.1.4 or later) to make sure that the created animation is compatible with the specified control, otherwise a wx.adv.Animation object compatible with the default wx.adv.AnimationCtrl implementation is created.
param (string)
ctrl (wx.adv.AnimationCtrl)
GetBitmap (self, param=âbitmapâ, defaultArtClient=ART_OTHER, size=DefaultSize)
Gets a bitmap.
GetBitmap (self, node, defaultArtClient=ART_OTHER, size=DefaultSize)
Gets a bitmap from an XmlNode.
node (wx.xml.XmlNode)
defaultArtClient (wx.ArtClient)
size (wx.Size)
Added in version 2.9.1.
GetBitmapBundle (self, param=âbitmapâ, defaultArtClient=ART_OTHER, size=DefaultSize)
Gets a bitmap bundle.
param (string)
defaultArtClient (wx.ArtClient)
size (wx.Size)
Added in version 4.1/wxWidgets-3.1.6.
GetBitmapBundle (self, node, defaultArtClient=ART_OTHER, size=DefaultSize)
Gets a bitmap bundle from the provided node.
node (wx.xml.XmlNode)
defaultArtClient (wx.ArtClient)
size (wx.Size)
Added in version 4.1/wxWidgets-3.1.6.
Gets a bool flag (1, t, yes, on, True
are True
, everything else is False
).
param (string)
defaultv (bool)
bool
After CreateResource has been called this will return the class name of the XML
resource node being processed.
str
Added in version 2.9.5.
Gets colour in HTML syntax (#``RRGGBB``).
Returns the current file system.
Gets a dimension (may be in dialog units).
param (string)
defaultv (int)
windowToUse (wx.Window)
int
Gets a direction.
If the given param is not present or has empty value, dirDefault is returned by default. Otherwise the value of the parameter is parsed and a warning is generated if itâs not one of LEFT
, TOP
, RIGHT
or BOTTOM
.
param (string)
dirDefault (Direction)
Added in version 2.9.3.
Gets a float value from the parameter.
param (string)
defaultv (float)
float
Gets a font.
param (string)
Returns the wx.xrc.XRCID
.
int
GetIcon (self, param=âiconâ, defaultArtClient=ART_OTHER, size=DefaultSize)
Returns an icon.
GetIcon (self, node, defaultArtClient=ART_OTHER, size=DefaultSize)
Gets an icon from an XmlNode.
node (wx.xml.XmlNode)
defaultArtClient (wx.ArtClient)
size (wx.Size)
Added in version 2.9.1.
Returns an icon bundle.
param (string)
defaultArtClient (wx.ArtClient)
Added in version 2.9.0.
Note
Bundles can be loaded either with stock IDs or from files that contain more than one image (e.g. Windows icon files). If a file contains only single image, a bundle with only one icon will be created.
Creates an image list from the param markup data.
param (string)
The new instance of wx.ImageList or None
if no data is found.
Added in version 2.9.1.
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.
If None
then the handler should create the object itself.
Added in version 2.9.5.
Gets the integer value from the parameter.
param (string)
defaultv (long)
int
Returns the resource name.
str
After CreateResource has been called this will return the XML
node being processed.
Added in version 2.9.5.
Gets the first child of the given node or None
.
This method is safe to call with None
argument, it just returns None
in this case.
node (wx.xml.XmlNode)
Added in version 4.1/wxWidgets-3.1.0.
Gets node content from wx.xml.XML_ENTITY_NODE
.
node (wx.xml.XmlNode)
str
Gets the next sibling node related to the given node, possibly None
.
This method is safe to call with None
argument, it just returns None
in this case.
node (wx.xml.XmlNode)
Added in version 4.1/wxWidgets-3.1.0.
Gets the parent of the node given.
This method is safe to call with None
argument, it just returns None
in this case.
node (wx.xml.XmlNode)
Added in version 4.1/wxWidgets-3.1.0.
Finds the node or returns None
.
param (string)
GetParamValue (self, param)
Finds the parameter value or returns the empty string.
param (string)
str
GetParamValue (self, node)
Returns the node parameter value.
node (wx.xml.XmlNode)
str
Added in version 2.9.1.
After CreateResource has been called this will return the current itemâs parent, if any.
Added in version 2.9.5.
After CreateResource has been called this will return the itemâs parent as a wx.Window.
Added in version 2.9.5.
Gets the position (may be in dialog units).
param (string)
After CreateResource has been called this will return the current wx.xrc.XmlResource object.
Added in version 2.9.5.
Gets the size (may be in dialog units).
Gets style flags from text in form âflag | flag2| flag3 |â¦â Only understands flags added with AddStyle
.
param (string)
defaults (int)
int
Gets text from param and does some conversions:
replaces \n, \r, \t by respective characters (according to C syntax)
replaces $
by and
$$
by $
(needed for _File
to File
translation because of XML
syntax)
calls GetTranslations (unless disabled in wx.xrc.XmlResource)
param (string)
translate (bool)
str
Check to see if a parameter exists.
param (string)
bool
Checks if the given node is an object node.
Object nodes are those named âobjectâ or âobject_refâ.
node (wx.xml.XmlNode)
bool
Added in version 4.1/wxWidgets-3.1.0.
Convenience function.
Returns True
if the node has a property class equal to classname, e.g. object class=âwxDialogâ.
node (wx.xml.XmlNode)
classname (string)
bool
ReportError (self, context, message)
Reports error in XRC
resources to the user.
See wx.xrc.XmlResource.ReportError
for more information.
context (wx.xml.XmlNode)
message (string)
None
Added in version 2.9.0.
ReportError (self, message)
Like ReportError
, but uses the node of currently processed object (m_node) as the context.
message (string)
None
Added in version 2.9.0.
Like ReportError
, but uses the node of parameter param of the currently processed object as the context.
This is convenience function for reporting errors in particular parameters.
param (string)
message (string)
None
Added in version 2.9.0.
Sets the parent resource.
res (wx.xrc.XmlResource)
None
Sets common window options.
wnd (wx.Window)
None
See GetAnimation
See GetBitmap
See GetBitmapBundle
See GetClass
See GetCurFileSystem
See GetFont
See GetID
See GetIcon
See GetImageList
See GetInstance
See GetName
See GetNode
See GetParent
See GetPosition
See GetResource
See GetSize
See GetStyle
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4