Sha256: 4a082d4d637c48c523ffdf26bf595144b257f15775d98bbf87c625cf3ba05fb7

Contents?: true

Size: 1006 Bytes

Versions: 16

Compression:

Stored size: 1006 Bytes

Contents

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

###
# wxRuby3 wxWidgets interface director
###

require_relative './event_handler'

module WXRuby3

  class Director

    class Timer < EvtHandler

      def setup
        super
        spec.require_app 'wxTimer'
        # need a custom implementation to handle event handler proc cleanup
        spec.add_header_code <<~__HEREDOC
          class WXRubyTimer : public wxTimer
          {
          public:
            WXRubyTimer() : wxTimer() {}
            WXRubyTimer(wxEvtHandler *owner, int id=-1) : wxTimer(owner, id) {}
            virtual ~WXRubyTimer() 
            {
              wxRuby_ReleaseEvtHandlerProcs(this);
            }               
          };
        __HEREDOC
        spec.use_class_implementation 'wxTimer', 'WXRubyTimer'
        spec.do_not_generate(:variables, :enums, :defines, :functions)
      end
    end # class Timer

  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/timer.rb
wxruby3-1.3.0 rakelib/lib/director/timer.rb
wxruby3-1.2.1 rakelib/lib/director/timer.rb
wxruby3-1.2.0 rakelib/lib/director/timer.rb
wxruby3-1.1.2 rakelib/lib/director/timer.rb
wxruby3-1.1.1 rakelib/lib/director/timer.rb
wxruby3-1.1.0 rakelib/lib/director/timer.rb
wxruby3-1.0.1 rakelib/lib/director/timer.rb
wxruby3-0.9.8 rakelib/lib/director/timer.rb
wxruby3-0.9.7 rakelib/lib/director/timer.rb
wxruby3-0.9.5 rakelib/lib/director/timer.rb
wxruby3-0.9.4 rakelib/lib/director/timer.rb
wxruby3-0.9.3 rakelib/lib/director/timer.rb
wxruby3-0.9.2 rakelib/lib/director/timer.rb
wxruby3-0.9.1 rakelib/lib/director/timer.rb
wxruby3-0.9.0 rakelib/lib/director/timer.rb