Advertisement
Taz8du29

menuEntries.h

Jan 18th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.26 KB | None | 0 0
  1. /* menuEntries.h
  2.  *
  3.  * Menu bar items definition and callback functions header
  4.  *
  5.  * Copyright 2017 (C) Taz8du29
  6.  * Refer to LICENSE.md for more infos about copyright
  7. */
  8.  
  9.  
  10. #ifndef _MENUENTRIES_H_
  11. #define _MENUENTRIES_H_
  12.  
  13.  
  14. /* DEPENDENCIES */
  15.  
  16. // FLTK Libraries
  17. #include <FL/Fl_Menu_Bar.H>
  18. #include <FL/Fl_Menu_Item.H>
  19.  
  20. #include <FL/Fl_File_Chooser.H>
  21.  
  22.  
  23.  
  24. /* FUNCTIONS */
  25.  
  26. void foo(Fl_Widget*, void*);
  27.  
  28. void cb_open(Fl_Widget*, void*);
  29.  
  30.  
  31.  
  32. /* OBJECTS */
  33.  
  34. const Fl_Menu_Item __menu[] = {
  35.     {"&File", 0, 0, 0, FL_SUBMENU},
  36.         {"&New",        FL_CTRL+'n',          foo,     0},
  37.         {"&Open",       FL_CTRL+'o',          cb_open, 0, FL_MENU_DIVIDER},
  38.         {"&Save",       FL_CTRL+'s',          cb_open, 0},
  39.         {"Save &As   ", FL_CTRL+FL_SHIFT+'s', cb_open, 0, FL_MENU_DIVIDER},
  40.         {"&Quit",       FL_CTRL+'q',          foo,     0},
  41.         {0},
  42.     {"&Help", 0, 0, 0, FL_SUBMENU},
  43.         {"Sho&w Help",            FL_F+1, foo, 0},
  44.         {"&FAQ",                  0,      foo, 0, FL_MENU_DIVIDER},
  45.         {"View &License",         0,      foo, 0, FL_MENU_DIVIDER},
  46.         {"&About matrixNecklace", 0,      foo, 0},
  47.         {0}
  48. };
  49.  
  50.  
  51.  
  52. /* C++ PROGRAM */
  53.  
  54. #include "menuEntries.cpp"
  55.  
  56.  
  57. #endif /* !_MENUENTRIES_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement