NAME

Fl::Enumerations - Easily Imported Static Variables

Synopsis

use Fl qw[:enum]; # Import everything!
use Fl qw[:font]; # Import fonts

Description

This file contains type definitions and general enumerations.

Exports

Values are exported directly or with tags.

:version

This tag imports values related to the library and its version number:

FL_MAJOR_VERSION

The major release version of this FLTK library.

FL_MINOR_VERSION

The minor release version for this library.

FLTK remains mostly source-code compatible between minor version changes.

FL_PATCH_VERSION

The patch version for this library.

FLTK remains binary compatible between patches.

FL_VERSION

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:

FL_NO_EVENT - No event (or an event fltk does not understand) occurred (0).
FL_PUSH - A mouse button was pushed.
FL_RELEASE - A mouse button was released.
FL_ENTER - The mouse pointer entered a widget.
FL_LEAVE - The mouse pointer left a widget.
FL_DRAG - The mouse pointer was moved with a button pressed.
FL_FOCUS - A widget should receive keyboard focus.
FL_UNFOCUS - A widget loses keyboard focus.
FL_KEYBOARD - A key was pressed.
FL_CLOSE - A window was closed.
FL_MOVE - The mouse pointer was moved with no buttons pressed.
FL_SHORTCUT - The user pressed a shortcut key.
FL_DEACTIVATE - The widget has been deactivated.
FL_ACTIVATE - The widget has been activated.
FL_HIDE - The widget has been hidden.
FL_SHOW - The widget has been shown.
FL_PASTE - The widget should paste the contents of the clipboard.
FL_SELECTIONCLEAR - The widget should clear any selections made for the clipboard.
FL_MOUSEWHEEL - The horizontal or vertical mousewheel was turned.
FL_DND_ENTER - The mouse pointer entered a widget dragging data.
FL_DND_DRAG - The mouse pointer was moved dragging data.
FL_DND_LEAVE - The mouse pointer left a widget still dragging data.
FL_DND_RELEASE - Dragged data is about to be dropped.
FL_SCREEN_CONFIGURATION_CHANGED - The screen configuration (number, positions) was changed.
FL_FULLSCREEN - The fullscreen state of the window has changed

:box

Values related to Fl::Box box types including:

FL_NO_BOX

Nothing is drawn at all. This box is invisible and the default for Fl::Box->new(...).

FL_FLAT_BOX

A flat box.

FL_UP_BOX
FL_DOWN_BOX
FL_UP_FRAME
FL_DOWN_FRAME
FL_THIN_UP_BOX
FL_THIN_DOWN_BOX
FL_THIN_UP_FRAME
FL_THIN_DOWN_FRAME
FL_ENGRAVED_BOX
FL_EMBOSSED_BOX
FL_ENGRAVED_FRAME
FL_EMBOSSED_FRAME
FL_BORDER_BOX
FL_BORDER_FRAME
FL_FREE_BOXTYPE

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:

FL_NORMAL_LABEL

Draws the text.

FL_NO_LABEL

Does nothing.

FL_SHADOW_LABEL

Draws a drop shadow under the text.

FL_ENGRAVED_LABEL

Draws edges as though the text is engraved.

FL_EMBOSSED_LABEL

Draws edges as though the text is raised.

:font

The following may be imported with this tag:

FL_NORMAL_SIZE

This is the approximate height of a font in pixels.

FL_HELVETICA

Helvetica (or Arial) normal.

FL_HELVETICA_BOLD

Helvetica (or Arial) bold.

FL_HELVETICA_ITALIC

Helvetica (or Arial) oblique.

FL_HELVETICA_BOLD_ITALIC

Helvetica (or Arial) bold-oblique.

FL_COURIER

Courier normal.

FL_COURIER_BOLD

Courier bold.

FL_COURIER_ITALIC

Courier italic.

FL_COURIER_BOLD_ITALIC

