| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #316
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | RFE: Add find_item() method to Fl_Menu_ |
Version: | 1.1-current |
Created By: | greg.ercolano |
Assigned To: | mike |
Fix Version: | 1.1.5rc1 |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
#1 | greg.ercolano 15:11 Mar 13, 2004 |
| It would be great if Fl_Menu_ had an overloaded method that would return a menu item pointer (and menu() index) given a menu "pathname", eg:
// Returns pointer Fl_Menu_Item *item = menubar->find_item("Edit/Copy"); if ( item ) item->deactivate();
// Returns index int index = menubar->find_item("Edit/Copy"); if ( index != -1 ) { Fl_Menu_Item *item = (Fl_Menu_Item*)&(menubar->menu()[index]);
See also:
o Newsgroup msg dated 03/13/2004, Subject: "dynamic menus -- RFC"
o STR #283, new Fl_Menu_::item_pathname() method
o GetIndexByName() source code on this page: http://seriss.com/people/erco/fltk/#Fl_Menu_Bar
| |
|
#2 | mike 12:34 Apr 06, 2004 |
| Note: only the Fl_Menu_Item * method was implemented, as you can't overload return values (or at least GCC 3.x doesn't let you). | |
|
#3 | mike 12:34 Apr 06, 2004 |
| Fixed in CVS - the anonymous CVS repository will be updated at midnight PST. | |
[ Return to Bugs & Features ]
|
| |