FLbox

Name

FLbox --  A FLTK widget that displays text inside of a box.

Description

A FLTK widget that displays text inside of a box.

Syntax

ihandle FLbox "label", itype, ifont, isize, iwidth, iheight, ix, iy [, image]

Initialization

ihandle -- a handle value (an integer number) that unequivocally references a corresponding widget. This is used by other opcodes that modify a widget's properties (see Modifying FLTK Widget Appearance). It is automatically output by FLbox and must not be set by the user label. (The user label is a double-quoted string containing some user-provided text placed near the widget.)

"label" -- a double-quoted string containing some user-provided text, placed near corresponding widget.

Notice that with FLbox, it is not necessary to call the FLsetTextType opcode at all in order to use a symbol. In this case, it is sufficient to set a label starting with "@" followed by the proper formatting string.

The following symbols are supported:

FLTK label supported symbols.

The @ sign may be followed by the following optional "formatting" characters, in this order:

  1. "#" forces square scaling rather than distortion to the widget's shape.

  2. +[1-9] or -[1-9] tweaks the scaling a little bigger or smaller.

  3. [1-9] rotates by a multiple of 45 degrees. "6" does nothing, the others point in the direction of that key on a numeric keypad.

itype -- an integer number denoting the appearance of the widget.

The following values are legal for itype:

ifont -- an integer number denoting the font of FLbox.

ifont argument to set the font type. The following values are legal for ifont:

isize -- size of the font.

iwidth -- width of widget.

iheight -- height of widget.

ix -- horizontal position of the upper left corner of the valuator, relative to the upper left corner of corresponding window. (Expressed in pixels.)

iy -- vertical position of the upper left corner of the valuator, relative to the upper left corner of corresponding window. (Expressed in pixels.)

image -- a handle referring to an eventual image opened with bmopen opcode. If it is set, it allows a skin for that widget.

Note about the bmopen opcode: Although the documentation mentions the bmopen opcode, it has not been implemented in Csound 4.22.

Performance

FLbox is useful to show some text in a window. The text is bounded by a box, whose aspect depends on itype argument.

Note that FLbox is not a valuator and its value is fixed. Its value cannot be modified.

See Also

FLbutBank, FLbutton, FLprintk, FLprintk2, FLvalue

Credits

Author: Gabriel Maldonado

New in version 4.22