Class: Wx::Object

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/object.rb,
lib/wx/doc/object.rb

Overview

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. 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. Object can be used to implement reference counted objects, such as Pen, Bitmap and others (see this list). See RefCounter and Reference Counting for more info about reference counting.

Category: Runtime Type Information (RTTI)

See Also:

  • ClassInfo
  • Debugging
  • Counting
  • wxObjectDataRef
  • ObjectDataPtr<T>

Instance Method Summary collapse

Constructor Details

#initializeWx::Object #initialize(other) ⇒ Wx::Object

Returns a new instance of Object.

Overloads:

  • #initializeWx::Object

    Default ctor; initializes to NULL the internal reference data.

  • #initialize(other) ⇒ Wx::Object

    Copy ctor.

    Sets the internal m_refData pointer to point to the same instance of the Wx::ObjectRefData-derived class pointed by other and increments the refcount of m_refData.

    Parameters:



42
# File 'lib/wx/doc/gen/object.rb', line 42

def initialize(*args) end

Instance Method Details

#cloneself

By default Wx::Object derived class instances cannot be cloned but instead return self. Derived classes (like the Event classes) may provide functional overloads.

Returns:

  • (self)


20
# File 'lib/wx/doc/object.rb', line 20

def clone; end

#dupnil

By default Wx:::Object derived classes cannot be #dup-licated. Some derived classes (like GDIObject-s) may provide functional overloads.

Returns:

  • (nil)


15
# File 'lib/wx/doc/object.rb', line 15

def dup; end

#is_same_as(obj) ⇒ Boolean Also known as: same_as?

Returns true if this object has the same data pointer as obj.

Notice that true is returned if the data pointers are NULL 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.

Parameters:

Returns:

  • (Boolean)

See Also:

  • Counting


51
# File 'lib/wx/doc/gen/object.rb', line 51

def is_same_as(obj) end

#un_sharevoid

This method returns an undefined value.

This is the same of alloc_exclusive but this method is public.



56
# File 'lib/wx/doc/gen/object.rb', line 56

def un_share; end