Fl::Enumerations - Easily Imported Static Variables
use Fl qw[:enum]; # Import everything! use Fl qw[:font]; # Import fonts
This file contains type definitions and general enumerations.
Values are exported directly or with tags.
:version
This tag imports values related to the library and its version number:
The major release version of this FLTK library.
The minor release version for this library.
FLTK remains mostly source-code compatible between minor version changes.
The patch version for this library.
FLTK remains binary compatible between patches.
The FLTK version number.
FL_MAJOR_VERSION + (FL_MINOR_VERSION * 0.01) + (FL_PATCH_VERSION * 0.0001)
:box
Events are identified by an enumeration value. If you subclass a widget, these are passed to your handle(...) method. The following events are currently defined:
handle(...)
Values related to Fl::Box box types including:
Nothing is drawn at all. This box is invisible and the default for Fl::Box->new(...).
A flat box.
The first free box type for creation of new box types.
:label
The labeltype() method of Fl::Widget sets the type of the label. The following standard label types are included:
labeltype()
Draws the text.
Does nothing.
Draws a drop shadow under the text.
Draws edges as though the text is engraved.
Draws edges as though the text is raised.
:font
The following may be imported with this tag:
This is the approximate height of a font in pixels.
Helvetica (or Arial) normal.
Helvetica (or Arial) bold.
Helvetica (or Arial) oblique.
Helvetica (or Arial) bold-oblique.
Courier normal.
Courier bold.
Courier italic.
Courier bold-italic.
Times roman.
Times roman bold.
Times roman italic.
Times roman bold-italic.
Standard symbol font.
Default monospaced screen font.
Default monospaced bold screen font.
Zapf-dingbats font.
See https://en.wikipedia.org/wiki/Zapf_Dingbats
First one free to allocate for custom fonts.
Add this to FL_HELVETICA, FL_COURIER, or FL_TIMES.
FL_HELVETICA
FL_COURIER
FL_TIMES
:chart
This tag imports values related to Fl::Chart:
Each sample value is drawn as a vertical bar.
The chart is filled from the bottom of the graph to the sample values.
Each sample value is drawn as a horizontal bar.
The chart is drawn as a polyline with vertices at each sample value.
A pie chart is drawn with each sample value being drawn as a proportionate slice in the circle.
Like FL_PIE_CHART but the first slice is separated from the pie.
FL_PIE_CHART
Each sample value is drawn as a vertical line.
:when
This tag imports values related to when callbacks are triggered for widgets:
Never call the callback.
Do the callback only when the widget value changes.
Do the callback whenever the user interacts with the widget.
Do the callback when the button or key is released and the value changes.
Do the callback when the button or key is released, even if the value doesn't change.
Do the callback when the user presses the ENTER key and the value changes.
Do the callback when the user presses the ENTER key, even if the value doesn't change.
:keyboard
This tag imports values related to keyboard keys. These are often used for callback triggering and when(...).
A mouse button; use Fl_Button + n for mouse button n.
The backspace key.
The tab key.
The additional key of ISO keyboards.
The enter key.
The pause key.
The scroll lock key.
The escape key.
The Kana key of JIS keyboards.
The Eisu key of JIS keyboards.
The Yen key of JIS keyboards.
FL_JIS_Underscore
The underscore key of JIS keyboards.
The home key.
The left arrow key.
The up arrow key.
The right arrow key.
The down arrow key.
The page-up key.
The page-down key.
The end key.
The print (or print-screen) key.
The insert key.
The menu key.
The 'help' key on Mac keyboards
The num lock key.
One of the keypad numbers; use FL_KP + 'n' for digit n.
The enter key on the keypad, same as Fl_KP+'\\r'.
The last keypad key; use to range-check keypad.
One of the function keys; use FL_F + n for function key n.
The last function key; use to range-check function keys.
The lefthand shift key.
The righthand shift key.
The lefthand control key.
The righthand control key.
The caps lock key.
The left meta/Windows key.
The right meta/Windows key.
The left alt key.
The right alt key.
The delete key.
Volume control down
Mute sound from the system
Volume control up
Start playing of audio
Stop playing audio
Previous track
Next track
Display user's home page
Invoke user's mail program
Search
Like back on a browser
Like forward on a browser
Stop current operation
Refresh the page
Put system to sleep
Show favorite locations
The following constants define bits in the Fl::event_state() value. You get these with :keyboard as well.
One of the shift keys is down
The caps lock is on
One of the ctrl keys is down
One of the alt keys is down
The num lock is on
One of the meta/Windows keys is down
The scroll lock is on
All keys are 16 bit for now
An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X
:mouse
These constants define the button numbers for FL_PUSH and FL_RELEASE events.
See also Fl::event_button().
The left mouse button
The middle mouse button
The right mouse button
The following constants define bits in the Fl::event_state() value. You get these with :mouse as well.
Mouse button 1 is pushed
Mouse button 2 is pushed
Mouse button 3 is pushed
Any mouse button is pushed
:align
Flags to control the label alignment.
This controls how labels are displayed next to or inside the widget. The default value is FL_ALIGN_CENTER for most widgets which centers the label inside the widget.
Flags can be or'd to achieve a combination of alignments.
Outside alignments:
TOP_LEFT TOP TOP_RIGHT LEFT_TOP+---------------------------------+RIGHT_TOP | | LEFT| |RIGHT | | LEFT_BOTTOM+---------------------------------+RIGHT_BOTTOM BOTTOM_RIGHT BOTTOM BOTTOM_LEFT
Inside alignments:
+---------------------------------+ |TOP_LEFT TOP TOP_RIGHT| | | |LEFT RIGHT| | | |BOTTOM_RIGHT BOTTOM BOTTOM_LEFT| +---------------------------------+
The following values are exported with the :align tag:
Align the label horizontally in the middle.
Align the label at the top of the widget.
Align the label at the bottom of the widget.
Align the label at the left of the widget.
Align the label to the right of the widget.
Draw the label inside of the widget.
If the label contains an image, draw the text on top of the image.
If the label contains an image, draw the text below the image.
All parts of the label that are lager than the widget will not be drawn.
Wrap text that does not fit the width of the widget.
If the label contains an image, draw the text to the right of the image.
If the label contains an image, draw the text to the left of the image.
If the label contains an image, draw the image or deimage in the background.
Copyright (C) Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Sanko Robinson <sanko@cpan.org>
To install Fl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fl
CPAN shell
perl -MCPAN -e shell install Fl
For more information on module installation, please visit the detailed CPAN module installation guide.