From c15a36003dd3213deeae6163ec53c6344dd28683 Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Fri, 26 Feb 1999 07:14:34 +0000 Subject: Fixed description of Fl_Menu_::size() git-svn-id: file:///fltk/svn/fltk/trunk@347 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Menu_.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'documentation') diff --git a/documentation/Fl_Menu_.html b/documentation/Fl_Menu_.html index 69f5b1efc..5dcc87b48 100644 --- a/documentation/Fl_Menu_.html +++ b/documentation/Fl_Menu_.html @@ -107,10 +107,12 @@ global() setting (including destroying the menu).


const char* Fl_Menu_::text(int i) const Returns the title of the last item chosen, or of item i.

int Fl_Menu_::size() const

- This returns menu()->size(), which is how many entries are in -the array, not counting the NULL ending, but including all -submenus titles and the NULL's that end them. If the menu is -NULL this returns zero. + This returns menu()->size(), which is +the number of Fl_Menu_Item structures that make up this menu, +correctly counting submenus. This includes the "terminator" item at +the end. So to copy a menu you need to copy +size()*sizeof(Fl_Menu_Item) bytes. If the menu is +NULL this returns zero (an empty menu will return 1).

int Fl_Menu_::add(const char *,const char *,Fl_Callback *,void *v=0,int f=0)
int Fl_Menu_::add(const char *)

-- cgit v1.2.3