Class: Iup::Frame
Overview
A frame contains a child widget and displays it with a border. Optionally, the frame can have a text title.
Attributes
- clientoffset
-
read-only, returns current offset of frame in its client as “widthxheight”.
- clientsize
-
read-only, returns current size of frame as “widthxheight”.
- expand
-
Allows frame to fill available space in indicated direction. Values ‘no’ / ‘horizontal’ / ‘vertical’ / ‘yes’.
- position
-
read-only returns position in pixels within client window as “x,y”.
- rastersize
-
Size of the frame, in pixels, value as “widthxheight”.
- screenposition
-
read-only returns position in pixels on screen as “x,y”.
- sunken
-
For frame with no title, gives a sunken appearance if set: values as ‘yes’ / ‘no’.
- title
-
Text displayed as frame title.
Instance Attribute Summary
Attributes inherited from Widget
Instance Method Summary collapse
-
#initialize(widget, &block) ⇒ Frame
constructor
Creates an instance of the frame.
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) ⇒ Frame
Creates an instance of the frame.
- widget
-
the child widget to contain
- block
-
optional block to set up the box’s attributes.
27 28 29 30 31 32 |
# File 'lib/wrapped/frame.rb', line 27 def initialize , &block @handle = IupLib.IupFrame .handle # run any provided block on instance, to set up further attributes self.instance_eval &block if block_given? end |