Class: Iup::StretchBox
Overview
A stretchable container around one child widget.
Attributes
- clientoffset
-
read-only, returns current offset of box in its client as “widthxheight”.
- clientsize
-
read-only, returns current size of box as “widthxheight”.
- color
-
Specify RGB values for stretch bar colour, as “r g b”.
- direction
-
Direction and position of the stretch bar. Values as ‘east’ / ‘west’ / ‘north’ / ‘south’.
- expand
-
Allows container to fill available space in indicated direction, but only on the side away from the stretch bar. Values ‘no’ / ‘horizontal’ / ‘vertical’ / ‘yes’.
- 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(widget, &block) ⇒ StretchBox
constructor
Creates an instance of the container.
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(widget, &block) ⇒ StretchBox
Creates an instance of the container.
- widget
-
the child widget to contain
- block
-
optional block to set up the container’s attributes.
25 26 27 28 29 30 |
# File 'lib/wrapped/stretchbox.rb', line 25 def initialize , &block @handle = IupLib.IupSbox .handle # run any provided block on instance, to set up further attributes self.instance_eval &block if block_given? end |