FLsetTextType
Prev | Orchestra Opcodes and Operators | Next

## FLsetTextType

FLsetTextType — Sets some font attributes of the text label of a FLTK widget.

## 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

FLsetTextType sets some attributes related to the fonts of the text label of the target widget.

## Syntax

    FLsetTextType itype, ihandle

## Initialization

itype -- an integer number that modify the appearance of the target widget.

The legal values of itype are:

- 0 - normal label

- 1 - no label (hides the text)

- 2 - symbol label (see below)

- 3 - shadow label

- 4 - engraved label

- 5- embossed label

- 6- bitmap label (not implemented yet)

- 7- pixmap label (not implemented yet)

- 8- image label (not implemented yet)

- 9- multi label (not implemented yet)

- 10- free-type label (not implemented yet)

When using itype=3 (symbol label), it is possible to assign a graphical symbol instead of the text label of the target widget. In this case, the string of the target label must always start with “@”. If it starts with something else (or the symbol is not found), the label is drawn normally. 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.

Notice that with FLbox and FLbutton, it is not necessary to call 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.

ihandle -- an integer number (used as unique identifier) taken from the output of a previously located widget opcode (which corresponds to the target widget). It is used to unequivocally identify the widget when modifying its appearance with this class of opcodes. The user must not set the ihandle value directly, otherwise a Csound crash will occur.

## See Also

FLcolor2, FLhide, FLlabel, FLsetAlign, FLsetBox, FLsetColor, FLsetColor2, FLsetFont, FLsetPosition, FLsetSize, FLsetText, FLsetTextColor, FLsetTextSize, FLsetTextType, FLsetVal_i, FLsetVal, FLshow

## Credits

Author: Gabriel Maldonado

New in version 4.22

Prev | Up | Next
FLsetTextSize | Home | FLsetVal_i