You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
3.0KB

  1. //
  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. // Thanks to Greg Ercolano for this addition.
  28. #ifndef FL_NAMES_H
  29. #define FL_NAMES_H
  30. /** \defgroup fl_events Events handling functions
  31. @{
  32. */
  33. /**
  34. This is an array of event names you can use to convert event numbers into names.
  35. The array gets defined inline wherever your '\#include <FL/names.h>' appears.
  36. \b Example:
  37. \code
  38. #include <FL/names.h> // array will be defined here
  39. int MyClass::handle(int e) {
  40. printf("Event was %s (%d)\n", fl_eventnames[e], e);
  41. // ..resulting output might be e.g. "Event was FL_PUSH (1)"..
  42. [..]
  43. }
  44. \endcode
  45. */
  46. const char * const fl_eventnames[] =
  47. {
  48. "FL_NO_EVENT",
  49. "FL_PUSH",
  50. "FL_RELEASE",
  51. "FL_ENTER",
  52. "FL_LEAVE",
  53. "FL_DRAG",
  54. "FL_FOCUS",
  55. "FL_UNFOCUS",
  56. "FL_KEYDOWN",
  57. "FL_KEYUP",
  58. "FL_CLOSE",
  59. "FL_MOVE",
  60. "FL_SHORTCUT",
  61. "FL_DEACTIVATE",
  62. "FL_ACTIVATE",
  63. "FL_HIDE",
  64. "FL_SHOW",
  65. "FL_PASTE",
  66. "FL_SELECTIONCLEAR",
  67. "FL_MOUSEWHEEL",
  68. "FL_DND_ENTER",
  69. "FL_DND_DRAG",
  70. "FL_DND_LEAVE",
  71. "FL_DND_RELEASE",
  72. };
  73. /**
  74. This is an array of font names you can use to convert font numbers into names.
  75. The array gets defined inline wherever your '\#include <FL/names.h>' appears.
  76. \b Example:
  77. \code
  78. #include <FL/names.h> // array will be defined here
  79. int MyClass::my_callback(Fl_Widget *w, void*) {
  80. int fnum = w->labelfont();
  81. // Resulting output might be e.g. "Label's font is FL_HELVETICA (0)"
  82. printf("Label's font is %s (%d)\n", fl_fontnames[fnum], fnum);
  83. // ..resulting output might be e.g. "Label's font is FL_HELVETICA (0)"..
  84. [..]
  85. }
  86. \endcode
  87. */
  88. const char * const fl_fontnames[] =
  89. {
  90. "FL_HELVETICA",
  91. "FL_HELVETICA_BOLD",
  92. "FL_HELVETICA_ITALIC",
  93. "FL_HELVETICA_BOLD_ITALIC",
  94. "FL_COURIER",
  95. "FL_COURIER_BOLD",
  96. "FL_COURIER_ITALIC",
  97. "FL_COURIER_BOLD_ITALIC",
  98. "FL_TIMES",
  99. "FL_TIMES_BOLD",
  100. "FL_TIMES_ITALIC",
  101. "FL_TIMES_BOLD_ITALIC",
  102. "FL_SYMBOL",
  103. "FL_SCREEN",
  104. "FL_SCREEN_BOLD",
  105. "FL_ZAPF_DINGBATS",
  106. };
  107. /** @} */
  108. #endif /* FL_NAMES_H */
  109. //
  110. // End of "$Id: names.h 7903 2010-11-28 21:06:39Z matt $".
  111. //