FLmouseFLTK:OtherFLmouseFLmouse
Returns the mouse position and the state of the three mouse buttons.
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/pluginsFLmouse returns the coordinates of the mouse position within an FLTK panel and the state of the three mouse buttons.
Syntaxkx, ky, kb1, kb2, kb3 FLmouse [imode]Initializationimode – (optional, default = 0) Determines the mode for mouse location reporting.
0 - Absolute position normalized to range 0-11 - Absolute raw pixel position2 - Raw pixel position, relative to FLTK panelPerformancekx, ky – the mouse coordinates, whose range depends on the imode argument (see above).
kb1, kb2, kb3 – the states of the mouse buttons, 1 when corresponding button is pressed, 0 when the button is not pressed.
FLmouse returns the coordinates of the mouse position and the state of the three mouse buttons. The coordinates can be retrieved in three modes depending on the imode argument value (see above). Modes 0 and 1 report mouse position in relation to the complete screen (Absolute mode), while mode 2, reports the pixel position within an FLTK panel. Notice that FLmouse is only active when the mouse cursor passes on an FLpanel area.
Examples
Here is an example of the FLmouse opcode. It uses the file FLmouse.csd.
Example of the FLmouse opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.CreditsAuthor: &namegabriel;New in version 5.06