Sha256: 91a424ea1afe9ca77176ff76f287f89f0d07e51beaf21f006dea4558660e0844

Contents?: true

Size: 550 Bytes

Versions: 16

Compression:

Stored size: 550 Bytes

Contents

# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.
# 
# Some parts are
# Copyright 2004-2007, wxRuby development team
# released under the MIT-like wxRuby2 license

class Wx::ImageList

  # provide seamless support for adding icons on all platforms
  wx_add = instance_method :add
  define_method :add do |*args|
    if Wx::PLATFORM == 'WXMSW' && args.size == 1 && Wx::Icon === args.first
      args[0] = args.first.to_bitmap
    end
    wx_add.bind(self).call(*args)
  end

  alias :<< :add
end

Version data entries

16 entries across 16 versions & 1 rubygems

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