FLsetText — Sets the label of a FLTK widget.
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
FLsetText sets the label of the target widget to the double-quoted text string provided with the itext argument.
“itext” -- a double-quoted string denoting the text of the label of the widget.
istr -- an i-value that denotes a string via strset denoting the text of the label of the widget.
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.
Here is an example of the FLsetText opcode. It uses the file FLsetText.csd.
Example 332. Example of the FLsetText opcode.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform ; Audio out Audio in No messages -odac -iadc -d ;;;RT audio I/O ; For Non-realtime ouput leave only the line below: ; -o FLsetText.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> sr = 44100 ksmps = 128 nchnls = 2 ; Example by Giorgio Zucco and Andres Cabrera 2007 FLpanel "FLsetText",250,100,50,50 gk1,giha FLcount "", 1, 20, 1, 20, 1, 200, 40, 20, 20, 0, 1, 0, 1 FLpanelEnd FLrun instr 1 ; This instrument is triggered by FLcount above each time ; its value changes iname = i(gk1) print iname ; Must use FLsetText on the init pass! if (iname == 1) igoto text1 if (iname == 2) igoto text2 if (iname == 3) igoto text3 igoto end text1: FLsetText "FM",giha igoto end text2: FLsetText "GRANUL",giha igoto end text3: FLsetText "PLUCK",giha igoto end end: endin </CsInstruments> <CsScore> f 0 3600 </CsScore> </CsoundSynthesizer>
FLcolor2, FLhide, FLlabel, FLsetAlign, FLsetBox, FLsetColor, FLsetColor2, FLsetFont, FLsetPosition, FLsetSize, FLsetText, FLsetTextColor, FLsetTextSize, FLsetTextType, FLsetVal_i, FLsetVal, FLshow