Sha256: 39c4b437358c24ae261640d5cf781a6b0709e816f9f65475b1d896855d70135d

Contents?: true

Size: 1.1 KB

Versions: 7

Compression:

Stored size: 1.1 KB

Contents

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

require_relative './window'

module WXRuby3

  class Director

    class RadioBox < Window
      def setup
        spec.items << 'wxItemContainerImmutable'
        spec.fold_bases('wxRadioBox' => 'wxItemContainerImmutable')
        spec.override_inheritance_chain('wxRadioBox', %w[wxControl wxWindow wxEvtHandler wxObject])
        # ignore overload hiding common Window method
        spec.ignore('wxRadioBox::Enable')
        spec.add_extend_code 'wxRadioBox', <<~__HEREDOC
        // add custom method to reach common Window method
        bool EnableWindow(bool enable=true)
        {
          return $self->wxWindow::Enable(enable);
        }
        // add right method to enable/disable items
        bool EnableItem(unsigned int n, bool enable=true)
        {
          return $self->Enable(n, enable);
        }
        __HEREDOC
        # rename common method
        spec.rename_for_ruby('Enable' => 'wxRadioBox::EnableWindow')
        super
      end
    end # class Window

  end # class Director

end # module WXRuby3

Version data entries

7 entries across 7 versions & 1 rubygems

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