Class: Iup::StretchBox

Inherits:
Widget
  • Object
show all
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

#handle

Instance Method Summary collapse

Methods included from DynamicFillMethods

#append, #insert

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

#define_callback

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

Yields:

  • (_self)

Yield Parameters:



16
17
18
19
20
21
# File 'lib/wrapped/stretchbox.rb', line 16

def initialize widget
  @handle = IupLib.IupSbox(widget.handle)

  # run any provided block on instance, to set up further attributes
  yield self if block_given?
end

Instance Method Details

#clientoffsetObject

:attr_reader: clientoffset returns current offset of box in its client as “widthxheight”.



28
# File 'lib/wrapped/stretchbox.rb', line 28

define_reader :clientoffset

#clientsizeObject

:attr_reader: clientsize returns current size of box as “widthxheight”.



33
# File 'lib/wrapped/stretchbox.rb', line 33

define_reader :clientsize

#colorObject

:attr: color Specify RGB values for stretch bar color, as “r g b”.



38
# File 'lib/wrapped/stretchbox.rb', line 38

define_attribute :color

#directionObject

: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

#expandObject

: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

#positionObject

:attr_reader: position returns position in pixels within client window as “x,y”.



56
# File 'lib/wrapped/stretchbox.rb', line 56

define_attribute :position

#rastersizeObject

:attr: rastersize Size of the container, in pixels, value as “widthxheight”.



61
# File 'lib/wrapped/stretchbox.rb', line 61

define_attribute :rastersize

#showgripObject

:attr: showgrip Grip appearance:

  • “no” - grip is colored using color setting,

  • “lines” - shows two parallel lines



68
# File 'lib/wrapped/stretchbox.rb', line 68

define_attribute :showgrip