names.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. //
  2. // "$Id: names.h 9299 2012-03-23 16:47:53Z manolo $"
  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. 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. };
  66. /**
  67. This is an array of font names you can use to convert font numbers into names.
  68. The array gets defined inline wherever your '\#include <FL/names.h>' appears.
  69. \b Example:
  70. \code
  71. #include <FL/names.h> // array will be defined here
  72. int MyClass::my_callback(Fl_Widget *w, void*) {
  73. int fnum = w->labelfont();
  74. // Resulting output might be e.g. "Label's font is FL_HELVETICA (0)"
  75. printf("Label's font is %s (%d)\n", fl_fontnames[fnum], fnum);
  76. // ..resulting output might be e.g. "Label's font is FL_HELVETICA (0)"..
  77. [..]
  78. }
  79. \endcode
  80. */
  81. const char * const fl_fontnames[] =
  82. {
  83. "FL_HELVETICA",
  84. "FL_HELVETICA_BOLD",
  85. "FL_HELVETICA_ITALIC",
  86. "FL_HELVETICA_BOLD_ITALIC",
  87. "FL_COURIER",
  88. "FL_COURIER_BOLD",
  89. "FL_COURIER_ITALIC",
  90. "FL_COURIER_BOLD_ITALIC",
  91. "FL_TIMES",
  92. "FL_TIMES_BOLD",
  93. "FL_TIMES_ITALIC",
  94. "FL_TIMES_BOLD_ITALIC",
  95. "FL_SYMBOL",
  96. "FL_SCREEN",
  97. "FL_SCREEN_BOLD",
  98. "FL_ZAPF_DINGBATS",
  99. };
  100. /** @} */
  101. #endif /* FL_NAMES_H */
  102. //
  103. // End of "$Id: names.h 9299 2012-03-23 16:47:53Z manolo $".
  104. //