In Files

Parent

Files

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.