Courier bold-italic.

FL_TIMES

Times roman.

FL_TIMES_BOLD

Times roman bold.

FL_TIMES_ITALIC

Times roman italic.

FL_TIMES_BOLD_ITALIC

Times roman bold-italic.

FL_SYMBOL

Standard symbol font.

FL_SCREEN

Default monospaced screen font.

FL_SCREEN_BOLD

Default monospaced bold screen font.

FL_ZAPF_DINGBATS

Zapf-dingbats font.

See https://en.wikipedia.org/wiki/Zapf_Dingbats

FL_FREE_FONT

First one free to allocate for custom fonts.

FL_BOLD

Add this to FL_HELVETICA, FL_COURIER, or FL_TIMES.

FL_ITALIC

Add this to FL_HELVETICA, FL_COURIER, or FL_TIMES.

FL_BOLD_ITALIC

Add this to FL_HELVETICA, FL_COURIER, or FL_TIMES.

:chart

This tag imports values related to Fl::Chart:

FL_BAR_CHART

Each sample value is drawn as a vertical bar.

FL_FILLED_CHART

The chart is filled from the bottom of the graph to the sample values.

FL_HORBAR_CHART

Each sample value is drawn as a horizontal bar.

FL_LINE_CHART

The chart is drawn as a polyline with vertices at each sample value.

FL_PIE_CHART

A pie chart is drawn with each sample value being drawn as a proportionate slice in the circle.

FL_LINE_CHART

Like FL_PIE_CHART but the first slice is separated from the pie.

FL_SPIKE_CHART

Each sample value is drawn as a vertical line.

:when

This tag imports values related to when callbacks are triggered for widgets:

FL_WHEN_NEVER

Never call the callback.

FL_WHEN_CHANGED

Do the callback only when the widget value changes.

FL_WHEN_NOT_CHANGED

Do the callback whenever the user interacts with the widget.

FL_WHEN_RELEASE

Do the callback when the button or key is released and the value changes.

FL_WHEN_RELEASE_ALWAYS

Do the callback when the button or key is released, even if the value doesn't change.

FL_WHEN_ENTER_KEY

Do the callback when the user presses the ENTER key and the value changes.

FL_WHEN_ENTER_KEY_ALWAYS

Do the callback when the user presses the ENTER key, even if the value doesn't change.

FL_WHEN_ENTER_KEY_CHANGED

:keyboard

This tag imports values related to keyboard keys. These are often used for callback triggering and when(...).

FL_Button

A mouse button; use Fl_Button + n for mouse button n.

FL_BackSpace

The backspace key.

FL_Tab

The tab key.

FL_Iso_Key

The additional key of ISO keyboards.

FL_Enter

The enter key.

FL_Pause

The pause key.

FL_Scroll_Lock

The scroll lock key.

FL_Escape

The escape key.

FL_Kana

The Kana key of JIS keyboards.

FL_Eisu

The Eisu key of JIS keyboards.

FL_Yen

The Yen key of JIS keyboards.

FL_JIS_Underscore

The underscore key of JIS keyboards.

FL_Home

The home key.

FL_Left

The left arrow key.

FL_Up

The up arrow key.

FL_Right

The right arrow key.

FL_Down

The down arrow key.

FL_Page_Up

The page-up key.

FL_Page_Down

The page-down key.

FL_End

The end key.

FL_Print

The print (or print-screen) key.

FL_Insert

The insert key.

FL_Menu

The menu key.

FL_Help

The 'help' key on Mac keyboards

FL_Num_Lock

The num lock key.

FL_KP

One of the keypad numbers; use FL_KP + 'n' for digit n.

FL_KP_Enter

The enter key on the keypad, same as Fl_KP+'\\r'.

FL_KP_Last

The last keypad key; use to range-check keypad.

FL_F

One of the function keys; use FL_F + n for function key n.

FL_F_Last

