Sha256: b69cd63dbd8490d2c19d377c260b2a5ef002d92ca7f1575ed78c809cc699ed73
Contents?: true
Size: 1.25 KB
Versions: 3
Compression:
Stored size: 1.25 KB
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 module Wx class BitmapCombobox < Wx::ComboBox # We need to cache client data in Ruby variables as we cannot access items # during the GC mark phase as for some platforms (WXMSW at least) that would # involve calling methods that would break in that phase. wx_append = instance_method :append define_method :append do |item, bitmap=Wx::NULL_BITMAP, data=nil| itm_pos = if data wx_append.bind(self).call(item, bitmap, data) else wx_append.bind(self).call(item, bitmap) end client_data_store.insert(itm_pos, data) itm_pos end wx_insert = instance_method :insert define_method :insert do |item, bitmap, pos, data=nil| itm_pos = if data wx_insert.bind(self).call(item, bitmap, pos, data) else wx_insert.bind(self).call(item, bitmap, pos) end client_data_store.insert(itm_pos, data) itm_pos end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wxruby3-0.9.2-x64-mingw-ucrt | lib/wx/core/bitmap_combobox.rb |
wxruby3-0.9.1-x64-mingw-ucrt | lib/wx/core/bitmap_combobox.rb |
wxruby3-0.9.0-x64-mingw-ucrt | lib/wx/core/bitmap_combobox.rb |