Changes to Fl_Menu_::add() so that you should be able to add to any menu,

including one that was set with menu().  It copies the static menu if
necessary and keeps track of the size of the menu so it can reallocate
the array exactly when necessary.

This should make modifying the items in a menu much more predictable and
usefule.

I don't know if these changes will go cleanly into 2.0.  Probably not.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@550 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Bill Spitzak
1999-04-19 07:01:24 +00:00
parent 405f8fba3a
commit add808d7c2
5 changed files with 183 additions and 113 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
//
// "$Id: subwindow.cxx,v 1.5 1999/02/03 08:43:35 bill Exp $"
// "$Id: subwindow.cxx,v 1.5.2.1 1999/04/19 07:01:24 bill Exp $"
//
// Nested window test program for the Fast Light Tool Kit (FLTK).
//
@@ -165,10 +165,11 @@ int main(int, char **) {
popup = new Fl_Menu_Button(0,0,400,400);
popup->type(Fl_Menu_Button::POPUP3);
popup->add("This|is|a popup|menu");
popup->add(bigmess);
window->show();
return Fl::run();
}
//
// End of "$Id: subwindow.cxx,v 1.5 1999/02/03 08:43:35 bill Exp $".
// End of "$Id: subwindow.cxx,v 1.5.2.1 1999/04/19 07:01:24 bill Exp $".
//