Class: Iup::StretchBox
- Includes:
- DynamicFillMethods
- Defined in:
- lib/wrapped/stretchbox.rb
Overview
A stretchable container around one child widget.
Note: named IupSBox in Tecgraf’s documentation.
Also see: SplitBox
Instance Attribute Summary
Attributes inherited from Widget
Instance Method Summary collapse
-
#clientoffset ⇒ Object
:attr_reader: clientoffset returns current offset of box in its client as “widthxheight”.
-
#clientsize ⇒ Object
:attr_reader: clientsize returns current size of box as “widthxheight”.
-
#color ⇒ Object
:attr: color Specify RGB values for stretch bar color, as “r g b”.
-
#direction ⇒ Object
:attr: direction Direction and position of the stretch bar.
-
#expand ⇒ Object
:attr: expand Allows container to fill available space in indicated direction, but only on the side away from the stretch bar.
-
#initialize(widget) {|_self| ... } ⇒ StretchBox
constructor
Creates an instance of the stretch box.
-
#position ⇒ Object
:attr_reader: position returns position in pixels within client window as “x,y”.
-
#rastersize ⇒ Object
:attr: rastersize Size of the container, in pixels, value as “widthxheight”.
-
#showgrip ⇒ Object
:attr: showgrip Grip appearance: * “no” - grip is colored using
colorsetting, * “lines” - shows two parallel lines.
Methods included from DynamicFillMethods
Methods inherited from Widget
#active, #assign_handle, #bgcolor, #destroy, #enterwindow_cb=, #fgcolor, #font, #getfocus_cb=, #help_cb=, #k_any=, #killfocus_cb=, #leavewindow_cb=, #map_cb=, #maxsize, #minsize, #open_controls, #size, #unmap_cb=, #visible, #wid, #zorder
Methods included from AttributeBuilders
#define_attribute, #define_id_attribute, #define_id_reader, #define_id_writer, #define_property_attribute, #define_property_reader, #define_property_writer, #define_reader, #define_writer
Methods included from CallbackSetter
Constructor Details
#initialize(widget) {|_self| ... } ⇒ StretchBox
Creates an instance of the stretch box. If a block is given, the new instance is yielded to it.
-
widget- the widget to contain
16 17 18 19 20 21 |
# File 'lib/wrapped/stretchbox.rb', line 16 def initialize @handle = IupLib.IupSbox(.handle) # run any provided block on instance, to set up further attributes yield self if block_given? end |
Instance Method Details
#clientoffset ⇒ Object
:attr_reader: clientoffset returns current offset of box in its client as “widthxheight”.
28 |
# File 'lib/wrapped/stretchbox.rb', line 28 define_reader :clientoffset |
#clientsize ⇒ Object
:attr_reader: clientsize returns current size of box as “widthxheight”.
33 |
# File 'lib/wrapped/stretchbox.rb', line 33 define_reader :clientsize |
#color ⇒ Object
:attr: color Specify RGB values for stretch bar color, as “r g b”.
38 |
# File 'lib/wrapped/stretchbox.rb', line 38 define_attribute :color |
#direction ⇒ Object
:attr: direction Direction and position of the stretch bar. Values as ‘east’ / ‘west’ / ‘north’ / ‘south’.
44 |
# File 'lib/wrapped/stretchbox.rb', line 44 define_attribute :direction |
#expand ⇒ Object
:attr: 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’.
51 |
# File 'lib/wrapped/stretchbox.rb', line 51 define_attribute :expand |
#position ⇒ Object
:attr_reader: position returns position in pixels within client window as “x,y”.
56 |
# File 'lib/wrapped/stretchbox.rb', line 56 define_attribute :position |
#rastersize ⇒ Object
:attr: rastersize Size of the container, in pixels, value as “widthxheight”.
61 |
# File 'lib/wrapped/stretchbox.rb', line 61 define_attribute :rastersize |
#showgrip ⇒ Object
:attr: showgrip Grip appearance:
-
“no” - grip is colored using
colorsetting, -
“lines” - shows two parallel lines
68 |
# File 'lib/wrapped/stretchbox.rb', line 68 define_attribute :showgrip |