Sha256: c91e56bf34cf7a5c56ae9b32b6ae33b5c982f17431dc15d9e33873cbddd8d84e

Contents?: true

Size: 1.59 KB

Versions: 2

Compression:

Stored size: 1.59 KB

Contents

###
# wxRuby3 wxWidgets interface director
# Copyright (c) M.J.N. Corino, The Netherlands
###

module WXRuby3

  class Director

    class RichTextBufferDataObject < Director

      include Typemap::DataFormat
      include Typemap::DataObjectData

      def setup
        super
        spec.gc_as_object
        # make sure the build scripts know that DataObjectSimple is part of the DataObject module
        spec.override_inheritance_chain('wxRichTextBufferDataObject', {'wxDataObjectSimple' => 'wxDataObject'}, 'wxDataObject')
        # we only allow Ruby derivatives from wxDataObject but not of any of the C++ implemented
        # specializations
        spec.no_proxy 'wxRichTextBufferDataObject'
        spec.add_swig_code <<~__HEREDOC
            // SWIG gets confused and doesn't realise that various virtual methods
            // from wxDataObject are implemented fully in this subclass, and so,
            // believing it to be abstract doesn't provide an allocator for this
            // class. This undocumented feature overrides this.
            %feature("notabstract") wxRichTextBufferDataObject;
        __HEREDOC

        # ignore overrrides (will be available through base class)
        spec.ignore 'wxRichTextBufferDataObject::GetPreferredFormat'
        spec.ignore 'wxRichTextBufferDataObject::GetDataSize'
        spec.ignore 'wxRichTextBufferDataObject::GetDataHere'
        spec.ignore 'wxRichTextBufferDataObject::SetData'

        spec.new_object 'wxRichTextBufferDataObject::GetRichTextBuffer'
        spec.do_not_generate :variables, :defines, :functions, :enums
      end

    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wxruby3-0.9.0.pre.beta.14 rakelib/lib/director/richtext_buffer_data_object.rb
wxruby3-0.9.0.pre.beta.13 rakelib/lib/director/richtext_buffer_data_object.rb