Class: Iup::VBox
- Includes:
- DynamicFillMethods
- Defined in:
- lib/wrapped/vbox.rb
Overview
A container for one or more child widgets, arranged in a vertical column.
Attributes
- alignment
-
horizontal alignment of children, ‘atop’ / ‘acenter’ / ‘abottom’
- clientoffset
-
read-only, returns current offset of box in its client as “widthxheight”.
- clientsize
-
read-only, returns current size of box as “widthxheight”.
- expand
-
Allows container to fill available space in indicated direction. Values ‘no’ / ‘horizontal’ / ‘vertical’ / ‘yes’.
- expandchildren
-
Set to allow children to expand fully, values as ‘yes’ / ‘no’.
- gap
-
Number of pixels between children, default value of 0.
- homogeneous
-
Set to force all children to get equal size, values as ‘yes’ / ‘no’.
- margin
-
Margin in x and y directions, value as “mxn”.
- normalsize
-
Set to make natural size of children same, values as ‘yes’ / ‘no’.
- position
-
read-only returns position in pixels within client window as “x,y”.
- rastersize
-
Size of the container, in pixels, value as “widthxheight”.
Instance Attribute Summary
Attributes inherited from Widget
Instance Method Summary collapse
-
#initialize(*widgets, &block) ⇒ VBox
constructor
Creates an instance of the vbox.
Methods included from DynamicFillMethods
Methods inherited from Widget
#assign_handle, #enterwindow_cb, #getfocus_cb, #help_cb, #k_any, #killfocus_cb, #leavewindow_cb, #map_cb, #open_controls, #unmap_cb
Methods included from AttributeBuilders
#define_attribute, #define_id_attribute, #define_id_readonly, #define_id_writeonly, #define_property_attribute, #define_property_writeonly, #define_readonly, #define_writeonly
Methods included from CallbackSetter
Constructor Details
#initialize(*widgets, &block) ⇒ VBox
Creates an instance of the vbox.
- *widgets
-
one or more child widgets
- block
-
optional block to set up the box’s attributes.
28 29 30 31 32 33 |
# File 'lib/wrapped/vbox.rb', line 28 def initialize *, &block @handle = IupLib.IupVbox *() # run any provided block on instance, to set up further attributes self.instance_eval &block if block_given? end |