FLTK 1.3.0
|
00001 // 00002 // "$Id$" 00003 // 00004 // MacOS system menu bar header file for the Fast Light Tool Kit (FLTK). 00005 // 00006 // Copyright 1998-2010 by Bill Spitzak and others. 00007 // 00008 // This library is free software. Distribution and use rights are outlined in 00009 // the file "COPYING" which should have been included with this file. If this 00010 // file is missing or damaged, see the license at: 00011 // 00012 // http://www.fltk.org/COPYING.php 00013 // 00014 // Please report all bugs and problems on the following page: 00015 // 00016 // http://www.fltk.org/str.php 00017 // 00018 00019 #ifndef Fl_Sys_Menu_Bar_H 00020 #define Fl_Sys_Menu_Bar_H 00021 00022 #include "Fl_Menu_Bar.H" 00023 #include "x.H" 00024 00025 #if defined(__APPLE__) || defined(FL_DOXYGEN) 00026 00035 class FL_EXPORT Fl_Sys_Menu_Bar : public Fl_Menu_Bar { 00036 protected: 00037 void draw(); 00038 public: 00044 Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l=0); 00045 const Fl_Menu_Item *menu() const {return Fl_Menu_::menu();} 00046 void menu(const Fl_Menu_Item *m); 00047 int add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0); 00048 int insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data=0, int flags=0); 00049 void remove(int n); 00050 void replace(int rank, const char *name); 00051 void clear(); 00052 int clear_submenu(int index); 00053 #if ! defined(FL_DOXYGEN) 00054 enum menuOrItemOperation { itemAtIndex, setKeyEquivalent, setKeyEquivalentModifierMask, setState, initWithTitle, 00055 numberOfItems, setSubmenu, setEnabled, addSeparatorItem, setTitle, removeItem, addNewItem }; 00056 // function doMenuOrItemOperation is in file Fl_cocoa.mm because it contains objective-c code 00057 static void *doMenuOrItemOperation( menuOrItemOperation operation, ...); 00058 #endif 00059 }; 00060 00061 #else 00062 00063 typedef Fl_Menu_Bar Fl_Sys_Menu_Bar; 00064 00065 #endif // defined(__APPLE__) || defined(FL_DOXYGEN) 00066 00067 #endif // Fl_Sys_Menu_Bar_H 00068 00069 // 00070 // End of "$Id$". 00071 //