### In Files

- wx/keyword_ctors.rb

### Methods

- args_as_hash
- args_as_list
- describe_constructor
- param_spec
- wx_ctor_params

### Files

- wxruby2.lib

### Class Index

Quicksearch

- Wx
- Wx::AcceleratorTable
- Wx::Animation
- Wx::App
- Wx::ArtProvider
- Wx::AuiNotebook
- Wx::Bitmap
- Wx::BusyCursor
- Wx::CheckListBox
- Wx::Choice
- Wx::ClientDC
- Wx::Clipboard
- Wx::Colour
- Wx::ComboBox
- Wx::CommandEvent
- Wx::ControlWithItems
- Wx::DC
- Wx::Event
- Wx::EvtHandler
- Wx::Font
- Wx::Grid
- Wx::HelpController
- Wx::HelpControllerHelpProvider
- Wx::HelpProvider
- Wx::HtmlHelpController
- Wx::HtmlWindow
- Wx::Icon
- Wx::IconBundle
- Wx::Image
- Wx::ImageList
- Wx::KeywordConstructor
- Wx::KeywordConstructor::ClassMethods
- Wx::ListBox
- Wx::ListCtrl
- Wx::Locale
- Wx::MediaCtrl
- Wx::Menu
- Wx::MenuItem
- Wx::Notebook
- Wx::Object
- Wx::PaintDC
- Wx::Point
- Wx::PreviewFrame
- Wx::Rect
- Wx::RichTextCtrl
- Wx::SimpleHelpProvider
- Wx::Size
- Wx::Sizer
- Wx::Sound
- Wx::StandardPaths
- Wx::TextCtrl
- Wx::TextUrlEvent
- Wx::Timer
- Wx::ToolBar
- Wx::ToolBarTool
- Wx::TreeCtrl
- Wx::Window
- Wx::XmlResource
- Rumix
- Rumix::Application
- Rumix::Config
- Rumix::Registry
- Rumix::Widget
- Rumix::Widget::CheckOptionPanel
- Rumix::Widget::OptionItem
- Rumix::Widget::OptionPanel
- Rumix::Widget::RadioOptionPanel
- Rumix::Widget::TitleText
- ROpt
- ROpt::ArgumentParser
- ROpt::ParseResult
- Uconv
- Uconv::Error
- Enumerable
- File
- Ini
- Kernel
- Module
- Object
- Pathname
- WxConstructor
- WxRubyStyleAccessors

No matching classes.

# 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.