From 21b8d6aa1a6c1fbf98df5d11507a6629a528ae82 Mon Sep 17 00:00:00 2001
From: Albrecht Schlosser The characters "&", "/", "\", and "_" are treated as
+ The characters "&", "/", "\", and "_" are treated as
special characters in the label string. The "&" character
specifies that the following character is an accelerator and
will be underlined. The "\" character is used to escape the next
character in the string. Labels starting with the "_" character
- cause a divider to be placed after that menu item. A label of the form "foo/bar/baz" will create a
- submenus called "foo" and "bar" with an
- entry called "baz". The "/" character is ignored if it
- appears as the first character of the label string, e.g.
- "/foo/bar/baz". The label string is copied to new memory and can be freed.
+ The label string is copied to new memory and can be freed.
The other arguments (including the shortcut) are copied into the
- menu item unchanged. If an item exists already with that name then it is replaced with
+ If an item exists already with that name then it is replaced with
this new one. Otherwise this new one is added to the end of the
correct menu or submenu. The return value is the offset into the array
- that the new entry was placed at. Shortcut can be 0L, or either a modifier/key combination (for example
- FL_CTRL+'A') or a string describing the shortcut in one of two ways: The return value is the index into the array that the entry was put. No items must be added to a menu during a callback to the same menu.
No items must be added to a menu during a callback to the same menu. + same special characters as described for the long version of add(). + + No items must be added to a menu during a callback to the same menu. */ int Fl_Menu_::add(const char *str) { char buf[1024]; @@ -302,7 +299,7 @@ int Fl_Menu_::add(const char *str) { } /** - Changes the text of item n. This is the only way to get + Changes the text of item \a i. This is the only way to get slash into an add()'ed menu item. If the menu array was directly set with menu(x) then copy() is done to make a private array. */ @@ -316,10 +313,10 @@ void Fl_Menu_::replace(int i, const char *str) { menu_[i].text = str; } /** - Deletes item n from the menu. If the menu array was directly + Deletes item \a i from the menu. If the menu array was directly set with menu(x) then copy() is done to make a private array. -
No items must be removed from a menu during a callback to the same menu. + No items must be removed from a menu during a callback to the same menu. */ void Fl_Menu_::remove(int i) { int n = size(); -- cgit v1.2.3