Files

Wx::KeywordConstructor::ClassMethods

Constants

STANDARD_DEFAULTS
Common Wx constructor argument keywords, with their default values.

Attributes

param_spec[W]

(Not documented)

Public Instance Methods

args_as_hash(*mixed_args) click to toggle source

(Not documented)

# File wx/keyword_ctors.rb, line 134
      def args_as_hash(*mixed_args)
        kwa = mixed_args.last.kind_of?(Hash) ? mixed_args.pop : {}
        param_spec.zip(mixed_args) do | param, arg |
          kwa[param.name] = arg if arg
        end
        kwa 
      end
args_as_list(*mixed_args) click to toggle source

(Not documented)

# File wx/keyword_ctors.rb, line 130
      def args_as_list(*mixed_args)
        Wx::args_as_list(param_spec, *mixed_args)
      end
describe_constructor() click to toggle source

(Not documented)

# File wx/keyword_ctors.rb, line 142
      def describe_constructor()
        param_spec.inject("") do | desc, param |
          desc << ":#{param.name} => (#{param.default.class.name})\n"
        end
      end
param_spec() click to toggle source

(Not documented)

# File wx/keyword_ctors.rb, line 110
      def param_spec
        @param_spec ||= []
      end
wx_ctor_params(*params) click to toggle source

Adds a list of named parameters params to the parameter specification for this Wx class’s constructor. Each parameter should be specified as a either a common known symbol, such as :size or :pos: or :style: (corresponding to the common constructor arguments in WxWidgets API), or a single-key with the key the name of the argument, and the value a default value.

Parameters should be specified in the order they occur in the Wx API constructor

# File wx/keyword_ctors.rb, line 123
      def wx_ctor_params(*params)
        self.param_spec += params.map do | param |
          param.kind_of?(Hash) ? Parameter[*param.to_a.flatten] : 
            Parameter[param, STANDARD_DEFAULTS[param] ]
        end
      end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.