Sha256: d70328390d6ff9c3f75522294725fd59de42551deda1662b34fd1397ce691ae6

Contents?: true

Size: 1.16 KB

Versions: 3

Compression:

Stored size: 1.16 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 './event_handler'

module WXRuby3

  class Director

    class NumericPropertyValidator < EvtHandler

      def setup
        super
        # need a custom implementation to handle event handler proc cleanup
        spec.add_header_code <<~__HEREDOC
          class WXRubyNumericPropertyValidator : public wxNumericPropertyValidator
          {
          public:
            WXRubyNumericPropertyValidator(NumericType numericType, int base=10) 
              : wxNumericPropertyValidator(numericType, base) {}
            virtual ~WXRubyNumericPropertyValidator() 
            {
              wxRuby_ReleaseEvtHandlerProcs(this);
            }               
          };
        __HEREDOC
        spec.use_class_implementation 'wxNumericPropertyValidator', 'WXRubyNumericPropertyValidator'
        spec.no_proxy 'wxNumericPropertyValidator::Clone'
        spec.do_not_generate :variables, :defines, :enums, :functions
      end

    end # class NumericPropertyValidator

  end # class Director

end # module WXRuby3

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wxruby3-0.9.2 rakelib/lib/director/numeric_property_validator.rb
wxruby3-0.9.1 rakelib/lib/director/numeric_property_validator.rb
wxruby3-0.9.0 rakelib/lib/director/numeric_property_validator.rb