Sha256: 67309ad0375d3aaad1d45e68ed1c62616bde2f1aad33269aae659a806c91f500

Contents?: true

Size: 1.63 KB

Versions: 13

Compression:

Stored size: 1.63 KB

Contents

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

###
# wxRuby3 wxWidgets interface director
###

require_relative './window'

module WXRuby3

  class Director

    class EditableListBox < Window

      def setup
        super
        # methods missing from docs
        spec.extend_interface 'wxEditableListBox',
                              'wxListCtrl* GetListCtrl()',
                              'wxBitmapButton* GetDelButton()',
                              'wxBitmapButton* GetNewButton()',
                              'wxBitmapButton* GetUpButton()',
                              'wxBitmapButton* GetDownButton()',
                              'wxBitmapButton* GetEditButton()'
        # redefine this
        spec.ignore 'wxEditableListBox::GetStrings', ignore_doc: false
        spec.add_extend_code 'wxEditableListBox', <<~__HEREDOC
          VALUE GetStrings()
          {
            VALUE rb_list = rb_ary_new(); 
            wxArrayString list;
            $self->GetStrings(list);
            for (unsigned int i=0; i<list.GetCount() ;++i)
            {
              rb_ary_push(rb_list, WXSTR_TO_RSTR(list.Item(i)));
            }
            return rb_list;
          }
          __HEREDOC
        # map for doc gen
        spec.map 'wxArrayString& strings' => 'Array<String>', swig: false do
          map_in ignore: true, code: ''
          map_argout code: ''
        end
        # make sure GetStrings uses the right typemap
        spec.map_apply 'wxArrayString&' => 'const wxArrayString& strings'
      end
    end # class EditableListBox

  end # class Director

end # module WXRuby3

Version data entries

13 entries across 13 versions & 1 rubygems

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