Sha256: 58f281e2e106623f285baf4e30eaf9d8d8c57db6b3cbdfbc7c200a0263f69071

Contents?: true

Size: 629 Bytes

Versions: 16

Compression:

Stored size: 629 Bytes

Contents

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

module Wx

  module HTML

    class HtmlWindow

      # Need to override HtmlWindow.add_filter to provide cashing
      # for the added custom html filters to prevent premature GC
      class << self
        def html_filters
          @html_filters ||= []
        end
        private :html_filters

        wx_add_filter = instance_method(:add_filter)
        define_method(:add_filter) do |filter|
          html_filters << filter
          wx_add_filter.bind(self).call(filter)
        end
      end

    end

  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
wxruby3-1.3.1 lib/wx/html/htmlwindow.rb
wxruby3-1.3.0 lib/wx/html/htmlwindow.rb
wxruby3-1.2.1 lib/wx/html/htmlwindow.rb
wxruby3-1.2.0 lib/wx/html/htmlwindow.rb
wxruby3-1.1.2 lib/wx/html/htmlwindow.rb
wxruby3-1.1.1 lib/wx/html/htmlwindow.rb
wxruby3-1.1.0 lib/wx/html/htmlwindow.rb
wxruby3-1.0.1 lib/wx/html/htmlwindow.rb
wxruby3-0.9.8 lib/wx/html/htmlwindow.rb
wxruby3-0.9.7 lib/wx/html/htmlwindow.rb
wxruby3-0.9.5 lib/wx/html/htmlwindow.rb
wxruby3-0.9.4 lib/wx/html/htmlwindow.rb
wxruby3-0.9.3 lib/wx/html/htmlwindow.rb
wxruby3-0.9.2 lib/wx/html/htmlwindow.rb
wxruby3-0.9.1 lib/wx/html/htmlwindow.rb
wxruby3-0.9.0 lib/wx/html/htmlwindow.rb