Class: Iup::BackgroundBox

Inherits:
Widget
  • Object
show all
Defined in:
lib/wrapped/background-box.rb

Overview

Used to contain a child widget, but itself provides no visible decorations.

Attributes

border

Shows a border around the box, values ‘yes’ / ‘no’.

canfocus

Value is read-only and always ‘no’.

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 box to fill available space in indicated direction. Values ‘no’ / ‘horizontal’ / ‘vertical’ / ‘yes’.

Instance Attribute Summary

Attributes inherited from Widget

#handle

Instance Method Summary collapse

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

#define_callback

Constructor Details

#initialize(widget, &block) ⇒ BackgroundBox

Creates an instance of the box.

widget

the child widget to contain

block

optional block to set up the box’s attributes.



20
21
22
23
24
25
# File 'lib/wrapped/background-box.rb', line 20

def initialize widget, &block
  @handle = IupLib.IupBackgroundBox widget.handle

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