diff options
| author | Manolo Gouy <Manolo> | 2014-02-11 17:59:20 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2014-02-11 17:59:20 +0000 |
| commit | e43bf8a1b2ffd6f2ba5a66044b0cfea9e9b097b4 (patch) | |
| tree | b1108b89709b83998e763cb2299601f8644e9442 /src/Fl_Sys_Menu_Bar.mm | |
| parent | f4e2292f8049576d3a60d22e3e8fb83184406214 (diff) | |
Completed the implementation of Fl_Sys_Menu_Bar that now accepts all calls of its parent class Fl_Menu_.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10102 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Sys_Menu_Bar.mm')
| -rw-r--r-- | src/Fl_Sys_Menu_Bar.mm | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Fl_Sys_Menu_Bar.mm b/src/Fl_Sys_Menu_Bar.mm index 8a42ba02f..e2bb478a8 100644 --- a/src/Fl_Sys_Menu_Bar.mm +++ b/src/Fl_Sys_Menu_Bar.mm @@ -388,6 +388,19 @@ int Fl_Sys_Menu_Bar::add(const char* label, int shortcut, Fl_Callback *cb, void } /** + * Forms-compatible procedure to add items to the system menu bar +* + * @see Fl_Menu_::add(const char* str) + */ +int Fl_Sys_Menu_Bar::add(const char* str) +{ + fl_open_display(); + int rank = Fl_Menu_::add(str); + update(); + return rank; +} + +/** * @brief insert in the system menu bar a new menu item * * insert in the system menu bar a new menu item, with a title string, shortcut int, @@ -440,8 +453,7 @@ void Fl_Sys_Menu_Bar::replace(int rank, const char *name) update(); } -/** Updates the system menu. - Useful after changes in the menu items, e.g., item activation/deactivation. +/** Updates the system menu after any change to its items. */ void Fl_Sys_Menu_Bar::update() { |
