Sha256: b79d68bd031476bcab05a4d87db414d73dc8f66a703556b06655a3b7dfe184c0

Contents?: true

Size: 729 Bytes

Versions: 16

Compression:

Stored size: 729 Bytes

Contents

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

# Wx::PG property (and related) classes

module Wx::PG

  class SystemColourProperty < EnumProperty

    # add some 'smart' conversions
    wx_initialize = instance_method :initialize
    define_method :initialize do |label=Wx::PG_LABEL, name=Wx::PG_LABEL, value=Wx::PG::ColourPropertyValue.new|
      value = case value
              when Wx::Colour
                Wx::PG::ColourPropertyValue.new(value)
              when Integer
                Wx::PG::ColourPropertyValue.new(value)
              else
                value
              end
      wx_initialize.bind(self).call(label, name, value)
    end

  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

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