The last function key; use to range-check function keys.

FL_Shift_L

The lefthand shift key.

FL_Shift_R

The righthand shift key.

FL_Control_L

The lefthand control key.

FL_Control_R

The righthand control key.

FL_Caps_Lock

The caps lock key.

FL_Meta_L

The left meta/Windows key.

FL_Meta_R

The right meta/Windows key.

FL_Alt_L

The left alt key.

FL_Alt_R

The right alt key.

FL_Delete

The delete key.

FL_Volume_Down

Volume control down

FL_Volume_Mute

Mute sound from the system

FL_Volume_Up

Volume control up

FL_Media_Play

Start playing of audio

FL_Media_Stop

Stop playing audio

FL_Media_Prev

Previous track

FL_Media_Next

Next track

FL_Home_Page

Display user's home page

FL_Mail

Invoke user's mail program

Search

FL_Back

Like back on a browser

FL_Forward

Like forward on a browser

FL_Stop

Stop current operation

FL_Refresh

Refresh the page

FL_Sleep

Put system to sleep

FL_Favorites

Show favorite locations

The following constants define bits in the Fl::event_state() value. You get these with :keyboard as well.

FL_SHIFT

One of the shift keys is down

FL_CAPS_LOCK

The caps lock is on

FL_CTRL

One of the ctrl keys is down

FL_ALT

One of the alt keys is down

FL_NUM_LOCK

The num lock is on

FL_META

One of the meta/Windows keys is down

FL_SCROLL_LOCK

The scroll lock is on

FL_KEY_MASK

All keys are 16 bit for now

FL_COMMAND

An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X

FL_CONTROL

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().

FL_LEFT_MOUSE

The left mouse button

FL_MIDDLE_MOUSE

The middle mouse button

FL_RIGHT_MOUSE

The right mouse button

The following constants define bits in the Fl::event_state() value. You get these with :mouse as well.

FL_BUTTON1

Mouse button 1 is pushed

FL_BUTTON2

Mouse button 2 is pushed

FL_BUTTON3

Mouse button 3 is pushed

FL_BUTTONS

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:

FL_ALIGN_CENTER

Align the label horizontally in the middle.

FL_ALIGN_TOP

Align the label at the top of the widget.

FL_ALIGN_BOTTOM

Align the label at the bottom of the widget.

FL_ALIGN_LEFT

Align the label at the left of the widget.

FL_ALIGN_RIGHT

Align the label to the right of the widget.

FL_ALIGN_INSIDE

Draw the label inside of the widget.

FL_ALIGN_TEXT_OVER_IMAGE

If the label contains an image, draw the text on top of the image.

FL_ALIGN_IMAGE_OVER_TEXT

If the label contains an image, draw the text below the image.

FL_ALIGN_CLIP

All parts of the label that are lager than the widget will not be drawn.

FL_ALIGN_WRAP

Wrap text that does not fit the width of the widget.

FL_ALIGN_IMAGE_NEXT_TO_TEXT

If the label contains an image, draw the text to the right of the image.

FL_ALIGN_TEXT_NEXT_TO_IMAGE

If the label contains an image, draw the text to the left of the image.

FL_ALIGN_IMAGE_BACKDROP

If the label contains an image, draw the image or deimage in the background.

FL_ALIGN_TOP_LEFT
FL_ALIGN_TOP_RIGHT
FL_ALIGN_BOTTOM_LEFT
FL_ALIGN_BOTTOM_RIGHT
FL_ALIGN_LEFT_TOP
FL_ALIGN_RIGHT_TOP
FL_ALIGN_LEFT_BOTTOM
FL_ALIGN_RIGHT_BOTTOM
FL_ALIGN_NOWRAP
FL_ALIGN_POSITION_MASK
FL_ALIGN_IMAGE_MASK

LICENSE

Copyright (C) Sanko Robinson.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Sanko Robinson <sanko@cpan.org>