blob: 614547aa8a3101e4d0c348b836de7bdb76bf5c5f [file] [log] [blame]
DRC2ff39b82011-07-28 08:38:59 +00001//
2// "$Id: names.h 7903 2010-11-28 21:06:39Z matt $"
3//
4// Event names header file for the Fast Light Tool Kit (FLTK).
5//
6// Copyright 1998-2010 by Bill Spitzak and others.
7//
8// This library is free software; you can redistribute it and/or
9// modify it under the terms of the GNU Library General Public
10// License as published by the Free Software Foundation; either
11// version 2 of the License, or (at your option) any later version.
12//
13// This library is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// Library General Public License for more details.
17//
18// You should have received a copy of the GNU Library General Public
19// License along with this library; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21// USA.
22//
23// Please report all bugs and problems on the following page:
24//
25// http://www.fltk.org/str.php
26//
27
28// Thanks to Greg Ercolano for this addition.
29
30#ifndef FL_NAMES_H
31#define FL_NAMES_H
32
33/** \defgroup fl_events Events handling functions
34 @{
35 */
36
37/**
38 This is an array of event names you can use to convert event numbers into names.
39
40 The array gets defined inline wherever your '\#include <FL/names.h>' appears.
41
42 \b Example:
43 \code
44 #include <FL/names.h> // array will be defined here
45 int MyClass::handle(int e) {
46 printf("Event was %s (%d)\n", fl_eventnames[e], e);
47 // ..resulting output might be e.g. "Event was FL_PUSH (1)"..
48 [..]
49 }
50 \endcode
51 */
52const char * const fl_eventnames[] =
53{
54 "FL_NO_EVENT",
55 "FL_PUSH",
56 "FL_RELEASE",
57 "FL_ENTER",
58 "FL_LEAVE",
59 "FL_DRAG",
60 "FL_FOCUS",
61 "FL_UNFOCUS",
62 "FL_KEYDOWN",
63 "FL_KEYUP",
64 "FL_CLOSE",
65 "FL_MOVE",
66 "FL_SHORTCUT",
67 "FL_DEACTIVATE",
68 "FL_ACTIVATE",
69 "FL_HIDE",
70 "FL_SHOW",
71 "FL_PASTE",
72 "FL_SELECTIONCLEAR",
73 "FL_MOUSEWHEEL",
74 "FL_DND_ENTER",
75 "FL_DND_DRAG",
76 "FL_DND_LEAVE",
77 "FL_DND_RELEASE",
DRC685f17e2011-07-28 09:23:00 +000078 "FL_FULLSCREEN"
DRC2ff39b82011-07-28 08:38:59 +000079};
80
81/**
82 This is an array of font names you can use to convert font numbers into names.
83
84 The array gets defined inline wherever your '\#include <FL/names.h>' appears.
85
86 \b Example:
87 \code
88 #include <FL/names.h> // array will be defined here
89 int MyClass::my_callback(Fl_Widget *w, void*) {
90 int fnum = w->labelfont();
91 // Resulting output might be e.g. "Label's font is FL_HELVETICA (0)"
92 printf("Label's font is %s (%d)\n", fl_fontnames[fnum], fnum);
93 // ..resulting output might be e.g. "Label's font is FL_HELVETICA (0)"..
94 [..]
95 }
96 \endcode
97 */
98const char * const fl_fontnames[] =
99{
100 "FL_HELVETICA",
101 "FL_HELVETICA_BOLD",
102 "FL_HELVETICA_ITALIC",
103 "FL_HELVETICA_BOLD_ITALIC",
104 "FL_COURIER",
105 "FL_COURIER_BOLD",
106 "FL_COURIER_ITALIC",
107 "FL_COURIER_BOLD_ITALIC",
108 "FL_TIMES",
109 "FL_TIMES_BOLD",
110 "FL_TIMES_ITALIC",
111 "FL_TIMES_BOLD_ITALIC",
112 "FL_SYMBOL",
113 "FL_SCREEN",
114 "FL_SCREEN_BOLD",
115 "FL_ZAPF_DINGBATS",
116};
117
118/** @} */
119
120#endif /* FL_NAMES_H */
121
122//
123// End of "$Id: names.h 7903 2010-11-28 21:06:39Z matt $".
124//