Sha256: bdc1a3d502ad104aeb6ce111b34597be41e7d1dfe2ba944df1f1c5df43876740

Contents?: true

Size: 877 Bytes

Versions: 2

Compression:

Stored size: 877 Bytes

Contents

# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.
# 
# Some parts are
# Copyright 2004-2007, wxRuby development team
# released under the MIT-like wxRuby2 license

# The root class for most (not all) WxRuby classes

module Wx

  class Object
    # Massage the output of inspect to show the public module name (Wx),
    # instead of the internal name (Wxruby2)
    # def to_s
    #   super.sub('ruby2', '')
    # end

    # Returns a string containing the C++ pointer address of this
    # object. Only useful for debugging.
    def ptr_addr
      Wx::ptr_addr(self)
    end

    # By default Wx:::Object derived class instances cannot be #dup-licated.
    def dup
      nil
    end

    # By default Wx::Object derived class instances cannot be cloned but instead return self.
    def clone
      self
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wxruby3-1.3.1 lib/wx/core/object.rb
wxruby3-1.3.0 lib/wx/core/object.rb