From e85d7a87523b157b92a7a4d20029f80c4dccbec5 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 7 Jun 2004 19:23:12 +0000 Subject: The first menuitem in a menulist would not honor teh MENU_INVISIBLE flag. I added the function Fl_Menu_Item::first() whi returns the first visible menuitem, just like ::next() returns the next visible item, and added the ::first() call in the Menu code. first() is an inline function that calls next(0). I updated next() to correctly handle list where the current item is invisible. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3448 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Menu_Item.H | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'FL') diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H index 0b301dd94..6317b5a57 100644 --- a/FL/Fl_Menu_Item.H +++ b/FL/Fl_Menu_Item.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_Item.H,v 1.5.2.4.2.8 2004/04/11 04:38:54 easysw Exp $" +// "$Id: Fl_Menu_Item.H,v 1.5.2.4.2.9 2004/06/07 19:22:45 matthiaswm Exp $" // // Menu item header file for the Fast Light Tool Kit (FLTK). // @@ -64,6 +64,8 @@ struct FL_EXPORT Fl_Menu_Item { const Fl_Menu_Item *next(int=1) const; Fl_Menu_Item *next(int i=1) { return (Fl_Menu_Item*)(((const Fl_Menu_Item*)this)->next(i));} + const Fl_Menu_Item *first() const { return next(0); } + Fl_Menu_Item *first() { return next(0); } // methods on menu items: const char* label() const {return text;} @@ -159,5 +161,5 @@ enum { // back-compatability enum: #endif // -// End of "$Id: Fl_Menu_Item.H,v 1.5.2.4.2.8 2004/04/11 04:38:54 easysw Exp $". +// End of "$Id: Fl_Menu_Item.H,v 1.5.2.4.2.9 2004/06/07 19:22:45 matthiaswm Exp $". // -- cgit v1.2.3