### In Files

- wxconstructor.rb

### Parent

Object

### Methods

- hbox_sizer
- new
- page
- sizer
- static_hbox_sizer
- static_vbox_sizer
- stretch_spacer
- vbox_sizer
- widget
- window

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

# WxConstructor

### Attributes

body[R]

(Not documented)

parent[R]

(Not documented)

### Public Class Methods

new(body, parent = nil) click to toggle source

(Not documented)

    # File wxconstructor.rb, line 20
            def initialize(body, parent = nil)
                    @body = body
                    @parent = parent
                    @location_args = [0, 0, 0]
            end

### Public Instance Methods

hbox_sizer(&block) click to toggle source

(Not documented)

    # File wxconstructor.rb, line 60
            def hbox_sizer(&block)
                    sizer(Wx::BoxSizer, Wx::HORIZONTAL, &block)
            end

page(label, cls = Wx::Panel, *args, &block) click to toggle source

(Not documented)

    # File wxconstructor.rb, line 40
            def page(label, cls = Wx::Panel, *args, &block)
                    wid = widget(cls, *args, &block)

                    @body.add_page(wid, label)
            end

sizer(cls, *args, &block) click to toggle source

(Not documented)

    # File wxconstructor.rb, line 46
            def sizer(cls, *args, &block)
                    sz = cls.new(*args)
                    self.class.new(sz, self).instance_exec(sz, &block) if block

                    case @body
                    when Wx::Sizer then
                            @body.add(sz, *@location_args)
                    else
                            @body.set_sizer(sz)
                    end

                    return sz
            end

static_hbox_sizer(label, &block) click to toggle source

(Not documented)

    # File wxconstructor.rb, line 68
            def static_hbox_sizer(label, &block)
                    box = Wx::StaticBox.new(parent_widget, :label => label)
                    sizer(Wx::StaticBoxSizer, box, Wx::HORIZONTAL, &block)
            end

static_vbox_sizer(label, &block) click to toggle source

(Not documented)

    # File wxconstructor.rb, line 73
            def static_vbox_sizer(label, &block)
                    box = Wx::StaticBox.new(parent_widget, :label => label)
                    sizer(Wx::StaticBoxSizer, box, Wx::VERTICAL, &block)
            end

stretch_spacer(proportion = @location_args[0]) click to toggle source

(Not documented)

    # File wxconstructor.rb, line 79
            def stretch_spacer(proportion = @location_args[0])
                    @body.add_stretch_spacer(proportion)
            end

vbox_sizer(&block) click to toggle source

(Not documented)

    # File wxconstructor.rb, line 64
            def vbox_sizer(&block)
                    sizer(Wx::BoxSizer, Wx::VERTICAL, &block)
            end

widget(cls, *args, &block) click to toggle source

(Not documented)

    # File wxconstructor.rb, line 27
            def widget(cls, *args, &block)
                    wid = cls.new(parent_widget, *args)
                    self.class.new(wid, self).instance_exec(wid, &block) if block

                    case @body
                    when Wx::Sizer
                            @body.add(wid, *@location_args)
                    end

                    return wid
            end

Also aliased as: window
window(cls, *args, &block) click to toggle source

Alias for widget

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.