Sha256: 4d7f381f3730b57cdb4265441ff0efd0cbe76383544aede74b702cb3ccccc631

Contents?: true

Size: 1.26 KB

Versions: 9

Compression:

Stored size: 1.26 KB

Contents

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

module WXRuby3

  class Director

    class HtmlHelpData < Director

      def setup
        super
        spec.items << 'wxHtmlBookRecord' << 'wxHtmlHelpDataItem'
        # type mapping for wxHtmlBookRecArray and wxHtmlHelpDataItems
        spec.map 'const wxHtmlBookRecArray&' => 'Array<Wx::HtmlBookRecord>' do
          map_out code: <<~__CODE
            $result = rb_ary_new();
            for (size_t n=0; n<$1->GetCount() ;++n)
            {
              wxHtmlBookRecord* hbr_ptr = &($1->Item(n));
              VALUE rb_hbr = Data_Wrap_Struct(rb_cObject, 0, 0, hbr_ptr);
              rb_ary_push($result, rb_hbr);
            }
            __CODE
        end
        spec.map 'const wxHtmlHelpDataItems&' => 'Array<Wx::HtmlHelpDataItem>' do
          map_out code: <<~__CODE
            $result = rb_ary_new();
            for (size_t n=0; n<$1->GetCount() ;++n)
            {
              wxHtmlHelpDataItem* hdi_ptr = &($1->Item(n));
              VALUE rb_hdi = Data_Wrap_Struct(rb_cObject, 0, 0, hdi_ptr);
              rb_ary_push($result, rb_hdi);
            }
            __CODE
        end
      end
    end # class HtmlHelpData

  end # class Director

end # module WXRuby3

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
wxruby3-0.9.0.pre.rc.3 rakelib/lib/director/html_help_data.rb
wxruby3-0.9.0.pre.rc.2 rakelib/lib/director/html_help_data.rb
wxruby3-0.9.0.pre.rc.1 rakelib/lib/director/html_help_data.rb
wxruby3-0.9.0.pre.beta.14 rakelib/lib/director/html_help_data.rb
wxruby3-0.9.0.pre.beta.13 rakelib/lib/director/html_help_data.rb
wxruby3-0.9.0.pre.beta.11 rakelib/lib/director/html_help_data.rb
wxruby3-0.9.0.pre.beta.10 rakelib/lib/director/html_help_data.rb
wxruby3-0.9.0.pre.beta.9 rakelib/lib/director/html_help_data.rb
wxruby3-0.9.0.pre.beta.8 rakelib/lib/director/html_help_data.rb