This is the root class of many of the wxWidgets classes.
It declares a virtual destructor which ensures that destructors get called for all derived class objects where necessary.
wx.Object is the hub of a dynamic object creation scheme, enabling a program to create instances of a class only knowing its string class name, and to query the class hierarchy.
The class contains optional debugging versions of new and delete, which can help trace memory allocation and deallocation problems.
wx.Object can be used to implement reference counted objects, such as wx.Pen, wx.Bitmap and others (see this list). See wx.RefCounter and Reference Counting for more info about reference counting.
See also
wx.ClassInfo, Debugging , Reference Counting, ObjectDataRef, wx.ObjectDataPtr
wx.AcceleratorTable, wx.Accessible, wx.adv.Animation, ArchiveClassFactory , ArchiveEntry , wx.ArtProvider, AutomationObject , wx.BitmapHandler , Client , wx.Clipboard, wx.Colour, wx.ColourData, wx.propgrid.ColourPropertyValue, wx.Command, wx.CommandProcessor, wx.ConfigBase, Connection , ConnectionBase , wx.ContextHelp, wx.dataview.DataViewIconText, wx.dataview.DataViewRenderer, wx.DC, DDEClient , DocTemplate , wx.DragImage, EncodingConverter , wx.Event, wx.EvtHandler, wx.FileHistory, wx.FileSystem, wx.FileSystemHandler, FilterClassFactory , wx.FindReplaceData, wx.FontData, wx.FSFile, wx.GDIObject, wx.glcanvas.GLContext, wx.GraphicsObject, wx.GraphicsRenderer, wx.grid.GridTableBase, HashTable , wx.HelpControllerBase, wx.html.HtmlCell, wx.html.HtmlDCRenderer, wx.html.HtmlEasyPrinting, wx.html.HtmlFilter, wx.html.HtmlHelpData, wx.html.HtmlLinkInfo, wx.html.HtmlTagHandler, wx.Image, wx.ImageHandler, wx.ImageList, wx.IndividualLayoutConstraint, wx.adv.Joystick, wx.adv.LayoutAlgorithm, wx.LayoutConstraints, wx.ListItem, wx.Mask, wx.MenuItem, wx.Metafile, Module , wx.PageSetupDialog, wx.PageSetupDialogData, wx.propgrid.PGCell, wx.propgrid.PGEditor, wx.propgrid.PGEditorDialogAdapter, wx.propgrid.PGProperty, wx.PrintData, wx.PrintDialog, wx.PrintDialogData, wx.Printer, wx.Printout, wx.PrintPreview, Quantize , wx.RegionIterator, wx.richtext.RichTextAction, wx.richtext.RichTextDrawingContext, wx.richtext.RichTextDrawingHandler, wx.richtext.RichTextFieldType, wx.richtext.RichTextFileHandler, wx.richtext.RichTextFontTable, wx.richtext.RichTextFormattingDialogFactory, wx.richtext.RichTextHeaderFooterData, wx.richtext.RichTextImageBlock, wx.richtext.RichTextObject, wx.richtext.RichTextPrinting, wx.richtext.RichTextProperties, wx.richtext.RichTextRenderer, wx.richtext.RichTextStyleDefinition, wx.richtext.RichTextStyleSheet, wx.Sizer, wx.SizerItem, SockAddress , SocketBase , wx.adv.Sound, StringTokenizer , wx.SystemOptions, TCPClient , TCPConnection , TCPServer , wx.ToolBarToolBase, wx.ToolTip, URI , Variant , wx.html2.WebViewFactory, wx.xml.XmlDocument, wx.xrc.XmlResource, wx.xrc.XmlResourceHandler
Default constructor; initializes to |
|
Deletes the C++ object this Python object is a proxy for. |
|
This virtual function is redefined for every class that requires run-time type information, when using the |
|
Returns the class name of the C++ class using |
|
Returns the |
|
Returns |
|
Makes this object refer to the data in clone. |
|
Sets the |
|
Decrements the reference count in the associated data, and if it is zero, deletes the data. |
|
This is the same of |
See |
|
See |
|
See |
wx.
Object
(object)¶Possible constructors:
Object()
Object(other)
This is the root class of many of the wxWidgets classes.
__init__
(self, *args, **kw)¶__init__ (self)
Default constructor; initializes to None
the internal reference data.
__init__ (self, other)
Copy constructor.
Sets the internal Object.m_refData
pointer to point to the same instance of the ObjectRefData-derived class pointed by other
and increments the refcount of Object.m_refData
.
other (wx.Object) –
Destroy
(self)¶Deletes the C++ object this Python object is a proxy for.
GetClassInfo
(self)¶This virtual function is redefined for every class that requires run-time type information, when using the DECLARE_CLASS
macro (or similar).
GetClassName
(self)¶Returns the class name of the C++ class using RTTI
.
wx.Char
GetRefData
(self)¶Returns the Object.m_refData
pointer, i.e. the data referenced by this object.
wx.ObjectRefData
See also
Ref
, UnRef
, Object.m_refData
, SetRefData
, wx.ObjectRefData
IsSameAs
(self, obj)¶Returns True
if this object has the same data pointer as obj.
Notice that True
is returned if the data pointers are None
in both objects.
This function only does a shallow comparison, i.e. it doesn’t compare the objects pointed to by the data pointers of these objects.
obj (wx.Object) –
bool
See also
Ref
(self, clone)¶Makes this object refer to the data in clone.
clone (wx.Object) – The object to ‘clone’.
Note
First this function calls UnRef
on itself to decrement (and perhaps free) the data it is currently referring to. It then sets its own Object.m_refData
to point to that of clone, and increments the reference count inside the data.
See also
UnRef
, SetRefData
, GetRefData
, wx.ObjectRefData
SetRefData
(self, data)¶Sets the Object.m_refData
pointer.
data (wx.ObjectRefData) –
See also
Ref
, UnRef
, GetRefData
, wx.ObjectRefData
UnRef
(self)¶Decrements the reference count in the associated data, and if it is zero, deletes the data.
The Object.m_refData
member is set to None
.
See also
Ref
, SetRefData
, GetRefData
, wx.ObjectRefData
This is the same of AllocExclusive
but this method is public.
ClassInfo
¶See GetClassInfo
ClassName
¶See GetClassName
RefData
¶See GetRefData
and SetRefData