names.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. //
  2. // "$Id: names.h 12121 2016-11-19 01:20:53Z AlbrechtS $"
  3. //
  4. // Event names header file for the Fast Light Tool Kit (FLTK).
  5. //
  6. // Copyright 1998-2016 by Bill Spitzak and others.
  7. //
  8. // This library is free software. Distribution and use rights are outlined in
  9. // the file "COPYING" which should have been included with this file. If this
  10. // file is missing or damaged, see the license at:
  11. //
  12. // http://www.fltk.org/COPYING.php
  13. //
  14. // Please report all bugs and problems on the following page:
  15. //
  16. // http://www.fltk.org/str.php
  17. //
  18. // Thanks to Greg Ercolano for this addition.
  19. #ifndef FL_NAMES_H
  20. #define FL_NAMES_H
  21. /** \defgroup fl_events Events handling functions
  22. @{
  23. */
  24. /**
  25. This is an array of event names you can use to convert event numbers into names.
  26. The array gets defined inline wherever your '\#include <FL/names.h>' appears.
  27. \b Example:
  28. \code
  29. #include <FL/names.h> // array will be defined here
  30. int MyClass::handle(int e) {
  31. printf("Event was %s (%d)\n", fl_eventnames[e], e);
  32. // ..resulting output might be e.g. "Event was FL_PUSH (1)"..
  33. [..]
  34. }
  35. \endcode
  36. */
  37. const char * const fl_eventnames[] =
  38. {
  39. "FL_NO_EVENT",
  40. "FL_PUSH",
  41. "FL_RELEASE",
  42. "FL_ENTER",
  43. "FL_LEAVE",
  44. "FL_DRAG",
  45. "FL_FOCUS",
  46. "FL_UNFOCUS",
  47. "FL_KEYDOWN",
  48. "FL_KEYUP",
  49. "FL_CLOSE",
  50. "FL_MOVE",
  51. "FL_SHORTCUT",
  52. "FL_DEACTIVATE",
  53. "FL_ACTIVATE",
  54. "FL_HIDE",
  55. "FL_SHOW",
  56. "FL_PASTE",
  57. "FL_SELECTIONCLEAR",
  58. "FL_MOUSEWHEEL",
  59. "FL_DND_ENTER",
  60. "FL_DND_DRAG",
  61. "FL_DND_LEAVE",
  62. "FL_DND_RELEASE",
  63. "FL_SCREEN_CONFIGURATION_CHANGED",
  64. "FL_FULLSCREEN",
  65. "FL_ZOOM_GESTURE",
  66. "FL_EVENT_27", // not yet defined, just in case it /will/ be defined ...
  67. "FL_EVENT_28", // not yet defined, just in case it /will/ be defined ...
  68. "FL_EVENT_29", // not yet defined, just in case it /will/ be defined ...
  69. "FL_EVENT_30" // not yet defined, just in case it /will/ be defined ...
  70. };
  71. /**
  72. This is an array of font names you can use to convert font numbers into names.
  73. The array gets defined inline wherever your '\#include <FL/names.h>' appears.
  74. \b Example:
  75. \code
  76. #include <FL/names.h> // array will be defined here
  77. int MyClass::my_callback(Fl_Widget *w, void*) {
  78. int fnum = w->labelfont();
  79. // Resulting output might be e.g. "Label's font is FL_HELVETICA (0)"
  80. printf("Label's font is %s (%d)\n", fl_fontnames[fnum], fnum);
  81. // ..resulting output might be e.g. "Label's font is FL_HELVETICA (0)"..
  82. [..]
  83. }
  84. \endcode
  85. */
  86. const char * const fl_fontnames[] =
  87. {
  88. "FL_HELVETICA",
  89. "FL_HELVETICA_BOLD",
  90. "FL_HELVETICA_ITALIC",
  91. "FL_HELVETICA_BOLD_ITALIC",
  92. "FL_COURIER",
  93. "FL_COURIER_BOLD",
  94. "FL_COURIER_ITALIC",
  95. "FL_COURIER_BOLD_ITALIC",
  96. "FL_TIMES",
  97. "FL_TIMES_BOLD",
  98. "FL_TIMES_ITALIC",
  99. "FL_TIMES_BOLD_ITALIC",
  100. "FL_SYMBOL",
  101. "FL_SCREEN",
  102. "FL_SCREEN_BOLD",
  103. "FL_ZAPF_DINGBATS",
  104. };
  105. /** @} */
  106. #endif /* FL_NAMES_H */
  107. //
  108. // End of "$Id: names.h 12121 2016-11-19 01:20:53Z AlbrechtS $".
  109. //