1998-10-20 01:39:29 +04:00
|
|
|
|
//
|
|
|
|
|
// Enumerations for the Fast Light Tool Kit (FLTK).
|
|
|
|
|
//
|
2023-01-05 15:51:30 +03:00
|
|
|
|
// Copyright 1998-2023 by Bill Spitzak and others.
|
1998-10-20 01:39:29 +04:00
|
|
|
|
//
|
2011-07-19 08:49:30 +04:00
|
|
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
|
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
|
|
|
// file is missing or damaged, see the license at:
|
1998-10-20 01:39:29 +04:00
|
|
|
|
//
|
2020-07-01 19:03:10 +03:00
|
|
|
|
// https://www.fltk.org/COPYING.php
|
1998-10-20 01:39:29 +04:00
|
|
|
|
//
|
2020-07-01 19:03:10 +03:00
|
|
|
|
// Please see the following page on how to report bugs and issues:
|
2005-04-16 04:13:17 +04:00
|
|
|
|
//
|
2020-07-01 19:03:10 +03:00
|
|
|
|
// https://www.fltk.org/bugs.php
|
1998-10-20 01:39:29 +04:00
|
|
|
|
//
|
|
|
|
|
|
2008-08-10 18:07:09 +04:00
|
|
|
|
/** \file
|
2011-04-24 21:09:41 +04:00
|
|
|
|
This file contains type definitions and general enumerations.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
|
|
|
|
|
1998-10-06 22:21:25 +04:00
|
|
|
|
#ifndef Fl_Enumerations_H
|
|
|
|
|
#define Fl_Enumerations_H
|
|
|
|
|
|
2015-07-12 22:23:55 +03:00
|
|
|
|
/*
|
2015-04-04 18:36:04 +03:00
|
|
|
|
******************************************************************************
|
2016-11-19 04:20:53 +03:00
|
|
|
|
* FL_ABI_VERSION is defined by configure or CMake since FLTK 1.3.4.
|
2021-12-19 00:42:30 +03:00
|
|
|
|
* It is written to FL/fl_config.h and #included here.
|
2015-07-12 22:23:55 +03:00
|
|
|
|
******************************************************************************
|
2016-07-09 21:47:06 +03:00
|
|
|
|
* For more informations on FL_ABI_VERSION see README.abi-version.txt.
|
2015-04-04 18:36:04 +03:00
|
|
|
|
******************************************************************************
|
2012-03-06 03:42:07 +04:00
|
|
|
|
*/
|
2015-07-12 22:23:55 +03:00
|
|
|
|
|
2021-12-19 00:42:30 +03:00
|
|
|
|
#include <FL/fl_config.h>
|
2012-03-06 03:42:07 +04:00
|
|
|
|
|
2001-08-04 16:21:34 +04:00
|
|
|
|
# include "Fl_Export.H"
|
2008-09-19 22:49:00 +04:00
|
|
|
|
# include "fl_types.h"
|
2016-04-13 13:48:14 +03:00
|
|
|
|
# include <FL/platform_types.h> // for FL_COMMAND and FL_CONTROL
|
1999-02-17 01:00:04 +03:00
|
|
|
|
|
2008-09-14 17:13:24 +04:00
|
|
|
|
/** \name Version Numbers
|
|
|
|
|
|
|
|
|
|
FLTK defines some constants to help the programmer to
|
|
|
|
|
find out, for which FLTK version a program is compiled.
|
2017-09-12 18:26:36 +03:00
|
|
|
|
|
2008-09-14 17:13:24 +04:00
|
|
|
|
The following constants are defined:
|
|
|
|
|
*/
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2008-08-10 18:07:09 +04:00
|
|
|
|
/**
|
2011-04-24 21:09:41 +04:00
|
|
|
|
The major release version of this FLTK library.
|
2017-09-12 18:26:36 +03:00
|
|
|
|
\see FL_VERSION
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
#define FL_MAJOR_VERSION 1
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/**
|
2011-04-24 21:09:41 +04:00
|
|
|
|
The minor release version for this library.
|
|
|
|
|
|
|
|
|
|
FLTK remains mostly source-code compatible between minor version changes.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
#define FL_MINOR_VERSION 4
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/**
|
2011-04-24 21:09:41 +04:00
|
|
|
|
The patch version for this library.
|
|
|
|
|
|
|
|
|
|
FLTK remains binary compatible between patches.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
#define FL_PATCH_VERSION 0
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/**
|
2011-04-24 21:09:41 +04:00
|
|
|
|
The FLTK version number as a \em double.
|
|
|
|
|
|
2015-04-04 18:36:04 +03:00
|
|
|
|
FL_VERSION is a \em double that describes the major, minor, and patch
|
|
|
|
|
version numbers.
|
|
|
|
|
|
|
|
|
|
Version 1.2.3 is actually stored as 1.0203 to allow for more than 9
|
|
|
|
|
minor and patch releases.
|
|
|
|
|
|
|
|
|
|
\deprecated This \p double version number is retained for compatibility
|
|
|
|
|
with existing program code. New code should use \em int FL_API_VERSION
|
|
|
|
|
instead. FL_VERSION is deprecated because comparisons of floating point
|
2016-07-09 21:47:06 +03:00
|
|
|
|
values may fail due to rounding errors. However, there are currently no
|
|
|
|
|
plans to remove this deprecated constant.
|
2015-04-04 18:36:04 +03:00
|
|
|
|
|
|
|
|
|
FL_VERSION is equivalent to <em>(double)FL_API_VERSION / 10000</em>.
|
|
|
|
|
|
|
|
|
|
\see Fl::version() (deprecated as well)
|
|
|
|
|
\see FL_API_VERSION
|
|
|
|
|
\see Fl::api_version()
|
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
#define FL_VERSION ( (double)FL_MAJOR_VERSION + \
|
|
|
|
|
(double)FL_MINOR_VERSION * 0.01 + \
|
|
|
|
|
(double)FL_PATCH_VERSION * 0.0001 )
|
2015-04-04 18:36:04 +03:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
The FLTK API version number as an \em int.
|
|
|
|
|
|
|
|
|
|
FL_API_VERSION is an \em int that describes the major, minor, and patch
|
|
|
|
|
version numbers.
|
|
|
|
|
|
|
|
|
|
Version 1.2.3 is actually stored as 10203 to allow for more than 9
|
|
|
|
|
minor and patch releases.
|
|
|
|
|
|
|
|
|
|
The FL_MAJOR_VERSION, FL_MINOR_VERSION, and FL_PATCH_VERSION constants
|
|
|
|
|
give the integral values for the major, minor, and patch releases
|
|
|
|
|
respectively.
|
|
|
|
|
|
|
|
|
|
\note FL_API_VERSION is intended to replace the deprecated
|
|
|
|
|
\em double FL_VERSION.
|
|
|
|
|
|
|
|
|
|
\see Fl::api_version()
|
|
|
|
|
*/
|
2015-08-24 18:47:08 +03:00
|
|
|
|
#define FL_API_VERSION (FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100 + FL_PATCH_VERSION)
|
2015-04-04 18:36:04 +03:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
The FLTK ABI (Application Binary Interface) version number as an \em int.
|
|
|
|
|
|
|
|
|
|
FL_ABI_VERSION is an \em int that describes the major, minor, and patch
|
|
|
|
|
ABI version numbers in the same format as FL_API_VERSION.
|
|
|
|
|
|
|
|
|
|
The ABI version number \p FL_ABI_VERSION is usually the same as the
|
|
|
|
|
API version \p FL_API_VERSION with the last two digits set to '00'.
|
|
|
|
|
|
|
|
|
|
FLTK retains the ABI (Application Binary Interface) during patch
|
|
|
|
|
releases of the same major and minor versions. Examples:
|
|
|
|
|
|
|
|
|
|
\verbatim
|
|
|
|
|
FLTK Version FL_API_VERSION FL_ABI_VERSION FL_VERSION (deprecated)
|
|
|
|
|
1.3.0 10300 10300 1.0300
|
2020-07-01 19:03:10 +03:00
|
|
|
|
1.3.4 10304 10300 1.0304
|
2015-04-04 18:36:04 +03:00
|
|
|
|
\endverbatim
|
|
|
|
|
|
|
|
|
|
Version 1.2.3 is actually stored as 10203 to allow for more than 9
|
|
|
|
|
minor and patch releases.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
|
|
|
|
The FL_MAJOR_VERSION, FL_MINOR_VERSION, and FL_PATCH_VERSION constants
|
|
|
|
|
give the integral values for the major, minor, and patch releases
|
|
|
|
|
respectively.
|
2015-04-04 18:36:04 +03:00
|
|
|
|
|
|
|
|
|
To enable new ABI-breaking features in patch releases you can configure
|
|
|
|
|
FLTK to use a higher FL_ABI_VERSION.
|
|
|
|
|
|
2016-07-09 21:47:06 +03:00
|
|
|
|
\see README.abi-version.txt
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2015-04-04 18:36:04 +03:00
|
|
|
|
#ifndef FL_ABI_VERSION
|
|
|
|
|
#define FL_ABI_VERSION (FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Check if FL_ABI_VERSION is out of allowed range; redefine if necessary.
|
|
|
|
|
|
|
|
|
|
This is done to prevent users from defining an illegal ABI version.
|
|
|
|
|
|
|
|
|
|
Rule: FL_MAJOR_VERSION * 10000 + FL_MINOR_VERSION * 100
|
2020-07-01 19:03:10 +03:00
|
|
|
|
<= FL_ABI_VERSION <= FL_API_VERSION.
|
2015-04-04 18:36:04 +03:00
|
|
|
|
|
|
|
|
|
Example (FLTK 1.3.4):
|
|
|
|
|
|
|
|
|
|
10300 <= FL_ABI_VERSION <= 10304
|
|
|
|
|
|
2015-07-12 22:23:55 +03:00
|
|
|
|
Note: configure + CMake can be used to define FL_ABI_VERSION, but they
|
|
|
|
|
do not check validity. This is done here.
|
2015-04-04 18:36:04 +03:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#if FL_ABI_VERSION < FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100
|
|
|
|
|
|
|
|
|
|
# undef FL_ABI_VERSION
|
|
|
|
|
# define FL_ABI_VERSION (FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100)
|
|
|
|
|
|
|
|
|
|
#elif FL_ABI_VERSION > FL_API_VERSION
|
|
|
|
|
|
|
|
|
|
# undef FL_ABI_VERSION
|
|
|
|
|
# define FL_ABI_VERSION FL_API_VERSION
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@}*/ // group: Version Numbers
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2008-08-10 18:07:09 +04:00
|
|
|
|
/**
|
2011-04-24 21:09:41 +04:00
|
|
|
|
Every time a user moves the mouse pointer, clicks a button,
|
|
|
|
|
or presses a key, an event is generated and sent to your
|
|
|
|
|
application. Events can also come from other programs like the
|
|
|
|
|
window manager.
|
2020-07-01 19:03:10 +03:00
|
|
|
|
|
|
|
|
|
Events are identified by the integer argument passed to the
|
|
|
|
|
Fl_Widget::handle() virtual method. Other information about the
|
|
|
|
|
most recent event is stored in static locations and acquired by
|
|
|
|
|
calling the Fl::event_*() methods. This static information remains
|
|
|
|
|
valid until the next event is read from the window system, so it
|
2011-04-24 21:09:41 +04:00
|
|
|
|
is ok to look at it outside of the handle() method.
|
|
|
|
|
|
2014-12-29 00:09:30 +03:00
|
|
|
|
Event numbers can be converted to their actual names using the
|
|
|
|
|
\ref fl_eventnames[] array defined in \#include <FL/names.h>
|
|
|
|
|
|
2017-09-12 18:26:36 +03:00
|
|
|
|
\see Fl::event_text(), Fl::event_key(), class Fl::
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2016-11-19 04:20:53 +03:00
|
|
|
|
// DEV NOTE: Keep this list in sync with FL/names.h
|
2020-07-01 19:03:10 +03:00
|
|
|
|
enum Fl_Event { // events
|
2008-09-14 15:15:17 +04:00
|
|
|
|
/** No event. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_NO_EVENT = 0,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/** A mouse button has gone down with the mouse pointing at this
|
2020-07-01 19:03:10 +03:00
|
|
|
|
widget. You can find out what button by calling Fl::event_button().
|
2011-04-24 21:09:41 +04:00
|
|
|
|
You find out the mouse position by calling Fl::event_x() and
|
|
|
|
|
Fl::event_y().
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
A widget indicates that it "wants" the mouse click by returning non-zero
|
|
|
|
|
from its Fl_Widget::handle() method. It will then become the
|
|
|
|
|
Fl::pushed() widget and will get FL_DRAG and the matching FL_RELEASE events.
|
|
|
|
|
If Fl_Widget::handle() returns zero then FLTK will try sending the FL_PUSH
|
|
|
|
|
to another widget.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_PUSH = 1,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** A mouse button has been released. You can find out what button by
|
2011-04-24 21:09:41 +04:00
|
|
|
|
calling Fl::event_button().
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
In order to receive the FL_RELEASE event, the widget must return
|
2011-04-24 21:09:41 +04:00
|
|
|
|
non-zero when handling FL_PUSH.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_RELEASE = 2,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/** The mouse has been moved to point at this widget. This can
|
2011-04-24 21:09:41 +04:00
|
|
|
|
be used for highlighting feedback. If a widget wants to
|
|
|
|
|
highlight or otherwise track the mouse, it indicates this by
|
|
|
|
|
returning non-zero from its handle() method. It then
|
2020-07-01 19:03:10 +03:00
|
|
|
|
becomes the Fl::belowmouse() widget and will receive
|
2011-04-24 21:09:41 +04:00
|
|
|
|
FL_MOVE and FL_LEAVE events.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_ENTER = 3,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/** The mouse has moved out of the widget.
|
2020-07-01 19:03:10 +03:00
|
|
|
|
In order to receive the FL_LEAVE event, the widget must
|
2011-04-24 21:09:41 +04:00
|
|
|
|
return non-zero when handling FL_ENTER.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_LEAVE = 4,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** The mouse has moved with a button held down. The current button state
|
|
|
|
|
is in Fl::event_state(). The mouse position is in Fl::event_x() and
|
2011-04-24 21:09:41 +04:00
|
|
|
|
Fl::event_y().
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
In order to receive FL_DRAG events, the widget must return non-zero
|
2011-04-24 21:09:41 +04:00
|
|
|
|
when handling FL_PUSH.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_DRAG = 5,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/** This indicates an <I>attempt</I> to give a widget the keyboard focus.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
If a widget wants the focus, it should change itself to display the
|
2011-04-24 21:09:41 +04:00
|
|
|
|
fact that it has the focus, and return non-zero from its handle() method.
|
2020-07-01 19:03:10 +03:00
|
|
|
|
It then becomes the Fl::focus() widget and gets FL_KEYDOWN, FL_KEYUP,
|
2011-04-24 21:09:41 +04:00
|
|
|
|
and FL_UNFOCUS events.
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
The focus will change either because the window manager changed which
|
|
|
|
|
window gets the focus, or because the user tried to navigate using tab,
|
|
|
|
|
arrows, or other keys. You can check Fl::event_key() to figure out why
|
|
|
|
|
it moved. For navigation it will be the key pressed and for interaction
|
2011-04-24 21:09:41 +04:00
|
|
|
|
with the window manager it will be zero.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_FOCUS = 6,
|
|
|
|
|
|
|
|
|
|
/** This event is sent to the previous Fl::focus() widget when another
|
2011-04-24 21:09:41 +04:00
|
|
|
|
widget gets the focus or the window loses focus.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_UNFOCUS = 7,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** A key was pressed (FL_KEYDOWN) or released (FL_KEYUP).
|
2011-04-24 21:09:41 +04:00
|
|
|
|
Fl_KEYBOARD is a synonym for FL_KEYDOWN.
|
|
|
|
|
The key can be found in Fl::event_key().
|
2020-07-01 19:03:10 +03:00
|
|
|
|
The text that the key should insert can be found with Fl::event_text()
|
2011-04-24 21:09:41 +04:00
|
|
|
|
and its length is in Fl::event_length(). If you use the key handle()
|
2020-07-01 19:03:10 +03:00
|
|
|
|
should return 1. If you return zero then FLTK assumes you ignored the
|
|
|
|
|
key and will then attempt to send it to a parent widget. If none of
|
2011-04-24 21:09:41 +04:00
|
|
|
|
them want it, it will change the event into a FL_SHORTCUT event.
|
|
|
|
|
|
|
|
|
|
To receive FL_KEYBOARD events you must also respond to the FL_FOCUS
|
|
|
|
|
and FL_UNFOCUS events.
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
If you are writing a text-editing widget you may also want to call
|
|
|
|
|
the Fl::compose() function to translate individual keystrokes into
|
2011-04-24 21:09:41 +04:00
|
|
|
|
non-ASCII characters.
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_KEYUP events are sent to the widget that currently has focus. This
|
|
|
|
|
is not necessarily the same widget that received the corresponding
|
2011-04-24 21:09:41 +04:00
|
|
|
|
FL_KEYDOWN event because focus may have changed between events.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_KEYDOWN = 8,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2011-04-24 21:09:41 +04:00
|
|
|
|
/** Equivalent to FL_KEYDOWN.
|
|
|
|
|
\see FL_KEYDOWN
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_KEYBOARD = 8,
|
|
|
|
|
|
2008-08-10 18:07:09 +04:00
|
|
|
|
/** Key release event.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
\see FL_KEYDOWN
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_KEYUP = 9,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/** The user clicked the close button of a window.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
This event is used internally only to trigger the callback of
|
2020-07-01 19:03:10 +03:00
|
|
|
|
Fl_Window derived classed. The default callback closes the
|
2011-04-24 21:09:41 +04:00
|
|
|
|
window calling Fl_Window::hide().
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_CLOSE = 10,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** The mouse has moved without any mouse buttons held down.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
This event is sent to the Fl::belowmouse() widget.
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
In order to receive FL_MOVE events, the widget must return
|
2011-04-24 21:09:41 +04:00
|
|
|
|
non-zero when handling FL_ENTER.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_MOVE = 11,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/** If the Fl::focus() widget is zero or ignores an FL_KEYBOARD
|
2020-07-01 19:03:10 +03:00
|
|
|
|
event then FLTK tries sending this event to every widget it
|
|
|
|
|
can, until one of them returns non-zero. FL_SHORTCUT is first
|
|
|
|
|
sent to the Fl::belowmouse() widget, then its parents and siblings,
|
|
|
|
|
and eventually to every widget in the window, trying to find an
|
|
|
|
|
object that returns non-zero. FLTK tries really hard to not to ignore
|
2011-04-24 21:09:41 +04:00
|
|
|
|
any keystrokes!
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
You can also make "global" shortcuts by using Fl::add_handler(). A
|
|
|
|
|
global shortcut will work no matter what windows are displayed or
|
2011-04-24 21:09:41 +04:00
|
|
|
|
which one has the focus.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_SHORTCUT = 12,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** This widget is no longer active, due to Fl_Widget::deactivate()
|
|
|
|
|
being called on it or one of its parents. Fl_Widget::active() may
|
2011-04-24 21:09:41 +04:00
|
|
|
|
still be true after this, the widget is only active if Fl_Widget::active()
|
|
|
|
|
is true on it and all its parents (use Fl_Widget::active_r() to check this).
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_DEACTIVATE = 13,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** This widget is now active, due to Fl_Widget::activate() being
|
2011-04-24 21:09:41 +04:00
|
|
|
|
called on it or one of its parents.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_ACTIVATE = 14,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** This widget is no longer visible, due to Fl_Widget::hide() being
|
|
|
|
|
called on it or one of its parents, or due to a parent window being
|
|
|
|
|
minimized. Fl_Widget::visible() may still be true after this, but the
|
|
|
|
|
widget is visible only if visible() is true for it and all its
|
2011-04-24 21:09:41 +04:00
|
|
|
|
parents (use Fl_Widget::visible_r() to check this).
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_HIDE = 15,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** This widget is visible again, due to Fl_Widget::show() being called on
|
|
|
|
|
it or one of its parents, or due to a parent window being restored.
|
|
|
|
|
Child Fl_Windows respond to this by actually creating the window if not
|
|
|
|
|
done already, so if you subclass a window, be sure to pass FL_SHOW
|
2011-04-24 21:09:41 +04:00
|
|
|
|
to the base class Fl_Widget::handle() method!
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_SHOW = 16,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** You should get this event some time after you call Fl::paste().
|
|
|
|
|
The contents of Fl::event_text() is the text to insert and the number
|
2011-04-24 21:09:41 +04:00
|
|
|
|
of characters is in Fl::event_length().
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_PASTE = 17,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** The Fl::selection_owner() will get this event before the selection is
|
|
|
|
|
moved to another widget. This indicates that some other widget or program
|
|
|
|
|
has claimed the selection. Motif programs used this to clear the selection
|
2011-04-24 21:09:41 +04:00
|
|
|
|
indication. Most modern programs ignore this.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_SELECTIONCLEAR = 18,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/** The user has moved the mouse wheel. The Fl::event_dx() and Fl::event_dy()
|
2011-04-24 21:09:41 +04:00
|
|
|
|
methods can be used to find the amount to scroll horizontally and vertically.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_MOUSEWHEEL = 19,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** The mouse has been moved to point at this widget. A widget that is
|
|
|
|
|
interested in receiving drag'n'drop data must return 1 to receive
|
2011-04-24 21:09:41 +04:00
|
|
|
|
FL_DND_DRAG, FL_DND_LEAVE and FL_DND_RELEASE events.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_DND_ENTER = 20,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** The mouse has been moved inside a widget while dragging data. A
|
|
|
|
|
widget that is interested in receiving drag'n'drop data should
|
2011-04-24 21:09:41 +04:00
|
|
|
|
indicate the possible drop position.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_DND_DRAG = 21,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
|
|
|
|
/** The mouse has moved out of the widget.
|
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_DND_LEAVE = 22,
|
2008-08-10 18:07:09 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** The user has released the mouse button dropping data into the widget.
|
|
|
|
|
If the widget returns 1, it will receive the data in the immediately
|
2011-04-24 21:09:41 +04:00
|
|
|
|
following FL_PASTE event.
|
2008-08-10 18:07:09 +04:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_DND_RELEASE = 23,
|
2011-09-30 12:03:22 +04:00
|
|
|
|
/** The screen configuration (number, positions) was changed.
|
|
|
|
|
Use Fl::add_handler() to be notified of this event.
|
|
|
|
|
*/
|
2012-03-23 20:47:53 +04:00
|
|
|
|
FL_SCREEN_CONFIGURATION_CHANGED = 24,
|
2018-08-30 11:31:53 +03:00
|
|
|
|
/** The fullscreen state of the window has changed.
|
|
|
|
|
This event is sent to the window's handle method.
|
2012-03-23 20:47:53 +04:00
|
|
|
|
*/
|
2015-04-01 18:32:06 +03:00
|
|
|
|
FL_FULLSCREEN = 25,
|
2018-08-30 11:31:53 +03:00
|
|
|
|
/** The user has made a zoom/pinch/magnification gesture (Mac OS platform only).
|
2015-04-01 18:32:06 +03:00
|
|
|
|
The Fl::event_dy() method can be used to find magnification amount,
|
|
|
|
|
Fl::event_x() and Fl::event_y() are set as well.
|
2018-08-30 11:31:53 +03:00
|
|
|
|
This event is sent to the window's handle method.
|
2015-04-01 18:32:06 +03:00
|
|
|
|
*/
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_ZOOM_GESTURE = 26,
|
2018-08-30 13:41:16 +03:00
|
|
|
|
/** A zoom event (ctrl/+/-/0/ or cmd/+/-/0/) was processed.
|
2018-08-30 11:31:53 +03:00
|
|
|
|
Use Fl::add_handler() to be notified of this event.
|
|
|
|
|
*/
|
2023-08-05 17:37:38 +03:00
|
|
|
|
FL_ZOOM_EVENT = 27
|
2016-11-19 04:20:53 +03:00
|
|
|
|
// DEV NOTE: Keep this list in sync with FL/names.h
|
1998-10-06 22:21:25 +04:00
|
|
|
|
};
|
|
|
|
|
|
2008-09-14 17:13:24 +04:00
|
|
|
|
/** \name When Conditions */
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/
|
2008-09-14 15:15:17 +04:00
|
|
|
|
/** These constants determine when a callback is performed.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
2023-01-05 15:51:30 +03:00
|
|
|
|
Fl_When is a bit field. Some values are merely shorcuts for common bit
|
|
|
|
|
combinations. New flags may be added in the future, so it's important to
|
|
|
|
|
mask the required bit when reading via \p when().
|
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
\note Some widgets may not fully support \p FL_WHEN_... flags.
|
2023-01-05 15:51:30 +03:00
|
|
|
|
|
|
|
|
|
\see Fl_Widget::when(), Fl::callback_reason(), Fl_Callback_Reason, Fl_Widget::do_callback()
|
2008-09-14 15:15:17 +04:00
|
|
|
|
*/
|
1998-10-06 22:21:25 +04:00
|
|
|
|
enum Fl_When { // Fl_Widget::when():
|
2023-01-05 15:51:30 +03:00
|
|
|
|
FL_WHEN_NEVER = 0, ///< Never call the callback
|
|
|
|
|
FL_WHEN_CHANGED = 1, ///< Do the callback only when the widget value changes
|
|
|
|
|
FL_WHEN_NOT_CHANGED = 2, ///< Do the callback whenever the user interacts with the widget
|
|
|
|
|
FL_WHEN_RELEASE = 4, ///< Do the callback when the button or key is released and the value changes
|
|
|
|
|
FL_WHEN_RELEASE_ALWAYS = 6, ///< Do the callback when the button or key is released, even if the value doesn't change
|
|
|
|
|
FL_WHEN_ENTER_KEY = 8, ///< Do the callback when the user presses the ENTER key and the value changes
|
|
|
|
|
FL_WHEN_ENTER_KEY_ALWAYS = 10, ///< Do the callback when the user presses the ENTER key, even if the value doesn't change
|
|
|
|
|
FL_WHEN_ENTER_KEY_CHANGED = 11, ///< Do callbacks whether the value changed or not, and when the ENTER key is pressed
|
|
|
|
|
FL_WHEN_CLOSED = 16 ///< Do the callback when a child of Fl_Tabs is closed
|
1998-10-06 22:21:25 +04:00
|
|
|
|
};
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@}*/ // group: When Conditions
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2023-01-05 15:51:30 +03:00
|
|
|
|
|
|
|
|
|
/** \name Callback Reasons */
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/
|
2023-01-05 15:51:30 +03:00
|
|
|
|
/** These constants describe why a callback is performed.
|
|
|
|
|
|
|
|
|
|
\see Fl::callback_reason(), Fl_Widget::when(), Fl_When
|
|
|
|
|
*/
|
|
|
|
|
enum Fl_Callback_Reason {
|
|
|
|
|
FL_REASON_UNKNOWN=0, ///< unknown or unset reason
|
|
|
|
|
FL_REASON_SELECTED, ///< an item was selected
|
|
|
|
|
FL_REASON_DESELECTED, ///< an item was de-selected
|
|
|
|
|
FL_REASON_RESELECTED, ///< an item was re-selected (double-clicked).
|
|
|
|
|
FL_REASON_OPENED, ///< an item was opened
|
|
|
|
|
FL_REASON_CLOSED, ///< an item was closed
|
|
|
|
|
FL_REASON_DRAGGED, ///< an item was dragged into a new place
|
|
|
|
|
FL_REASON_CANCELLED, ///< a dialog was cancelled
|
|
|
|
|
FL_REASON_CHANGED, ///< the value of the widget was modified
|
|
|
|
|
FL_REASON_GOT_FOCUS, ///< a widget received focus
|
|
|
|
|
FL_REASON_LOST_FOCUS, ///< a widget lost focus
|
2023-04-13 21:14:36 +03:00
|
|
|
|
FL_REASON_RELEASED ///< the mouse button was released
|
2023-01-05 15:51:30 +03:00
|
|
|
|
};
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@}*/ // group: Callback Reasons
|
2023-01-05 15:51:30 +03:00
|
|
|
|
|
|
|
|
|
|
2023-02-06 11:40:11 +03:00
|
|
|
|
/** \name Names of Non-ASCII keys and mouse buttons
|
2008-09-14 15:15:17 +04:00
|
|
|
|
|
2023-02-06 11:40:11 +03:00
|
|
|
|
The following constants define the names of non-ASCII keys on the
|
|
|
|
|
keyboard and of mouse buttons for FL_KEYBOARD and FL_SHORTCUT events.
|
2008-09-14 15:15:17 +04:00
|
|
|
|
|
2017-09-12 18:26:36 +03:00
|
|
|
|
\see Fl::event_key() and Fl::get_key(int) (use ASCII letters for all other keys):
|
2008-09-14 15:15:17 +04:00
|
|
|
|
*/
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2009-09-18 02:12:24 +04:00
|
|
|
|
// FIXME: These codes collide with valid Unicode keys
|
|
|
|
|
|
2023-02-06 11:40:11 +03:00
|
|
|
|
#define FL_Button 0xfee8 ///< A mouse button; use <tt>FL_Button + n</tt> for mouse button \c n.
|
2020-07-01 19:03:10 +03:00
|
|
|
|
#define FL_BackSpace 0xff08 ///< The backspace key.
|
|
|
|
|
#define FL_Tab 0xff09 ///< The tab key.
|
|
|
|
|
#define FL_Iso_Key 0xff0c ///< The additional key of ISO keyboards.
|
|
|
|
|
#define FL_Enter 0xff0d ///< The enter key.
|
|
|
|
|
#define FL_Pause 0xff13 ///< The pause key.
|
|
|
|
|
#define FL_Scroll_Lock 0xff14 ///< The scroll lock key.
|
|
|
|
|
#define FL_Escape 0xff1b ///< The escape key.
|
2012-12-26 23:44:56 +04:00
|
|
|
|
#define FL_Kana 0xff2e ///< The Kana key of JIS keyboards.
|
|
|
|
|
#define FL_Eisu 0xff2f ///< The Eisu key of JIS keyboards.
|
|
|
|
|
#define FL_Yen 0xff30 ///< The Yen key of JIS keyboards.
|
|
|
|
|
#define FL_JIS_Underscore 0xff31 ///< The underscore key of JIS keyboards.
|
2020-07-01 19:03:10 +03:00
|
|
|
|
#define FL_Home 0xff50 ///< The home key.
|
|
|
|
|
#define FL_Left 0xff51 ///< The left arrow key.
|
|
|
|
|
#define FL_Up 0xff52 ///< The up arrow key.
|
|
|
|
|
#define FL_Right 0xff53 ///< The right arrow key.
|
|
|
|
|
#define FL_Down 0xff54 ///< The down arrow key.
|
|
|
|
|
#define FL_Page_Up 0xff55 ///< The page-up key.
|
|
|
|
|
#define FL_Page_Down 0xff56 ///< The page-down key.
|
|
|
|
|
#define FL_End 0xff57 ///< The end key.
|
|
|
|
|
#define FL_Print 0xff61 ///< The print (or print-screen) key.
|
|
|
|
|
#define FL_Insert 0xff63 ///< The insert key.
|
|
|
|
|
#define FL_Menu 0xff67 ///< The menu key.
|
|
|
|
|
#define FL_Help 0xff68 ///< The 'help' key on Mac keyboards
|
|
|
|
|
#define FL_Num_Lock 0xff7f ///< The num lock key.
|
2023-02-06 11:40:11 +03:00
|
|
|
|
#define FL_KP 0xff80 ///< One of the keypad numbers; use FL_KP + n' for digit n.
|
2020-07-01 19:03:10 +03:00
|
|
|
|
#define FL_KP_Enter 0xff8d ///< The enter key on the keypad, same as Fl_KP+'\\r'.
|
|
|
|
|
#define FL_KP_Last 0xffbd ///< The last keypad key; use to range-check keypad.
|
|
|
|
|
#define FL_F 0xffbd ///< One of the function keys; use FL_F + n for function key n.
|
|
|
|
|
#define FL_F_Last 0xffe0 ///< The last function key; use to range-check function keys.
|
|
|
|
|
#define FL_Shift_L 0xffe1 ///< The lefthand shift key.
|
|
|
|
|
#define FL_Shift_R 0xffe2 ///< The righthand shift key.
|
|
|
|
|
#define FL_Control_L 0xffe3 ///< The lefthand control key.
|
|
|
|
|
#define FL_Control_R 0xffe4 ///< The righthand control key.
|
|
|
|
|
#define FL_Caps_Lock 0xffe5 ///< The caps lock key.
|
|
|
|
|
#define FL_Meta_L 0xffe7 ///< The left meta/Windows key.
|
|
|
|
|
#define FL_Meta_R 0xffe8 ///< The right meta/Windows key.
|
|
|
|
|
#define FL_Alt_L 0xffe9 ///< The left alt key.
|
|
|
|
|
#define FL_Alt_R 0xffea ///< The right alt key.
|
|
|
|
|
#define FL_Delete 0xffff ///< The delete key.
|
2008-09-14 15:15:17 +04:00
|
|
|
|
|
2011-05-22 01:55:59 +04:00
|
|
|
|
// These use the Private Use Area (PUA) of the Basic Multilingual Plane
|
|
|
|
|
// of Unicode. Guaranteed not to conflict with a proper Unicode character.
|
|
|
|
|
|
|
|
|
|
// These primarily map to the XFree86 keysym range
|
2023-02-06 11:04:50 +03:00
|
|
|
|
#define FL_Volume_Down 0xEF11 ///< Volume control down
|
|
|
|
|
#define FL_Volume_Mute 0xEF12 ///< Mute sound from the system
|
|
|
|
|
#define FL_Volume_Up 0xEF13 ///< Volume control up
|
|
|
|
|
#define FL_Media_Play 0xEF14 ///< Start playing of audio
|
|
|
|
|
#define FL_Media_Stop 0xEF15 ///< Stop playing audio
|
|
|
|
|
#define FL_Media_Prev 0xEF16 ///< Previous track
|
|
|
|
|
#define FL_Media_Next 0xEF17 ///< Next track
|
|
|
|
|
#define FL_Home_Page 0xEF18 ///< Display user's home page
|
|
|
|
|
#define FL_Mail 0xEF19 ///< Invoke user's mail program
|
|
|
|
|
#define FL_Search 0xEF1B ///< Search
|
|
|
|
|
#define FL_Back 0xEF26 ///< Like back on a browser
|
|
|
|
|
#define FL_Forward 0xEF27 ///< Like forward on a browser
|
|
|
|
|
#define FL_Stop 0xEF28 ///< Stop current operation
|
|
|
|
|
#define FL_Refresh 0xEF29 ///< Refresh the page
|
2023-03-09 20:16:43 +03:00
|
|
|
|
#define FL_Sleep 0xEF2F ///< Put system to sleep
|
2023-02-06 11:04:50 +03:00
|
|
|
|
#define FL_Favorites 0xEF30 ///< Show favorite locations
|
|
|
|
|
|
|
|
|
|
/**@}*/ // group: Non-ASCII key names
|
2008-09-14 15:15:17 +04:00
|
|
|
|
|
2008-09-14 17:13:24 +04:00
|
|
|
|
/** \name Mouse Buttons
|
2008-09-14 15:15:17 +04:00
|
|
|
|
|
2017-09-12 18:26:36 +03:00
|
|
|
|
These constants define the button numbers for FL_PUSH and FL_RELEASE events.
|
|
|
|
|
|
|
|
|
|
\see Fl::event_button()
|
2008-09-14 15:15:17 +04:00
|
|
|
|
*/
|
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
#define FL_LEFT_MOUSE 1 ///< The left mouse button
|
|
|
|
|
#define FL_MIDDLE_MOUSE 2 ///< The middle mouse button
|
|
|
|
|
#define FL_RIGHT_MOUSE 3 ///< The right mouse button
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@}*/ // group: Mouse Buttons
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** \name Event States
|
2008-09-14 15:15:17 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
The following constants define bits in the Fl::event_state() value.
|
2008-09-14 15:15:17 +04:00
|
|
|
|
*/
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/ // group: Event States
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2009-09-18 02:12:24 +04:00
|
|
|
|
// FIXME: it would be nice to have the modifiers in the upper 8 bit so that
|
2017-09-12 18:26:36 +03:00
|
|
|
|
// a unicode key (24bit) can be sent as an unsigned with the modifiers.
|
2009-09-18 02:12:24 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
#define FL_SHIFT 0x00010000 ///< One of the shift keys is down
|
|
|
|
|
#define FL_CAPS_LOCK 0x00020000 ///< The caps lock is on
|
|
|
|
|
#define FL_CTRL 0x00040000 ///< One of the ctrl keys is down
|
|
|
|
|
#define FL_ALT 0x00080000 ///< One of the alt keys is down
|
|
|
|
|
#define FL_NUM_LOCK 0x00100000 ///< The num lock is on
|
|
|
|
|
// most X servers do this?
|
|
|
|
|
#define FL_META 0x00400000 ///< One of the meta/Windows keys is down
|
|
|
|
|
// correct for XFree86
|
|
|
|
|
#define FL_SCROLL_LOCK 0x00800000 ///< The scroll lock is on
|
|
|
|
|
// correct for XFree86
|
|
|
|
|
#define FL_BUTTON1 0x01000000 ///< Mouse button 1 is pushed
|
|
|
|
|
#define FL_BUTTON2 0x02000000 ///< Mouse button 2 is pushed
|
|
|
|
|
#define FL_BUTTON3 0x04000000 ///< Mouse button 3 is pushed
|
|
|
|
|
#define FL_BUTTONS 0x7f000000 ///< Any mouse button is pushed
|
|
|
|
|
#define FL_BUTTON(n) (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed
|
|
|
|
|
|
|
|
|
|
#define FL_KEY_MASK 0x0000ffff ///< All keys are 16 bit for now
|
|
|
|
|
// FIXME: Unicode needs 24 bits!
|
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@}*/ // group: Event States
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
|
|
|
|
/** \name Box Types
|
2008-09-16 02:55:40 +04:00
|
|
|
|
\brief FLTK standard box types
|
2017-09-12 18:26:36 +03:00
|
|
|
|
|
2008-09-16 02:55:40 +04:00
|
|
|
|
This enum defines the standard box types included with FLTK.
|
2017-09-11 21:54:10 +03:00
|
|
|
|
|
|
|
|
|
\note The documented \p enum \p Fl_Boxtype contains some values (names)
|
|
|
|
|
with leading underscores, e.g. \p \b _FL_SHADOW_BOX. This is due to
|
|
|
|
|
technical reasons - please use the same values (names) without the
|
|
|
|
|
leading underscore in your code! Enum values with leading underscores
|
|
|
|
|
are reserved for internal use and subject to change without notice!
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_NO_BOX means nothing is drawn at all, so whatever is already
|
|
|
|
|
on the screen remains. The FL_..._FRAME types only draw their edges,
|
2021-01-14 00:05:36 +03:00
|
|
|
|
leaving the interior unchanged. The blue color in the image below
|
2008-09-16 02:55:40 +04:00
|
|
|
|
is the area that is not drawn by the frame types.
|
2017-09-12 18:26:36 +03:00
|
|
|
|
|
2022-02-21 18:42:08 +03:00
|
|
|
|
\anchor boxTypesImage
|
2021-01-14 00:05:36 +03:00
|
|
|
|
\image html boxtypes.png "FLTK Standard Box Types"
|
|
|
|
|
\image latex boxtypes.png "FLTK Standard Box Types" width=12cm
|
2017-09-12 18:26:36 +03:00
|
|
|
|
|
2023-02-06 18:05:19 +03:00
|
|
|
|
\note Not all box types are depicted in the figure above.
|
|
|
|
|
See enum \ref Fl_Boxtype below for the complete list of box types.
|
|
|
|
|
\see Fl::get_system_colors()
|
2008-09-14 17:13:24 +04:00
|
|
|
|
*/
|
2018-01-15 18:02:13 +03:00
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/ // group: Box Types
|
2018-01-15 18:02:13 +03:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
\brief FLTK standard box types
|
|
|
|
|
|
|
|
|
|
This enum defines the standard box types included with FLTK.
|
|
|
|
|
|
|
|
|
|
\note The documented \p enum \p Fl_Boxtype contains some values (names)
|
|
|
|
|
with leading underscores, e.g. \p \b _FL_SHADOW_BOX. This is due to
|
|
|
|
|
technical reasons - please use the same values (names) without the
|
|
|
|
|
leading underscore in your code! Enum values with leading underscores
|
|
|
|
|
are reserved for internal use and subject to change without notice!
|
|
|
|
|
*/
|
|
|
|
|
enum Fl_Boxtype { // boxtypes (if you change these you must also change fl_boxtype.cxx):
|
2008-09-16 02:55:40 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_NO_BOX = 0, ///< nothing is drawn at all, this box is invisible
|
|
|
|
|
FL_FLAT_BOX, ///< a flat box
|
2022-02-21 18:42:08 +03:00
|
|
|
|
FL_UP_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_DOWN_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_UP_FRAME, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_DOWN_FRAME, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_THIN_UP_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_THIN_DOWN_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_THIN_UP_FRAME, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_THIN_DOWN_FRAME, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_ENGRAVED_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_EMBOSSED_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_ENGRAVED_FRAME, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_EMBOSSED_FRAME, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
FL_BORDER_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
_FL_SHADOW_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_SHADOW_BOX
|
|
|
|
|
FL_BORDER_FRAME, ///< see figure [Standard Box Types](@ref boxTypesImage)
|
|
|
|
|
_FL_SHADOW_FRAME, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_SHADOW_FRAME
|
|
|
|
|
_FL_ROUNDED_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_ROUNDED_BOX
|
|
|
|
|
_FL_RSHADOW_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_RSHADOW_BOX
|
|
|
|
|
_FL_ROUNDED_FRAME, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_ROUNDED_FRAME
|
|
|
|
|
_FL_RFLAT_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_RFLAT_BOX
|
|
|
|
|
_FL_ROUND_UP_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_ROUND_UP_BOX
|
|
|
|
|
_FL_ROUND_DOWN_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_ROUND_DOWN_BOX
|
|
|
|
|
_FL_DIAMOND_UP_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_DIAMOND_UP_BOX
|
|
|
|
|
_FL_DIAMOND_DOWN_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_DIAMOND_DOWN_BOX
|
|
|
|
|
_FL_OVAL_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_OVAL_BOX
|
|
|
|
|
_FL_OSHADOW_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_OSHADOW_BOX
|
|
|
|
|
_FL_OVAL_FRAME, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_OVAL_FRAME
|
|
|
|
|
_FL_OFLAT_BOX, ///< see figure [Standard Box Types](@ref boxTypesImage), use FL_OFLAT_BOX
|
2020-07-01 19:03:10 +03:00
|
|
|
|
_FL_PLASTIC_UP_BOX, ///< plastic version of FL_UP_BOX, use FL_PLASTIC_UP_BOX
|
|
|
|
|
_FL_PLASTIC_DOWN_BOX, ///< plastic version of FL_DOWN_BOX, use FL_PLASTIC_DOWN_BOX
|
|
|
|
|
_FL_PLASTIC_UP_FRAME, ///< plastic version of FL_UP_FRAME, use FL_PLASTIC_UP_FRAME
|
|
|
|
|
_FL_PLASTIC_DOWN_FRAME, ///< plastic version of FL_DOWN_FRAME, use FL_PLASTIC_DOWN_FRAME
|
|
|
|
|
_FL_PLASTIC_THIN_UP_BOX, ///< plastic version of FL_THIN_UP_BOX, use FL_PLASTIC_THIN_UP_BOX
|
|
|
|
|
_FL_PLASTIC_THIN_DOWN_BOX, ///< plastic version of FL_THIN_DOWN_BOX, use FL_PLASTIC_THIN_DOWN_BOX
|
|
|
|
|
_FL_PLASTIC_ROUND_UP_BOX, ///< plastic version of FL_ROUND_UP_BOX, use FL_PLASTIC_ROUND_UP_BOX
|
|
|
|
|
_FL_PLASTIC_ROUND_DOWN_BOX, ///< plastic version of FL_ROUND_DOWN_BOX, use FL_PLASTIC_ROUND_DOWN_BOX
|
|
|
|
|
_FL_GTK_UP_BOX, ///< gtk+ version of FL_UP_BOX, use FL_GTK_UP_BOX
|
|
|
|
|
_FL_GTK_DOWN_BOX, ///< gtk+ version of FL_DOWN_BOX, use FL_GTK_DOWN_BOX
|
|
|
|
|
_FL_GTK_UP_FRAME, ///< gtk+ version of FL_UP_FRAME, use FL_GTK_UP_FRAME
|
|
|
|
|
_FL_GTK_DOWN_FRAME, ///< gtk+ version of FL_DOWN_FRAME, use FL_GTK_DOWN_FRAME
|
|
|
|
|
_FL_GTK_THIN_UP_BOX, ///< gtk+ version of FL_THIN_UP_BOX, use FL_GTK_THIN_UP_BOX
|
|
|
|
|
_FL_GTK_THIN_DOWN_BOX, ///< gtk+ version of FL_THIN_DOWN_BOX, use FL_GTK_THIN_DOWN_BOX
|
|
|
|
|
_FL_GTK_THIN_UP_FRAME, ///< gtk+ version of FL_THIN_UP_FRAME, use FL_GTK_THIN_UP_FRAME
|
|
|
|
|
_FL_GTK_THIN_DOWN_FRAME, ///< gtk+ version of FL_THIN_DOWN_FRAME, use FL_GTK_THIN_DOWN_FRAME
|
|
|
|
|
_FL_GTK_ROUND_UP_BOX, ///< gtk+ version of FL_ROUND_UP_BOX, use FL_GTK_ROUND_UP_BOX
|
|
|
|
|
_FL_GTK_ROUND_DOWN_BOX, ///< gtk+ version of FL_ROUND_DOWN_BOX, use FL_GTK_ROUND_DOWN_BOX
|
|
|
|
|
_FL_GLEAM_UP_BOX, ///< gleam version of FL_UP_BOX, use FL_GLEAM_UP_BOX
|
|
|
|
|
_FL_GLEAM_DOWN_BOX, ///< gleam version of FL_DOWN_BOX, use FL_GLEAM_DOWN_BOX
|
|
|
|
|
_FL_GLEAM_UP_FRAME, ///< gleam version of FL_UP_FRAME, use FL_GLEAM_UP_FRAME
|
|
|
|
|
_FL_GLEAM_DOWN_FRAME, ///< gleam version of FL_DOWN_FRAME, use FL_GLEAM_DOWN_FRAME
|
|
|
|
|
_FL_GLEAM_THIN_UP_BOX, ///< gleam version of FL_THIN_UP_BOX, use FL_GLEAM_THIN_UP_BOX
|
|
|
|
|
_FL_GLEAM_THIN_DOWN_BOX, ///< gleam version of FL_THIN_DOWN_BOX, use FL_GLEAM_THIN_DOWN_BOX
|
|
|
|
|
_FL_GLEAM_ROUND_UP_BOX, ///< gleam version of FL_ROUND_UP_BOX, use FL_GLEAM_ROUND_UP_BOX
|
|
|
|
|
_FL_GLEAM_ROUND_DOWN_BOX, ///< gleam version of FL_ROUND_DOWN_BOX, use FL_GLEAM_ROUND_DOWN_BOX
|
2022-11-24 21:00:00 +03:00
|
|
|
|
_FL_OXY_UP_BOX, ///< oxy version of FL_UP_BOX, use FL_OXY_UP_BOX
|
|
|
|
|
_FL_OXY_DOWN_BOX, ///< oxy version of FL_DOWN_BOX, use FL_OXY_DOWN_BOX
|
|
|
|
|
_FL_OXY_UP_FRAME, ///< oxy version of FL_UP_FRAME, use FL_OXY_UP_FRAME
|
|
|
|
|
_FL_OXY_DOWN_FRAME, ///< oxy version of FL_DOWN_FRAME, use FL_OXY_DOWN_FRAME
|
|
|
|
|
_FL_OXY_THIN_UP_BOX, ///< oxy version of FL_THIN_UP_BOX, use FL_OXY_THIN_UP_BOX
|
|
|
|
|
_FL_OXY_THIN_DOWN_BOX, ///< oxy version of FL_THIN_DOWN_BOX, use FL_OXY_THIN_DOWN_BOX
|
|
|
|
|
_FL_OXY_THIN_UP_FRAME, ///< oxy version of FL_THIN_UP_FRAME, use FL_OXY_THIN_UP_FRAME
|
|
|
|
|
_FL_OXY_THIN_DOWN_FRAME, ///< oxy version of FL_THIN_DOWN_FRAME, use FL_OXY_THIN_DOWN_FRAME
|
|
|
|
|
_FL_OXY_ROUND_UP_BOX, ///< oxy version of FL_ROUND_UP_BOX, use FL_OXY_ROUND_UP_BOX
|
|
|
|
|
_FL_OXY_ROUND_DOWN_BOX, ///< oxy version of FL_ROUND_DOWN_BOX, use FL_OXY_ROUND_DOWN_BOX
|
|
|
|
|
_FL_OXY_BUTTON_UP_BOX, ///< FL_OXY_BUTTON_UP_BOX (new boxtype ?), use FL_OXY_BUTTON_UP_BOX
|
|
|
|
|
_FL_OXY_BUTTON_DOWN_BOX, ///< FL_OXY_BUTTON_DOWN_BOX (new boxtype ?), use FL_OXY_BUTTON_DOWN_BOX
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_FREE_BOXTYPE ///< the first free box type for creation of new box types
|
1998-10-06 22:21:25 +04:00
|
|
|
|
};
|
2023-02-06 18:05:19 +03:00
|
|
|
|
|
|
|
|
|
#ifndef FL_DOXYGEN
|
|
|
|
|
|
2002-03-26 00:08:42 +03:00
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX();
|
|
|
|
|
#define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX()
|
|
|
|
|
#define FL_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_ROUND_UP_BOX()+1)
|
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_SHADOW_BOX();
|
|
|
|
|
#define FL_SHADOW_BOX fl_define_FL_SHADOW_BOX()
|
|
|
|
|
#define FL_SHADOW_FRAME (Fl_Boxtype)(fl_define_FL_SHADOW_BOX()+2)
|
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUNDED_BOX();
|
|
|
|
|
#define FL_ROUNDED_BOX fl_define_FL_ROUNDED_BOX()
|
|
|
|
|
#define FL_ROUNDED_FRAME (Fl_Boxtype)(fl_define_FL_ROUNDED_BOX()+2)
|
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_RFLAT_BOX();
|
|
|
|
|
#define FL_RFLAT_BOX fl_define_FL_RFLAT_BOX()
|
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_RSHADOW_BOX();
|
|
|
|
|
#define FL_RSHADOW_BOX fl_define_FL_RSHADOW_BOX()
|
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_DIAMOND_BOX();
|
|
|
|
|
#define FL_DIAMOND_UP_BOX fl_define_FL_DIAMOND_BOX()
|
|
|
|
|
#define FL_DIAMOND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_DIAMOND_BOX()+1)
|
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_OVAL_BOX();
|
|
|
|
|
#define FL_OVAL_BOX fl_define_FL_OVAL_BOX()
|
|
|
|
|
#define FL_OSHADOW_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+1)
|
|
|
|
|
#define FL_OVAL_FRAME (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+2)
|
|
|
|
|
#define FL_OFLAT_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+3)
|
|
|
|
|
|
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX();
|
|
|
|
|
#define FL_PLASTIC_UP_BOX fl_define_FL_PLASTIC_UP_BOX()
|
|
|
|
|
#define FL_PLASTIC_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+1)
|
|
|
|
|
#define FL_PLASTIC_UP_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+2)
|
|
|
|
|
#define FL_PLASTIC_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+3)
|
2003-05-19 02:12:24 +04:00
|
|
|
|
#define FL_PLASTIC_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+4)
|
|
|
|
|
#define FL_PLASTIC_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+5)
|
2005-03-24 16:33:06 +03:00
|
|
|
|
#define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6)
|
|
|
|
|
#define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7)
|
2001-11-29 00:37:35 +03:00
|
|
|
|
|
2006-09-17 18:58:25 +04:00
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX();
|
|
|
|
|
#define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX()
|
|
|
|
|
#define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1)
|
|
|
|
|
#define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2)
|
|
|
|
|
#define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3)
|
2006-10-03 06:35:12 +04:00
|
|
|
|
#define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4)
|
|
|
|
|
#define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5)
|
|
|
|
|
#define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6)
|
|
|
|
|
#define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7)
|
|
|
|
|
#define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8)
|
|
|
|
|
#define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9)
|
2006-09-17 18:58:25 +04:00
|
|
|
|
|
2014-02-25 08:24:41 +04:00
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_GLEAM_UP_BOX();
|
|
|
|
|
#define FL_GLEAM_UP_BOX fl_define_FL_GLEAM_UP_BOX()
|
|
|
|
|
#define FL_GLEAM_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+1)
|
|
|
|
|
#define FL_GLEAM_UP_FRAME (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+2)
|
|
|
|
|
#define FL_GLEAM_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+3)
|
|
|
|
|
#define FL_GLEAM_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+4)
|
|
|
|
|
#define FL_GLEAM_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+5)
|
|
|
|
|
#define FL_GLEAM_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+6)
|
|
|
|
|
#define FL_GLEAM_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+7)
|
|
|
|
|
|
2022-11-24 21:00:00 +03:00
|
|
|
|
extern FL_EXPORT Fl_Boxtype fl_define_FL_OXY_UP_BOX();
|
|
|
|
|
#define FL_OXY_UP_BOX fl_define_FL_OXY_UP_BOX()
|
|
|
|
|
#define FL_OXY_DOWN_BOX (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+1)
|
|
|
|
|
#define FL_OXY_UP_FRAME (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+2)
|
|
|
|
|
#define FL_OXY_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+3)
|
|
|
|
|
#define FL_OXY_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+4)
|
|
|
|
|
#define FL_OXY_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+5)
|
|
|
|
|
#define FL_OXY_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+6)
|
|
|
|
|
#define FL_OXY_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+7)
|
|
|
|
|
#define FL_OXY_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+8)
|
|
|
|
|
#define FL_OXY_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+9)
|
|
|
|
|
#define FL_OXY_BUTTON_UP_BOX (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+10)
|
|
|
|
|
#define FL_OXY_BUTTON_DOWN_BOX (Fl_Boxtype)(fl_define_FL_OXY_UP_BOX()+11)
|
|
|
|
|
|
2023-02-06 18:05:19 +03:00
|
|
|
|
#endif // ! FL_DOXYGEN
|
|
|
|
|
|
1998-10-06 22:21:25 +04:00
|
|
|
|
// conversions of box types to other boxtypes:
|
2009-03-17 01:38:32 +03:00
|
|
|
|
/**
|
|
|
|
|
Get the filled version of a frame.
|
|
|
|
|
If no filled version of a given frame exists, the behavior of this function
|
2011-04-24 21:09:41 +04:00
|
|
|
|
is undefined and some random box or frame is returned.
|
|
|
|
|
*/
|
2007-05-16 12:30:48 +04:00
|
|
|
|
inline Fl_Boxtype fl_box(Fl_Boxtype b) {
|
|
|
|
|
return (Fl_Boxtype)((b<FL_UP_BOX||b%4>1)?b:(b-2));
|
|
|
|
|
}
|
2009-03-17 01:38:32 +03:00
|
|
|
|
/**
|
|
|
|
|
Get the "pressed" or "down" version of a box.
|
|
|
|
|
If no "down" version of a given box exists, the behavior of this function
|
2011-04-24 21:09:41 +04:00
|
|
|
|
is undefined and some random box or frame is returned.
|
|
|
|
|
*/
|
2007-05-16 12:30:48 +04:00
|
|
|
|
inline Fl_Boxtype fl_down(Fl_Boxtype b) {
|
|
|
|
|
return (Fl_Boxtype)((b<FL_UP_BOX)?b:(b|1));
|
|
|
|
|
}
|
2009-03-17 01:38:32 +03:00
|
|
|
|
/**
|
|
|
|
|
Get the unfilled, frame only version of a box.
|
|
|
|
|
If no frame version of a given box exists, the behavior of this function
|
2011-04-24 21:09:41 +04:00
|
|
|
|
is undefined and some random box or frame is returned.
|
|
|
|
|
*/
|
2007-05-16 12:30:48 +04:00
|
|
|
|
inline Fl_Boxtype fl_frame(Fl_Boxtype b) {
|
|
|
|
|
return (Fl_Boxtype)((b%4<2)?b:(b+2));
|
|
|
|
|
}
|
1998-10-06 22:21:25 +04:00
|
|
|
|
|
2008-09-14 15:15:17 +04:00
|
|
|
|
// back-compatibility box types:
|
1998-10-06 22:21:25 +04:00
|
|
|
|
#define FL_FRAME FL_ENGRAVED_FRAME
|
|
|
|
|
#define FL_FRAME_BOX FL_ENGRAVED_BOX
|
|
|
|
|
#define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX
|
|
|
|
|
#define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX
|
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@}*/ // group: Box Types
|
2008-09-14 15:15:17 +04:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
The labeltype() method sets the type of the label.
|
2015-02-04 16:12:43 +03:00
|
|
|
|
|
2017-09-11 21:54:10 +03:00
|
|
|
|
\note The documented \p enum \p Fl_Labeltype contains some values (names)
|
|
|
|
|
with leading underscores, e.g. \p \b _FL_IMAGE_LABEL. This is due to
|
|
|
|
|
technical reasons - please use the same values (names) without the
|
|
|
|
|
leading underscore in your code! Enum values with leading underscores
|
|
|
|
|
are reserved for internal use and subject to change without notice!
|
|
|
|
|
|
2008-09-14 15:15:17 +04:00
|
|
|
|
The following standard label types are included:
|
|
|
|
|
*/
|
2017-09-12 16:05:48 +03:00
|
|
|
|
enum Fl_Labeltype { // labeltypes:
|
|
|
|
|
FL_NORMAL_LABEL = 0, ///< draws the text (0)
|
2015-02-04 16:12:43 +03:00
|
|
|
|
FL_NO_LABEL, ///< does nothing
|
|
|
|
|
_FL_SHADOW_LABEL, ///< draws a drop shadow under the text
|
2017-09-12 16:05:48 +03:00
|
|
|
|
_FL_ENGRAVED_LABEL, ///< draws edges as though the text is engraved
|
2015-02-04 16:12:43 +03:00
|
|
|
|
_FL_EMBOSSED_LABEL, ///< draws edges as though the text is raised
|
|
|
|
|
_FL_MULTI_LABEL, ///< draws a composite label \see Fl_Multi_Label
|
|
|
|
|
_FL_ICON_LABEL, ///< draws the icon associated with the text
|
|
|
|
|
_FL_IMAGE_LABEL, ///< the label displays an "icon" based on a Fl_Image
|
|
|
|
|
|
|
|
|
|
FL_FREE_LABELTYPE ///< first free labeltype to use for creating own labeltypes
|
1998-10-06 22:21:25 +04:00
|
|
|
|
};
|
2008-09-14 15:15:17 +04:00
|
|
|
|
|
2017-03-05 14:27:30 +03:00
|
|
|
|
/**
|
|
|
|
|
Sets the current label type and returns its corresponding Fl_Labeltype value.
|
2008-09-18 23:09:34 +04:00
|
|
|
|
@{
|
|
|
|
|
*/
|
2017-09-11 21:54:10 +03:00
|
|
|
|
|
|
|
|
|
/** FL_SYMBOL_LABEL is an alias for FL_NORMAL_LABEL.
|
|
|
|
|
|
|
|
|
|
'@' symbols can be drawn with normal labels as well.\n
|
|
|
|
|
This definition is for historical reasons only (forms compatibility).
|
|
|
|
|
You should use FL_NORMAL_LABEL instead.
|
|
|
|
|
*/
|
2001-08-06 07:17:43 +04:00
|
|
|
|
#define FL_SYMBOL_LABEL FL_NORMAL_LABEL
|
2017-09-11 21:54:10 +03:00
|
|
|
|
/**
|
|
|
|
|
Initializes the internal table entry for FL_SHADOW_LABEL and returns
|
|
|
|
|
its internal value. Internal use only.
|
|
|
|
|
*/
|
2002-03-26 00:08:42 +03:00
|
|
|
|
extern Fl_Labeltype FL_EXPORT fl_define_FL_SHADOW_LABEL();
|
2017-09-11 21:54:10 +03:00
|
|
|
|
/**
|
|
|
|
|
Draws a label with shadows behind the text.
|
|
|
|
|
*/
|
2002-03-26 00:08:42 +03:00
|
|
|
|
#define FL_SHADOW_LABEL fl_define_FL_SHADOW_LABEL()
|
2017-09-11 21:54:10 +03:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
Initializes the internal table entry for FL_ENGRAVED_LABEL and returns
|
|
|
|
|
its internal value. Internal use only.
|
|
|
|
|
*/
|
2002-03-26 00:08:42 +03:00
|
|
|
|
extern Fl_Labeltype FL_EXPORT fl_define_FL_ENGRAVED_LABEL();
|
2017-09-11 21:54:10 +03:00
|
|
|
|
/**
|
|
|
|
|
Draws a label with engraved text.
|
|
|
|
|
*/
|
2002-03-26 00:08:42 +03:00
|
|
|
|
#define FL_ENGRAVED_LABEL fl_define_FL_ENGRAVED_LABEL()
|
2017-09-11 21:54:10 +03:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
Initializes the internal table entry for FL_EMBOSSED_LABEL and returns
|
|
|
|
|
its internal value. Internal use only.
|
|
|
|
|
*/
|
2002-03-26 00:08:42 +03:00
|
|
|
|
extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL();
|
2017-09-11 21:54:10 +03:00
|
|
|
|
/**
|
|
|
|
|
Draws a label with embossed text.
|
|
|
|
|
*/
|
2002-03-26 00:08:42 +03:00
|
|
|
|
#define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL()
|
2017-09-11 21:54:10 +03:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
Initializes the internal table entry for FL_MULTI_LABEL and returns
|
|
|
|
|
its internal value. Internal use only.
|
|
|
|
|
*/
|
|
|
|
|
extern Fl_Labeltype FL_EXPORT fl_define_FL_MULTI_LABEL();
|
|
|
|
|
/**
|
|
|
|
|
Draws a label that can comprise several parts like text and images.
|
|
|
|
|
\see Fl_Multi_Label
|
|
|
|
|
*/
|
|
|
|
|
#define FL_MULTI_LABEL fl_define_FL_MULTI_LABEL()
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
Initializes the internal table entry for FL_ICON_LABEL and returns
|
|
|
|
|
its internal value. Internal use only.
|
|
|
|
|
*/
|
|
|
|
|
extern Fl_Labeltype FL_EXPORT fl_define_FL_ICON_LABEL();
|
|
|
|
|
/**
|
|
|
|
|
Draws an icon as the label.
|
|
|
|
|
*/
|
|
|
|
|
#define FL_ICON_LABEL fl_define_FL_ICON_LABEL()
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
Initializes the internal table entry for FL_IMAGE_LABEL and returns
|
|
|
|
|
its internal value. Internal use only.
|
|
|
|
|
*/
|
|
|
|
|
extern Fl_Labeltype FL_EXPORT fl_define_FL_IMAGE_LABEL();
|
|
|
|
|
/**
|
|
|
|
|
Draws an image (Fl_Image) as the label.
|
|
|
|
|
This is useful for one particular part of an Fl_Multi_Label.
|
|
|
|
|
Use Fl_Widget::image() and/or Fl_Widget::deimage() for normal widgets
|
|
|
|
|
with images as labels.
|
|
|
|
|
*/
|
|
|
|
|
#define FL_IMAGE_LABEL fl_define_FL_IMAGE_LABEL()
|
|
|
|
|
|
2008-09-18 23:09:34 +04:00
|
|
|
|
/** @} */
|
1998-10-06 22:21:25 +04:00
|
|
|
|
|
2017-03-05 14:27:30 +03:00
|
|
|
|
/** \name Alignment Flags
|
|
|
|
|
Flags to control the label alignment.
|
|
|
|
|
|
|
|
|
|
This controls how the label is displayed next to or inside the widget.
|
|
|
|
|
The default value is FL_ALIGN_CENTER (0) for most widgets, which centers
|
|
|
|
|
the label inside the widget.
|
2015-03-05 15:42:29 +03:00
|
|
|
|
|
2017-03-05 14:27:30 +03:00
|
|
|
|
All alignment flags use the common prefix "FL_ALIGN_". In the following
|
|
|
|
|
descriptions this prefix is sometimes omitted for brevity.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
2017-03-05 14:27:30 +03:00
|
|
|
|
Flags can be or'd to achieve a combination of alignments, but there
|
|
|
|
|
are some \e "magic values" (e.g. combinations of TOP and BOTTOM and of
|
|
|
|
|
LEFT and RIGHT) that have special meanings (see below). For instance:\n
|
|
|
|
|
FL_ALIGN_TOP_LEFT == (FL_ALIGN_TOP | FL_ALIGN_LEFT) != FL_ALIGN_LEFT_TOP.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
2017-03-05 14:27:30 +03:00
|
|
|
|
\code
|
2015-03-05 15:42:29 +03:00
|
|
|
|
Outside alignments (FL_ALIGN_INSIDE is not set):
|
|
|
|
|
|
2011-04-24 21:09:41 +04:00
|
|
|
|
TOP_LEFT TOP TOP_RIGHT
|
2015-03-05 15:42:29 +03:00
|
|
|
|
+---------------------------------+
|
|
|
|
|
LEFT_TOP| |RIGHT_TOP
|
2011-04-24 21:09:41 +04:00
|
|
|
|
| |
|
2015-03-05 15:42:29 +03:00
|
|
|
|
LEFT| CENTER |RIGHT
|
2011-04-24 21:09:41 +04:00
|
|
|
|
| |
|
2015-03-05 15:42:29 +03:00
|
|
|
|
LEFT_BOTTOM| |RIGHT_BOTTOM
|
|
|
|
|
+---------------------------------+
|
|
|
|
|
BOTTOM_LEFT BOTTOM BOTTOM_RIGHT
|
|
|
|
|
|
|
|
|
|
Inside alignments (FL_ALIGN_INSIDE is set):
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
|
|
|
|
+---------------------------------+
|
|
|
|
|
|TOP_LEFT TOP TOP_RIGHT|
|
|
|
|
|
| |
|
2015-03-05 15:42:29 +03:00
|
|
|
|
|LEFT CENTER RIGHT|
|
2011-04-24 21:09:41 +04:00
|
|
|
|
| |
|
2015-03-05 15:42:29 +03:00
|
|
|
|
|BOTTOM_LEFT BOTTOM BOTTOM_RIGHT|
|
2011-04-24 21:09:41 +04:00
|
|
|
|
+---------------------------------+
|
2017-03-05 14:27:30 +03:00
|
|
|
|
\endcode
|
|
|
|
|
\see Fl_Align, #FL_ALIGN_CENTER, etc.
|
|
|
|
|
|
|
|
|
|
\note
|
|
|
|
|
-# Bit positions not defined in the following constants of type
|
|
|
|
|
\p Fl_Align are reserved for future extensions. Do not use.
|
|
|
|
|
-# The \e "magic values" (FL_ALIGN_)LEFT_TOP, RIGHT_TOP, LEFT_BOTTOM,
|
|
|
|
|
and RIGHT_BOTTOM must not be used together with FL_ALIGN_INSIDE.
|
|
|
|
|
Use TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, or BOTTOM_RIGHT instead.
|
|
|
|
|
-# Although bits can be or'd together there are some unused/illegal
|
|
|
|
|
combinations, for instance:
|
|
|
|
|
- setting both FL_ALIGN_TOP and FL_ALIGN_BOTTOM in combinations other
|
2020-07-01 19:03:10 +03:00
|
|
|
|
than those given in the \p Fl_Align constants below (magic values)
|
2017-03-05 14:27:30 +03:00
|
|
|
|
- setting both FL_ALIGN_LEFT and FL_ALIGN_RIGHT in combinations other
|
2020-07-01 19:03:10 +03:00
|
|
|
|
than those given in the \p Fl_Align constants below (magic values)
|
2017-03-05 14:27:30 +03:00
|
|
|
|
- using one of the "magic values" (2) together with FL_ALIGN_INSIDE
|
|
|
|
|
\note
|
|
|
|
|
Using illegal bit combinations or undefined bits may yield unexpected
|
|
|
|
|
behavior, and this behavior may be changed without notice in future
|
|
|
|
|
FLTK versions.
|
2008-08-11 12:35:34 +04:00
|
|
|
|
*/
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/
|
2017-02-27 20:00:41 +03:00
|
|
|
|
/** FLTK type for alignment control. */
|
2008-08-16 00:32:01 +04:00
|
|
|
|
typedef unsigned Fl_Align;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
2008-08-11 12:35:34 +04:00
|
|
|
|
/** Align the label horizontally in the middle. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_CENTER = 0x0000;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
2008-08-11 12:35:34 +04:00
|
|
|
|
/** Align the label at the top of the widget. Inside labels appear below the top,
|
2011-04-24 21:09:41 +04:00
|
|
|
|
outside labels are drawn on top of the widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_TOP = 0x0001;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
2008-08-11 12:35:34 +04:00
|
|
|
|
/** Align the label at the bottom of the widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_BOTTOM = 0x0002;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
2008-08-11 12:35:34 +04:00
|
|
|
|
/** Align the label at the left of the widget. Inside labels appear left-justified
|
2011-04-24 21:09:41 +04:00
|
|
|
|
starting at the left side of the widget, outside labels are right-justified and
|
|
|
|
|
drawn to the left of the widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_LEFT = 0x0004;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
2008-08-11 12:35:34 +04:00
|
|
|
|
/** Align the label to the right of the widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_RIGHT = 0x0008;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
2008-08-11 12:35:34 +04:00
|
|
|
|
/** Draw the label inside of the widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_INSIDE = 0x0010;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
2008-08-11 12:35:34 +04:00
|
|
|
|
/** If the label contains an image, draw the text on top of the image. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = 0x0020;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
2008-08-11 12:35:34 +04:00
|
|
|
|
/** If the label contains an image, draw the text below the image. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = 0x0000;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
|
|
|
|
/** All parts of the label that are larger than the widget will not be drawn. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_CLIP = 0x0040;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
2008-08-11 12:35:34 +04:00
|
|
|
|
/** Wrap text that does not fit the width of the widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_WRAP = 0x0080;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
2010-04-08 03:17:33 +04:00
|
|
|
|
/** If the label contains an image, draw the text to the right of the image. */
|
2017-02-27 20:00:41 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT = 0x0100;
|
|
|
|
|
|
2010-04-10 02:18:05 +04:00
|
|
|
|
/** If the label contains an image, draw the text to the left of the image. */
|
2017-02-27 20:00:41 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE = 0x0120;
|
|
|
|
|
|
2011-04-24 21:09:41 +04:00
|
|
|
|
/** If the label contains an image, draw the image or deimage in the background. */
|
2017-02-27 20:00:41 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_IMAGE_BACKDROP = 0x0200;
|
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT;
|
|
|
|
|
const Fl_Align FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT;
|
|
|
|
|
const Fl_Align FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT;
|
|
|
|
|
const Fl_Align FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
|
|
|
|
/** Outside only, left of widget, top position, magic value: TOP | BOTTOM | LEFT. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_LEFT_TOP = 0x0007;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
|
|
|
|
/** Outside only, right of widget, top position, magic value: TOP | BOTTOM | RIGHT. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_RIGHT_TOP = 0x000b;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
|
|
|
|
/** Outside only, left of widget, bottom position, magic value: TOP | LEFT | RIGHT. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_LEFT_BOTTOM = 0x000d;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
|
|
|
|
/** Outside only, right of widget, bottom position, magic value: BOTTOM | LEFT | RIGHT. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_RIGHT_BOTTOM = 0x000e;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
|
|
|
|
/** Nothing, same as FL_ALIGN_CENTER, for back compatibility. */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Align FL_ALIGN_NOWRAP = 0x0000;
|
2017-02-27 20:00:41 +03:00
|
|
|
|
|
|
|
|
|
/** Mask value to test for TOP, BOTTOM, LEFT, and RIGHT flags. */
|
|
|
|
|
const Fl_Align FL_ALIGN_POSITION_MASK = 0x000f;
|
|
|
|
|
|
|
|
|
|
/** Mask value to test for image alignment flags. */
|
|
|
|
|
const Fl_Align FL_ALIGN_IMAGE_MASK = 0x0320;
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@}*/
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2010-04-08 03:17:33 +04:00
|
|
|
|
|
2011-04-24 21:09:41 +04:00
|
|
|
|
/** \name Font Numbers
|
|
|
|
|
The following constants define the standard FLTK fonts:
|
2008-08-16 01:11:21 +04:00
|
|
|
|
*/
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/
|
2011-03-07 01:40:26 +03:00
|
|
|
|
/** A font number is an index into the internal font table. */
|
2008-04-23 23:32:47 +04:00
|
|
|
|
typedef int Fl_Font;
|
2008-08-16 01:11:21 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Font FL_HELVETICA = 0; ///< Helvetica (or Arial) normal (0)
|
|
|
|
|
const Fl_Font FL_HELVETICA_BOLD = 1; ///< Helvetica (or Arial) bold
|
|
|
|
|
const Fl_Font FL_HELVETICA_ITALIC = 2; ///< Helvetica (or Arial) oblique
|
|
|
|
|
const Fl_Font FL_HELVETICA_BOLD_ITALIC = 3; ///< Helvetica (or Arial) bold-oblique
|
|
|
|
|
const Fl_Font FL_COURIER = 4; ///< Courier normal
|
|
|
|
|
const Fl_Font FL_COURIER_BOLD = 5; ///< Courier bold
|
|
|
|
|
const Fl_Font FL_COURIER_ITALIC = 6; ///< Courier italic
|
|
|
|
|
const Fl_Font FL_COURIER_BOLD_ITALIC = 7; ///< Courier bold-italic
|
|
|
|
|
const Fl_Font FL_TIMES = 8; ///< Times roman
|
|
|
|
|
const Fl_Font FL_TIMES_BOLD = 9; ///< Times roman bold
|
|
|
|
|
const Fl_Font FL_TIMES_ITALIC = 10; ///< Times roman italic
|
|
|
|
|
const Fl_Font FL_TIMES_BOLD_ITALIC = 11; ///< Times roman bold-italic
|
|
|
|
|
const Fl_Font FL_SYMBOL = 12; ///< Standard symbol font
|
|
|
|
|
const Fl_Font FL_SCREEN = 13; ///< Default monospaced screen font
|
|
|
|
|
const Fl_Font FL_SCREEN_BOLD = 14; ///< Default monospaced bold screen font
|
|
|
|
|
const Fl_Font FL_ZAPF_DINGBATS = 15; ///< Zapf-dingbats font
|
|
|
|
|
|
|
|
|
|
const Fl_Font FL_FREE_FONT = 16; ///< first one to allocate
|
|
|
|
|
const Fl_Font FL_BOLD = 1; ///< add this to helvetica, courier, or times
|
|
|
|
|
const Fl_Font FL_ITALIC = 2; ///< add this to helvetica, courier, or times
|
|
|
|
|
const Fl_Font FL_BOLD_ITALIC = 3; ///< add this to helvetica, courier, or times
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@}*/
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2008-08-16 01:11:21 +04:00
|
|
|
|
/** Size of a font in pixels.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
This is the approximate height of a font in pixels.
|
2008-08-16 01:11:21 +04:00
|
|
|
|
*/
|
|
|
|
|
typedef int Fl_Fontsize;
|
1998-10-06 22:21:25 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size
|
1998-10-06 22:21:25 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
/** \name Colors
|
2011-03-07 01:40:26 +03:00
|
|
|
|
The Fl_Color type holds an FLTK color value.
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2016-07-09 21:47:06 +03:00
|
|
|
|
Colors are either 8-bit indexes into a <a href="fltk-colormap.png">virtual colormap</a>
|
2013-04-02 20:47:57 +04:00
|
|
|
|
or 24-bit RGB color values. (See \ref drawing_colors for the default FLTK colormap)
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
2008-09-14 17:13:24 +04:00
|
|
|
|
Color indices occupy the lower 8 bits of the value, while
|
|
|
|
|
RGB colors occupy the upper 24 bits, for a byte organization of RGBI.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
2009-09-27 15:06:56 +04:00
|
|
|
|
<pre>
|
|
|
|
|
Fl_Color => 0xrrggbbii
|
|
|
|
|
| | | |
|
2013-04-02 20:47:57 +04:00
|
|
|
|
| | | +--- \ref drawing_colors "index" between 0 and 255
|
2009-09-27 15:06:56 +04:00
|
|
|
|
| | +----- blue color component (8 bit)
|
|
|
|
|
| +------- green component (8 bit)
|
|
|
|
|
+--------- red component (8 bit)
|
|
|
|
|
</pre>
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
A color can have either an index or an rgb value. Colors with rgb set
|
2009-09-27 15:06:56 +04:00
|
|
|
|
and an index >0 are reserved for special use.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
2008-09-14 17:13:24 +04:00
|
|
|
|
*/
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/
|
2013-04-02 20:47:57 +04:00
|
|
|
|
/** An FLTK color value; see also \ref drawing_colors */
|
2009-09-27 15:06:56 +04:00
|
|
|
|
typedef unsigned int Fl_Color;
|
|
|
|
|
|
|
|
|
|
// Standard colors. These are used as default colors in widgets and altered as necessary
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Color FL_FOREGROUND_COLOR = 0; ///< the default foreground color (0) used for labels and text
|
|
|
|
|
const Fl_Color FL_BACKGROUND2_COLOR = 7; ///< the default background color for text, list, and valuator widgets
|
|
|
|
|
const Fl_Color FL_INACTIVE_COLOR = 8; ///< the inactive foreground color
|
|
|
|
|
const Fl_Color FL_SELECTION_COLOR = 15; ///< the default selection/highlight color
|
1998-10-06 22:21:25 +04:00
|
|
|
|
|
2002-04-11 14:46:19 +04:00
|
|
|
|
// boxtypes generally limit themselves to these colors so
|
|
|
|
|
// the whole ramp is not allocated:
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Color FL_GRAY0 = 32; // 'A'
|
|
|
|
|
const Fl_Color FL_DARK3 = 39; // 'H'
|
|
|
|
|
const Fl_Color FL_DARK2 = 45; // 'N'
|
|
|
|
|
const Fl_Color FL_DARK1 = 47; // 'P'
|
2023-01-24 12:32:57 +03:00
|
|
|
|
/** Default background color */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
const Fl_Color FL_BACKGROUND_COLOR = 49; // 'R' default background color
|
|
|
|
|
const Fl_Color FL_LIGHT1 = 50; // 'S'
|
|
|
|
|
const Fl_Color FL_LIGHT2 = 52; // 'U'
|
|
|
|
|
const Fl_Color FL_LIGHT3 = 54; // 'W'
|
1998-10-06 22:21:25 +04:00
|
|
|
|
|
2002-04-11 14:46:19 +04:00
|
|
|
|
// FLTK provides a 5x8x5 color cube that is used with colormap visuals
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2009-09-27 15:06:56 +04:00
|
|
|
|
const Fl_Color FL_BLACK = 56;
|
|
|
|
|
const Fl_Color FL_RED = 88;
|
|
|
|
|
const Fl_Color FL_GREEN = 63;
|
|
|
|
|
const Fl_Color FL_YELLOW = 95;
|
|
|
|
|
const Fl_Color FL_BLUE = 216;
|
|
|
|
|
const Fl_Color FL_MAGENTA = 248;
|
|
|
|
|
const Fl_Color FL_CYAN = 223;
|
|
|
|
|
const Fl_Color FL_DARK_RED = 72;
|
|
|
|
|
|
|
|
|
|
const Fl_Color FL_DARK_GREEN = 60;
|
|
|
|
|
const Fl_Color FL_DARK_YELLOW = 76;
|
|
|
|
|
const Fl_Color FL_DARK_BLUE = 136;
|
|
|
|
|
const Fl_Color FL_DARK_MAGENTA = 152;
|
|
|
|
|
const Fl_Color FL_DARK_CYAN = 140;
|
|
|
|
|
|
|
|
|
|
const Fl_Color FL_WHITE = 255;
|
|
|
|
|
|
2022-09-18 12:57:15 +03:00
|
|
|
|
/** Colors numbered between FL_FREE_COLOR and FL_FREE_COLOR + FL_NUM_FREE_COLOR - 1
|
|
|
|
|
are free for the user to be given any value using Fl::set_color(). */
|
2009-09-27 15:06:56 +04:00
|
|
|
|
#define FL_FREE_COLOR (Fl_Color)16
|
|
|
|
|
#define FL_NUM_FREE_COLOR 16
|
|
|
|
|
#define FL_GRAY_RAMP (Fl_Color)32
|
|
|
|
|
#define FL_NUM_GRAY 24
|
|
|
|
|
#define FL_GRAY FL_BACKGROUND_COLOR
|
|
|
|
|
#define FL_COLOR_CUBE (Fl_Color)56
|
|
|
|
|
#define FL_NUM_RED 5
|
|
|
|
|
#define FL_NUM_GREEN 8
|
|
|
|
|
#define FL_NUM_BLUE 5
|
2002-04-11 14:46:19 +04:00
|
|
|
|
|
2001-08-04 16:21:34 +04:00
|
|
|
|
FL_EXPORT Fl_Color fl_inactive(Fl_Color c);
|
2009-09-27 15:06:56 +04:00
|
|
|
|
|
2022-12-28 19:50:00 +03:00
|
|
|
|
/**
|
|
|
|
|
Type of a custom fl_contrast() function.
|
|
|
|
|
|
|
|
|
|
Use this signature to define your own custom fl_contrast() function together
|
|
|
|
|
with fl_contrast_mode(FL_CONTRAST_CUSTOM).
|
|
|
|
|
Example:
|
|
|
|
|
\code
|
|
|
|
|
Fl_Color my_contrast(Fl_Color fg, Fl_Color bg, Fl_Fontsize fs, int context) {
|
|
|
|
|
// calculate contrast and ...
|
|
|
|
|
return color;
|
|
|
|
|
}
|
|
|
|
|
// call this early in your main() program:
|
|
|
|
|
fl_contrast_function(my_contrast);
|
|
|
|
|
fl_contrast_mode(FL_CONTRAST_CUSTOM);
|
|
|
|
|
\endcode
|
|
|
|
|
|
|
|
|
|
\see fl_contrast(Fl_Color, Fl_Color, Fl_Fontsize, int)
|
|
|
|
|
\see fl_contrast_mode(int)
|
|
|
|
|
*/
|
|
|
|
|
typedef Fl_Color (Fl_Contrast_Function)(Fl_Color, Fl_Color, Fl_Fontsize, int);
|
|
|
|
|
|
|
|
|
|
FL_EXPORT void fl_contrast_function(Fl_Contrast_Function *f);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
Define the possible modes to calculate fl_contrast().
|
|
|
|
|
*/
|
|
|
|
|
enum Fl_Contrast_Mode {
|
|
|
|
|
FL_CONTRAST_NONE = 0, ///< always return foreground color
|
|
|
|
|
FL_CONTRAST_LEGACY, ///< legacy (FLTK 1.3.x) contrast function
|
|
|
|
|
FL_CONTRAST_CIELAB, ///< new (FLTK 1.4.0) default function
|
|
|
|
|
FL_CONTRAST_CUSTOM, ///< optional custom contrast function
|
|
|
|
|
FL_CONTRAST_LAST ///< internal use only (invalid contrast mode)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// The following functions are defined and documented in src/fl_contrast.cxx
|
|
|
|
|
|
|
|
|
|
FL_EXPORT void fl_contrast_level(int level);
|
|
|
|
|
FL_EXPORT int fl_contrast_level();
|
|
|
|
|
FL_EXPORT void fl_contrast_mode(int mode);
|
|
|
|
|
FL_EXPORT int fl_contrast_mode();
|
|
|
|
|
|
|
|
|
|
FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg, Fl_Fontsize fs = 0, int context = 0);
|
|
|
|
|
|
|
|
|
|
FL_EXPORT double fl_lightness(Fl_Color color);
|
|
|
|
|
FL_EXPORT double fl_luminance(Fl_Color color);
|
|
|
|
|
|
|
|
|
|
// Other color functions are defined and documented in src/fl_color.cxx
|
2009-09-27 15:06:56 +04:00
|
|
|
|
|
1999-02-17 01:00:04 +03:00
|
|
|
|
FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight);
|
2009-09-27 15:06:56 +04:00
|
|
|
|
|
2011-03-07 01:40:26 +03:00
|
|
|
|
/** Returns a lighter version of the specified color. */
|
1999-01-25 23:43:05 +03:00
|
|
|
|
inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); }
|
2009-09-27 15:06:56 +04:00
|
|
|
|
|
2011-03-07 01:40:26 +03:00
|
|
|
|
/** Returns a darker version of the specified color. */
|
1999-01-25 23:43:05 +03:00
|
|
|
|
inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); }
|
2009-09-27 15:06:56 +04:00
|
|
|
|
|
2011-04-24 21:09:41 +04:00
|
|
|
|
/** Returns the 24-bit color value closest to \p r, \p g, \p b. */
|
2001-10-29 06:44:33 +03:00
|
|
|
|
inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) {
|
2002-04-11 14:46:19 +04:00
|
|
|
|
if (!r && !g && !b) return FL_BLACK;
|
|
|
|
|
else return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8);
|
|
|
|
|
}
|
2009-09-27 15:06:56 +04:00
|
|
|
|
|
2011-04-24 21:09:41 +04:00
|
|
|
|
/** Returns the 24-bit color value closest to \p g (grayscale). */
|
2002-04-11 14:46:19 +04:00
|
|
|
|
inline Fl_Color fl_rgb_color(uchar g) {
|
|
|
|
|
if (!g) return FL_BLACK;
|
|
|
|
|
else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8);
|
2001-10-29 06:44:33 +03:00
|
|
|
|
}
|
2009-09-27 15:06:56 +04:00
|
|
|
|
|
2015-01-29 16:14:59 +03:00
|
|
|
|
/** Returns a gray color value from black (i == 0) to white (i == FL_NUM_GRAY - 1).
|
|
|
|
|
FL_NUM_GRAY is defined to be 24 in the current FLTK release.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
To get the closest FLTK gray value to an 8-bit grayscale color 'I' use:
|
|
|
|
|
|
2015-01-29 16:14:59 +03:00
|
|
|
|
\code
|
2011-04-24 21:09:41 +04:00
|
|
|
|
fl_gray_ramp(I * (FL_NUM_GRAY - 1) / 255)
|
2011-03-07 01:40:26 +03:00
|
|
|
|
\endcode
|
2015-01-29 16:14:59 +03:00
|
|
|
|
*/
|
1998-10-06 22:21:25 +04:00
|
|
|
|
inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);}
|
2009-09-27 15:06:56 +04:00
|
|
|
|
|
2011-04-24 21:09:41 +04:00
|
|
|
|
/** Returns a color out of the color cube.
|
|
|
|
|
|
2015-01-29 16:14:59 +03:00
|
|
|
|
\p r must be in the range 0 to FL_NUM_RED (5) minus 1,
|
2011-04-24 21:09:41 +04:00
|
|
|
|
\p g must be in the range 0 to FL_NUM_GREEN (8) minus 1,
|
|
|
|
|
\p b must be in the range 0 to FL_NUM_BLUE (5) minus 1.
|
|
|
|
|
|
|
|
|
|
To get the closest color to a 8-bit set of R,G,B values use:
|
|
|
|
|
|
|
|
|
|
\code
|
|
|
|
|
fl_color_cube(R * (FL_NUM_RED - 1) / 255,
|
|
|
|
|
G * (FL_NUM_GREEN - 1) / 255,
|
|
|
|
|
B * (FL_NUM_BLUE - 1) / 255);
|
|
|
|
|
\endcode
|
2011-03-07 01:40:26 +03:00
|
|
|
|
*/
|
1998-10-06 22:21:25 +04:00
|
|
|
|
inline Fl_Color fl_color_cube(int r, int g, int b) {
|
|
|
|
|
return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);}
|
|
|
|
|
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@}*/ // group: Colors
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2011-03-07 01:40:26 +03:00
|
|
|
|
/** \name Cursors */
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@{*/
|
2008-09-14 17:13:24 +04:00
|
|
|
|
|
2011-03-07 01:40:26 +03:00
|
|
|
|
/** The following constants define the mouse cursors that are available in FLTK.
|
2011-04-24 21:09:41 +04:00
|
|
|
|
|
2014-06-16 15:17:57 +04:00
|
|
|
|
Cursors are provided by the system when available, or bitmaps built into
|
|
|
|
|
FLTK as a fallback.
|
2008-09-14 17:13:24 +04:00
|
|
|
|
*/
|
2014-06-16 15:17:57 +04:00
|
|
|
|
/* FIXME: We should renumber these, but that will break the ABI */
|
2011-03-07 01:40:26 +03:00
|
|
|
|
enum Fl_Cursor {
|
2023-02-04 14:49:13 +03:00
|
|
|
|
FL_CURSOR_DEFAULT = 0, /**< the default cursor, usually an arrow: ↖*/ // U+2196
|
|
|
|
|
FL_CURSOR_ARROW = 35, /**< an arrow pointer: ↖*/ // U+2196
|
|
|
|
|
FL_CURSOR_CROSS = 66, /**< crosshair: +*/ // U+FF0B
|
|
|
|
|
FL_CURSOR_WAIT = 76, /**< busy indicator (for instance hourglass): ⌚,⌛*/ // U+231A, U+231B
|
|
|
|
|
FL_CURSOR_INSERT = 77, /**< I-beam: ⌶*/ // U+2336
|
|
|
|
|
FL_CURSOR_HAND = 31, /**< pointing hand: ☜*/ // U+261C
|
|
|
|
|
FL_CURSOR_HELP = 47, /**< question mark pointer: ?*/
|
|
|
|
|
FL_CURSOR_MOVE = 27, /**< 4-pointed arrow or hand: ✥, ✋*/ // U+2725, U+270B
|
2014-06-16 15:17:57 +04:00
|
|
|
|
|
|
|
|
|
/* Resize indicators */
|
2023-02-04 14:49:13 +03:00
|
|
|
|
FL_CURSOR_NS = 78, /**< up/down resize: ⇕ */ // U+21D5
|
|
|
|
|
FL_CURSOR_WE = 79, /**< left/right resize: ⇔*/ // U+21D4
|
|
|
|
|
FL_CURSOR_NWSE = 80, /**< diagonal resize: ⤡*/ // U+2921
|
|
|
|
|
FL_CURSOR_NESW = 81, /**< diagonal resize: ⤢*/ // U+2922
|
|
|
|
|
FL_CURSOR_N = 70, /**< upwards resize: ⤒*/ // U+2912
|
|
|
|
|
FL_CURSOR_NE = 69, /**< upwards, right resize: ↗*/ // U+2197
|
|
|
|
|
FL_CURSOR_E = 49, /**< rightwards resize: ⇥*/ // U+21E5
|
|
|
|
|
FL_CURSOR_SE = 8, /**< downwards, right resize: ⇲*/ // U+21F2
|
|
|
|
|
FL_CURSOR_S = 9, /**< downwards resize: ⤓*/ // U+2913
|
|
|
|
|
FL_CURSOR_SW = 7, /**< downwards, left resize: ↙*/ // U+2199
|
|
|
|
|
FL_CURSOR_W = 36, /**< leftwards resize: ⇤*/ // U+21E4
|
|
|
|
|
FL_CURSOR_NW = 68, /**< upwards, left resize: ⇱*/ // U+21F1
|
2014-06-16 15:17:57 +04:00
|
|
|
|
|
2014-10-14 13:53:01 +04:00
|
|
|
|
FL_CURSOR_NONE =255 /**< invisible. */
|
1998-10-06 22:21:25 +04:00
|
|
|
|
};
|
2023-02-06 11:04:50 +03:00
|
|
|
|
/**@}*/ // group: Cursors
|
1998-10-06 22:21:25 +04:00
|
|
|
|
|
2011-03-07 01:40:26 +03:00
|
|
|
|
/** FD "when" conditions */
|
1998-10-06 22:21:25 +04:00
|
|
|
|
enum { // values for "when" passed to Fl::add_fd()
|
2011-03-07 01:40:26 +03:00
|
|
|
|
FL_READ = 1, /**< Call the callback when there is data to be read. */
|
|
|
|
|
FL_WRITE = 4, /**< Call the callback when data can be written without blocking. */
|
|
|
|
|
FL_EXCEPT = 8 /**< Call the callback if an exception occurs on the file. */
|
1998-10-06 22:21:25 +04:00
|
|
|
|
};
|
|
|
|
|
|
2011-03-07 01:40:26 +03:00
|
|
|
|
/** visual types and Fl_Gl_Window::mode() (values match Glut) */
|
2020-07-01 19:03:10 +03:00
|
|
|
|
enum Fl_Mode {
|
|
|
|
|
FL_RGB = 0,
|
|
|
|
|
FL_INDEX = 1,
|
|
|
|
|
FL_SINGLE = 0,
|
|
|
|
|
FL_DOUBLE = 2,
|
|
|
|
|
FL_ACCUM = 4,
|
|
|
|
|
FL_ALPHA = 8,
|
|
|
|
|
FL_DEPTH = 16,
|
|
|
|
|
FL_STENCIL = 32,
|
|
|
|
|
FL_RGB8 = 64,
|
2002-03-25 19:41:01 +03:00
|
|
|
|
FL_MULTISAMPLE= 128,
|
2002-10-16 00:45:58 +04:00
|
|
|
|
FL_STEREO = 256,
|
2020-07-01 19:03:10 +03:00
|
|
|
|
FL_FAKE_SINGLE = 512, // Fake single buffered windows using double-buffer
|
2015-10-27 11:40:56 +03:00
|
|
|
|
FL_OPENGL3 = 1024
|
1998-10-06 22:21:25 +04:00
|
|
|
|
};
|
|
|
|
|
|
2006-09-16 20:02:00 +04:00
|
|
|
|
// image alpha blending
|
|
|
|
|
|
|
|
|
|
#define FL_IMAGE_WITH_ALPHA 0x40000000
|
|
|
|
|
|
2011-03-07 01:40:26 +03:00
|
|
|
|
/** Damage masks */
|
1998-10-21 18:21:44 +04:00
|
|
|
|
enum Fl_Damage {
|
2011-03-07 01:40:26 +03:00
|
|
|
|
FL_DAMAGE_CHILD = 0x01, /**< A child needs to be redrawn. */
|
|
|
|
|
FL_DAMAGE_EXPOSE = 0x02, /**< The window was exposed. */
|
|
|
|
|
FL_DAMAGE_SCROLL = 0x04, /**< The Fl_Scroll widget was scrolled. */
|
|
|
|
|
FL_DAMAGE_OVERLAY = 0x08, /**< The overlay planes need to be redrawn. */
|
|
|
|
|
FL_DAMAGE_USER1 = 0x10, /**< First user-defined damage bit. */
|
|
|
|
|
FL_DAMAGE_USER2 = 0x20, /**< Second user-defined damage bit. */
|
|
|
|
|
FL_DAMAGE_ALL = 0x80 /**< Everything needs to be redrawn. */
|
1998-10-21 18:21:44 +04:00
|
|
|
|
};
|
1998-10-19 21:53:09 +04:00
|
|
|
|
|
2020-01-08 20:41:50 +03:00
|
|
|
|
// FLTK 1.0.x compatibility definitions (FLTK_1_0_COMPAT) dropped in 1.4.0
|
2002-06-24 19:22:57 +04:00
|
|
|
|
|
2020-11-22 21:19:19 +03:00
|
|
|
|
/** Arrow types define the type of arrow drawing function.
|
|
|
|
|
|
|
|
|
|
FLTK schemes can draw several graphical elements in their particular way.
|
|
|
|
|
One of these elements is an arrow type that can be in different GUI
|
|
|
|
|
elements like scrollbars, choice buttons, and FLTK's Fl_Return_Button.
|
|
|
|
|
|
|
|
|
|
\note This enum is not yet stable (as of FLTK 1.4.0) and may be changed
|
|
|
|
|
without notice as necessary.
|
|
|
|
|
|
|
|
|
|
\since 1.4.0
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
enum Fl_Arrow_Type {
|
|
|
|
|
FL_ARROW_SINGLE = 0x01, ///< Single arrow, e.g. in Fl_Scrollbar
|
|
|
|
|
FL_ARROW_DOUBLE = 0x02, ///< Double arrow, e.g. in Fl_Counter
|
|
|
|
|
FL_ARROW_CHOICE = 0x03, ///< Dropdown box, e.g. in Fl_Choice
|
|
|
|
|
FL_ARROW_RETURN = 0x04 ///< Return arrow, e.g. in Fl_Return_Button
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** Fl_Orientation describes the orientation of a GUI element.
|
|
|
|
|
|
|
|
|
|
FLTK schemes can draw several graphical elements, for instance arrows,
|
|
|
|
|
pointing at different directions. This enum defines the direction
|
|
|
|
|
to use for drawing a particular GUI element.
|
|
|
|
|
|
|
|
|
|
The definition of this enum was chosen such that the enum value can
|
|
|
|
|
be multiplied by 45 to get a rotation angle in degrees starting
|
|
|
|
|
at the horizontal axis (0 = right, 1 = NE, 2 = up, ...) that can be
|
|
|
|
|
used with fl_rotate(). Note: angle is counter-clockwise in degrees.
|
|
|
|
|
|
|
|
|
|
The 'unspecified' value \b FL_ORIENT_NONE shall be used for elements
|
|
|
|
|
that would usually not be rotated, like the return arrow of the
|
|
|
|
|
Fl_Return_Button. It can still be used as an angle though since it is
|
|
|
|
|
the same value as \p FL_ORIENT_RIGHT (0 degrees).
|
|
|
|
|
|
|
|
|
|
\note This enum is not yet stable (as of FLTK 1.4.0) and may be changed
|
|
|
|
|
without notice as necessary.
|
|
|
|
|
|
|
|
|
|
\since 1.4.0
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
enum Fl_Orientation {
|
|
|
|
|
FL_ORIENT_NONE = 0x00, ///< GUI element direction is unspecified
|
|
|
|
|
FL_ORIENT_RIGHT = 0x00, ///< GUI element pointing right ( 0°)
|
|
|
|
|
FL_ORIENT_NE = 0x01, ///< GUI element pointing NE ( 45°)
|
|
|
|
|
FL_ORIENT_UP = 0x02, ///< GUI element pointing up ( 90°)
|
|
|
|
|
FL_ORIENT_NW = 0x03, ///< GUI element pointing NW (135°)
|
|
|
|
|
FL_ORIENT_LEFT = 0x04, ///< GUI element pointing left (180°)
|
|
|
|
|
FL_ORIENT_SW = 0x05, ///< GUI element pointing SW (225°)
|
|
|
|
|
FL_ORIENT_DOWN = 0x06, ///< GUI element pointing down (270°)
|
|
|
|
|
FL_ORIENT_SE = 0x07 ///< GUI element pointing SE (315°)
|
|
|
|
|
};
|
|
|
|
|
|
1998-10-06 22:21:25 +04:00
|
|
|
|
#endif
|