FLcount

FLcount --  A FLTK widget opcode that creates a counter.

Description

Allows the user to increase/decrease a value with mouse clicks on a corresponding arrow button.

Syntax

kout, ihandle FLcount "label", imin, imax, istep1, istep2, itype, iwidth, iheight, ix, iy, iopcode [, kp1] [, kp2] [, kp3] [...] [, kpN]

Initialization

ihandle -- a handle value (an integer number) that unequivocally references a corresponding widget. Used by further opcodes that changes some valuator's properties. It is automatically set by the corresponding valuator.

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

imin -- minimum value of output range

imax -- maximum value of output range

istep1 -- a floating-point number indicating the increment of valuator value corresponding to of each mouse click. istep1 is for coarse adjustments.

istep2 -- a floating-point number indicating the increment of valuator value corresponding to of each mouse click. istep2 is for fine adjustments.

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

iwidth -- width of widget.

iheight -- height of widget.

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

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

iopcode -- score opcode type. You have to provide the ascii code of the letter corresponding to the score opcode. At present time only "i" (ascii code 105) score statements are supported. A zero value refers to a default value of "i". So both 0 and 105 activates the i opcode. A value of -1 disables this opcode feature.

Performance

kout -- output value

kp1, kp2, ..., kpN -- arguments of the activated instruments.

FLcount allows the user to increase/decrease a value with mouse clicks on corresponding arrow buttons:

FLcount.

FLcount.

There are two kind of arrow buttons, for larger and smaller steps. Notice that FLcount not only outputs a value and a handle, but can also activate (schedule) an instrument provided by the user each time a button is pressed. P-fields of the activated instrument are kp1 (instrument number), kp2 (action time), kp3 (duration) and so on with user p-fields. If the iopcode argument is set to a negative number, no instrument is activated. So this feature is optional.

See Also

FLjoy, FLkeyb, FLknob, FLroller, FLslider, FLtext

Credits

Author: Gabriel Maldonado

New in version 4.22