Sha256: 095940d8dd6cf9fb9f95bba368c0bef4fde6061149188b1446207ee93c927599

Contents?: true

Size: 1.78 KB

Versions: 16

Compression:

Stored size: 1.78 KB

Contents

# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.

###
# wxRuby3 wxWidgets interface director
###

module WXRuby3

  class Director

    class RichTextPrinting < Director

      def setup
        spec.items << 'wxRichTextPrintout'
        super
        spec.no_proxy 'wxRichTextPrinting'
        spec.override_inheritance_chain('wxRichTextPrintout', {'wxPrintout' => 'wxPrinter'}, 'wxObject')
        spec.map_apply 'int * OUTPUT' => 'int *' # for wxRichTextPrintout::GetPageInfo
        # make sure to return by value
        spec.map 'wxRichTextHeaderFooterData &' => 'Wx::RTC::RichTextHeaderFooterData' do
          map_out code: <<~__CODE
            vresult = SWIG_NewPointerObj((new wxRichTextHeaderFooterData(*result)), SWIGTYPE_p_wxRichTextHeaderFooterData, SWIG_POINTER_OWN |  0 );
            __CODE
        end
        # make wxRichTextPrinting GC-safe
        spec.ignore 'wxRichTextPrinting::GetPageSetupData',
                    'wxRichTextPrinting::GetPrintData'
        spec.add_extend_code 'wxRichTextPrinting', <<~__HEREDOC
          wxPrintData* GetPrintData()
          { return new wxPrintData(*self->GetPrintData()); }
          wxPageSetupDialogData* GetPageSetupData()
          { return new wxPageSetupDialogData(*self->GetPageSetupData()); }
          __HEREDOC
        spec.new_object 'wxRichTextPrinting::GetPageSetupData',
                        'wxRichTextPrinting::GetPrintData'
        spec.map 'const wxRect&' => 'Wx::Rect' do
          map_out code: 'vresult = SWIG_NewPointerObj(SWIG_as_voidptr(new wxRect(*result)), SWIGTYPE_p_wxRect, SWIG_POINTER_OWN |  0 );'
        end
        spec.do_not_generate(:variables, :defines, :enums, :functions)
      end
    end # class RichTextPrinting

  end # class Director

end # module WXRuby3

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
wxruby3-1.3.1 rakelib/lib/director/richtext_printing.rb
wxruby3-1.3.0 rakelib/lib/director/richtext_printing.rb
wxruby3-1.2.1 rakelib/lib/director/richtext_printing.rb
wxruby3-1.2.0 rakelib/lib/director/richtext_printing.rb
wxruby3-1.1.2 rakelib/lib/director/richtext_printing.rb
wxruby3-1.1.1 rakelib/lib/director/richtext_printing.rb
wxruby3-1.1.0 rakelib/lib/director/richtext_printing.rb
wxruby3-1.0.1 rakelib/lib/director/richtext_printing.rb
wxruby3-0.9.8 rakelib/lib/director/richtext_printing.rb
wxruby3-0.9.7 rakelib/lib/director/richtext_printing.rb
wxruby3-0.9.5 rakelib/lib/director/richtext_printing.rb
wxruby3-0.9.4 rakelib/lib/director/richtext_printing.rb
wxruby3-0.9.3 rakelib/lib/director/richtext_printing.rb
wxruby3-0.9.2 rakelib/lib/director/richtext_printing.rb
wxruby3-0.9.1 rakelib/lib/director/richtext_printing.rb
wxruby3-0.9.0 rakelib/lib/director/richtext_printing.rb