FLboxFLTK:OtherFLboxFLbox
A FLTK widget that displays text inside of a box.
Description
Plugin opcode in widgets. This opcode is part of the plugin repository and has to be installed separately. These FLTK widgets do not work on the Mac.
The plugin repository can be found here: https://github.com/csound/plugins
A FLTK widget that displays text inside of a box.
Syntaxihandle FLbox "label", itype, ifont, isize, iwidth, iheight, ix, iy [, image]ihandle FLbox istr, itype, ifont, isize, iwidth, iheight, ix, iy [, image]Initializationihandle -- 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.
istr -- an i-value that is used to get a string via strset, 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.
FLTK label supported symbols.
The @ sign may be followed by the following optional formatting characters, in this order:
# forces square scaling rather than distortion to the widget's shape.+[1-9] or -[1-9] tweaks the scaling a little bigger or smaller.[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:
1 - flat box2 - up box3 - down box4 - thin up box5 - thin down box6 - engraved box7 - embossed box8 - border box9 - shadow box10 - rounded box11 - rounded box with shadow12 - rounded flat box13 - rounded up box14 - rounded down box15 - diamond up box16 - diamond down box17 - oval box18 - oval shadow box19 - oval flat boxifont -- an integer number denoting the font of FLbox.
ifont argument to set the font type. The following values are legal for ifont:
1 - helvetica (same as "Arial" under Windows)2 - helvetica bold3 - helvetica italic4 - helvetica bold italic5 - courier6 - courier bold7 - courier italic8 - courier bold italic9 - times10 - times bold11 - times italic12 - times bold italic13 - symbol14 - screen15 - screen bold16 - dingbatsisize -- 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.
PerformanceFLbox 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.
Examples
Here is an example of the FLbox opcode. It uses the file FLbox.csd.
Example of the FLbox opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See AlsoFLbutBank,
FLbutton,
FLprintk,
FLprintk2,
FLvalueCreditsAuthor: &namegabriel;New in version 4.22Example written by Iain McCurdy, edited by &namekevin;.