fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
  SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation)  

Fl_Menu_ Class Reference

#include <Fl_Menu_.H>

Inheritance diagram for Fl_Menu_:
Collaboration diagram for Fl_Menu_:

List of all members.

Public Member Functions

 Fl_Menu_ (int, int, int, int, const char *=0)
 ~Fl_Menu_ ()
int item_pathname (char *name, int namelen, const Fl_Menu_Item *finditem=0) const
const Fl_Menu_Itempicked (const Fl_Menu_Item *)
const Fl_Menu_Itemfind_item (const char *name)
const Fl_Menu_Itemfind_item (Fl_Callback *)
int find_index (const char *name) const
int find_index (const Fl_Menu_Item *item) const
int find_index (Fl_Callback *cb) const
const Fl_Menu_Itemtest_shortcut ()
void global ()
const Fl_Menu_Itemmenu () const
void menu (const Fl_Menu_Item *m)
void copy (const Fl_Menu_Item *m, void *user_data=0)
int insert (int index, const char *, int shortcut, Fl_Callback *, void *=0, int=0)
int add (const char *, int shortcut, Fl_Callback *, void *=0, int=0)
int add (const char *a, const char *b, Fl_Callback *c, void *d=0, int e=0)
int insert (int index, const char *a, const char *b, Fl_Callback *c, void *d=0, int e=0)
int add (const char *)
int size () const
void size (int W, int H)
void clear ()
int clear_submenu (int index)
void replace (int, const char *)
void remove (int)
void shortcut (int i, int s)
void mode (int i, int fl)
int mode (int i) const
const Fl_Menu_Itemmvalue () const
int value () const
int value (const Fl_Menu_Item *)
int value (int i)
const char * text () const
const char * text (int i) const
Fl_Font textfont () const
void textfont (Fl_Font c)
Fl_Fontsize textsize () const
void textsize (Fl_Fontsize c)
Fl_Color textcolor () const
void textcolor (Fl_Color c)
Fl_Boxtype down_box () const
void down_box (Fl_Boxtype b)
Fl_Color down_color () const
void down_color (unsigned c)

Protected Attributes

uchar alloc
uchar down_box_
Fl_Font textfont_
Fl_Fontsize textsize_
Fl_Color textcolor_

Detailed Description

Base class of all widgets that have a menu in FLTK. Currently FLTK provides you with Fl_Menu_Button, Fl_Menu_Bar, and Fl_Choice.

The class contains a pointer to an array of structures of type Fl_Menu_Item. The array may either be supplied directly by the user program, or it may be "private": a dynamically allocated array managed by the Fl_Menu_.

Definition at line 48 of file Fl_Menu_.H.


Constructor & Destructor Documentation

Fl_Menu_::Fl_Menu_ ( int  X,
int  Y,
int  W,
int  H,
const char *  l = 0 
)
Fl_Menu_::~Fl_Menu_ ( )

Definition at line 364 of file Fl_Menu_.cxx.

References clear().


Member Function Documentation

int Fl_Menu_::add ( const char *  label,
int  shortcut,
Fl_Callback callback,
void *  userdata = 0,
int  flags = 0 
)

Adds a new menu item.

Parameters:
[in]labelThe text label for the menu item.
[in]shortcutOptional keyboard shortcut that can be an int or string; (FL_CTRL+'a') or "^a". Default 0 if none.
[in]callbackOptional callback invoked when user clicks the item. Default 0 if none.
[in]userdataOptional user data passed as an argument to the callback. Default 0 if none.
[in]flagsOptional flags that control the type of menu item; see below. Default is 0 for none.
Returns:
The index into the menu() array, where the entry was added.
Description
If the menu array was directly set with menu(x), then copy() is done to make a private array.
Since this method can change the internal menu array, any menu item pointers or indecies the application may have cached can become stale, and should be recalculated/refreshed.
A menu item's callback must not add() items to its parent menu during the callback.

Detailed Description of Parameters

label
The menu item's label. This option is required.
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 "File/Quit" will create the submenu "File" with a menu item called "Quit". The "/" character is ignored if it appears as the first character of the label string, e.g. "/File/Quit".
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 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
The keyboard shortcut for this menu item.
This parameter is optional, and defaults to 0 to indicate no shortcut.
The shortcut can either be a raw integer value (eg. FL_CTRL+'A') or a string (eg. "^c" or "^97").
Raw integer shortcuts can be a combination of keyboard chars (eg. 'A') and optional keyboard modifiers (see Fl::event_state(), e.g. FL_SHIFT, etc). In addition, FL_COMMAND can be used to denote FL_META under Mac OS X and FL_CTRL under other platforms.
String shortcuts can be specified in one of two ways:
   [#+^]<ascii_value>    e.g. "97", "^97", "+97", "#97"
   [#+^]<ascii_char>     e.g. "a", "^a", "+a", "#a"
  
..where <ascii_value> is a decimal value representing an ascii character (eg. 97 is the ascii code for 'a'), and the optional prefixes enhance the value that follows. Multiple prefixes must appear in the order below.
   # - Alt
   + - Shift
   ^ - Control
  
Internally, the text shortcuts are converted to integer values using fl_old_shortcut(const char*).
callback
The callback to invoke when this menu item is selected.
This parameter is optional, and defaults to 0 for no callback.
userdata
The callback's 'user data' that is passed to the callback.
This parameter is optional, and defaults to 0.
flags
These are bit flags to define what kind of menu item this is.
This parameter is optional, and defaults to 0 to define a 'regular' menu item.
These flags can be 'OR'ed together:
      FL_MENU_INACTIVE     // Deactivate menu item (gray out)
      FL_MENU_TOGGLE       // Item is a checkbox toggle (shows checkbox for on/off state)
      FL_MENU_VALUE        // The on/off state for checkbox/radio buttons (if set, state is 'on')
      FL_MENU_RADIO        // Item is a radio button (one checkbox of many can be on)
      FL_MENU_INVISIBLE    // Item will not show up (shortcut will work)
      FL_SUBMENU_POINTER   // Indicates user_data() is a pointer to another menu array
      FL_SUBMENU           // This item is a submenu to other items
      FL_MENU_DIVIDER      // Creates divider line below this item. Also ends a group of radio buttons.
Todo:
Raw integer shortcut needs examples. Dependent on responses to http://fltk.org/newsgroups.php?gfltk.development+v:10086 and results of STR#2344

Definition at line 327 of file Fl_Menu_add.cxx.

References insert().

Referenced by add(), Fl_File_Chooser::filter(), Fl_Comment_Type::open(), print_load(), and Fl_File_Chooser::rescan_keep_filename().

int Fl_Menu_::add ( const char *  str)

This is a Forms (and SGI GL library) compatible add function, it adds many menu items, with '|' separating the menu items, and tab separating the menu item names from an optional shortcut string.

The passed string is split at any '|' characters and then add(s,0,0,0,0) is done with each section. This is often useful if you are just using the value, and is compatible with Forms and other GL programs. The section strings use the 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.

Parameters:
strstring containing multiple menu labels as described above
Returns:
the index into the menu() array, where the entry was added

Definition at line 431 of file Fl_Menu_add.cxx.

References add(), buf, and fl_old_shortcut().

int Fl_Menu_::add ( const char *  a,
const char *  b,
Fl_Callback c,
void *  d = 0,
int  e = 0 
) [inline]

See int Fl_Menu_::add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0)

Definition at line 97 of file Fl_Menu_.H.

References fl_old_shortcut().

void Fl_Menu_::clear ( )

Same as menu(NULL), set the array pointer to null, indicating a zero-length menu.

Menus must not be cleared during a callback to the same menu.

Definition at line 378 of file Fl_Menu_.cxx.

References alloc, i, size(), and text().

Referenced by Fl_File_Chooser::filter(), menu(), Fl_Comment_Type::open(), print_load(), Fl_File_Chooser::rescan_keep_filename(), and ~Fl_Menu_().

int Fl_Menu_::clear_submenu ( int  index)

Clears the specified submenu pointed to by index of all menu items.

This method is useful for clearing a submenu so that it can be re-populated with new items. Example: a "File/Recent Files/..." submenu that shows the last few files that have been opened.

The specified index must point to a submenu.

The submenu is cleared with remove(). If the menu array was directly set with menu(x), then copy() is done to make a private array.

Warning:
Since this method can change the internal menu array, any menu item pointers or indecies the application may have cached can become stale, and should be recalculated/refreshed.

Example:

   int index = menubar->find_index("File/Recent");    // get index of "File/Recent" submenu
   if ( index != -1 ) menubar->clear_submenu(index);  // clear the submenu
   menubar->add("File/Recent/Aaa");
   menubar->add("File/Recent/Bbb");
   [..]
Parameters:
indexThe index of the submenu to be cleared
Returns:
0 on success, -1 if the index is out of range or not a submenu
See also:
remove(int)

Definition at line 422 of file Fl_Menu_.cxx.

References FL_SUBMENU, Fl_Widget::flags(), size(), and text().

void Fl_Menu_::copy ( const Fl_Menu_Item m,
void *  ud = 0 
)

Sets the menu array pointer with a copy of m that will be automatically deleted. If userdata ud is not NULL, then all user data pointers are changed in the menus as well. See void Fl_Menu_::menu(const Fl_Menu_Item* m).

Definition at line 351 of file Fl_Menu_.cxx.

References alloc, Fl_Menu_Item::callback_, menu(), Fl_Menu_Item::size(), and Fl_Menu_Item::user_data_.

Referenced by insert(), remove(), and replace().

Fl_Boxtype Fl_Menu_::down_box ( ) const [inline]
void Fl_Menu_::down_box ( Fl_Boxtype  b) [inline]

See Fl_Boxtype Fl_Menu_::down_box() const

Definition at line 156 of file Fl_Menu_.H.

References b.

Fl_Color Fl_Menu_::down_color ( ) const [inline]

For back compatibility, same as selection_color()

Definition at line 159 of file Fl_Menu_.H.

References Fl_Widget::selection_color().

void Fl_Menu_::down_color ( unsigned  c) [inline]

For back compatibility, same as selection_color()

Definition at line 161 of file Fl_Menu_.H.

References Fl_Widget::selection_color().

int Fl_Menu_::find_index ( const Fl_Menu_Item item) const

Find the index the menu array for given item.

A way to convert a menu item pointer into an index.

Current implementation is fast and not expensive.

   // Convert an index-to-item
   int index = 12;
   const Fl_Menu_Item *item = mymenu->menu() + index;

   // Convert an item-to-index
   int index = mymenu->find_index(item);
   if ( index == -1 ) { ..error.. }
Parameters:
itemThe *item to be found
Returns:
The index of the item, or -1 if not found.
See also:
menu()

Definition at line 156 of file Fl_Menu_.cxx.

References size().

int Fl_Menu_::find_index ( Fl_Callback cb) const

Find the index into the menu array for a given callback cb.

This method finds a menu item's index position, also traversing submenus, but not submenu pointers. This is useful if an application uses internationalisation and a menu item can not be found using its label. This search is also much faster.

Parameters:
cbFind the first item with this callback
Returns:
The index of the item with the specific callback, or -1 if not found
See also:
find_index(const char*)

Definition at line 173 of file Fl_Menu_.cxx.

References size().

int Fl_Menu_::find_index ( const char *  pathname) const

Find the menu item index for a given menu pathname, such as "Edit/Copy".

This method finds a menu item's index position for the given menu pathname, also traversing submenus, but not submenu pointers.

To get the menu item pointer for a pathname, use find_item()

Parameters:
pathnameThe path and name of the menu item index to find
Returns:
The index of the matching item, or -1 if not found.
See also:
item_pathname()

Definition at line 193 of file Fl_Menu_.cxx.

References FL_SUBMENU, Fl_Menu_Item::flags, Fl_Menu_Item::label(), m, size(), and strlcat.

Referenced by find_item().

const Fl_Menu_Item * Fl_Menu_::find_item ( const char *  pathname)

Find the menu item for a given menu pathname, such as "Edit/Copy".

This method finds a menu item in the menu array, also traversing submenus, but not submenu pointers.

To get the menu item's index, use find_index(const char*)

Example:

    Fl_Menu_Bar *menubar = new Fl_Menu_Bar(..);
    menubar->add("File/&Open");
    menubar->add("File/&Save");
    menubar->add("Edit/&Copy");
    // [..]
    Fl_Menu_Item *item;
    if ( ( item = (Fl_Menu_Item*)menubar->find_item("File/&Open") ) != NULL ) {
        item->labelcolor(FL_RED);
    }
    if ( ( item = (Fl_Menu_Item*)menubar->find_item("Edit/&Copy") ) != NULL ) {
        item->labelcolor(FL_GREEN);
    }
Parameters:
pathnameThe path and name of the menu item
Returns:
The item found, or NULL if not found
See also:
find_index(const char*), find_item(Fl_Callback*), item_pathname()

Definition at line 130 of file Fl_Menu_.cxx.

References find_index(), and i.

Referenced by make_main_window().

const Fl_Menu_Item * Fl_Menu_::find_item ( Fl_Callback cb)

Find the menu item for the given callback cb.

This method finds a menu item in a menu array, also traversing submenus, but not submenu pointers. This is useful if an application uses internationalisation and a menu item can not be found using its label. This search is also much faster.

Parameters:
cbfind the first item with this callback
Returns:
The item found, or NULL if not found
See also:
find_item(const char*)

Definition at line 234 of file Fl_Menu_.cxx.

References Fl_Menu_Item::callback_, m, and size().

void Fl_Menu_::global ( )

Make the shortcuts for this menu work no matter what window has the focus when you type it. This is done by using Fl::add_handler(). This Fl_Menu_ widget does not have to be visible (ie the window it is in can be hidden, or it does not have to be put in a window at all).

Currently there can be only one global()menu. Setting a new one will replace the old one. There is no way to remove the global() setting (so don't destroy the widget!)

Definition at line 53 of file Fl_Menu_global.cxx.

References Fl::add_handler().

Referenced by make_main_window().

int Fl_Menu_::insert ( int  index,
const char *  a,
const char *  b,
Fl_Callback c,
void *  d = 0,
int  e = 0 
) [inline]

See int Fl_Menu_::insert(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0)

Definition at line 101 of file Fl_Menu_.H.

References fl_old_shortcut().

int Fl_Menu_::insert ( int  index,
const char *  label,
int  shortcut,
Fl_Callback callback,
void *  userdata = 0,
int  flags = 0 
)

Inserts a new menu item at the specified index position.

If index is -1, the menu item is appended; same behavior as add().

To properly insert a menu item, label must be the name of the item (eg. "Quit"), and not a 'menu pathname' (eg. "File/Quit"). If a menu pathname is specified, the value of index is ignored, the new item's position defined by the pathname.

For more details, see add(). Except for the index parameter, add() has more detailed information on parameters and behavior, and is functionally equivalent.

Parameters:
[in]indexThe menu array's index position where the new item is inserted. If -1, behavior is the same as add().
[in]labelThe text label for the menu item. If the label is a menu pathname, index is ignored, and the pathname indicates the position of the new item.
[in]shortcutOptional keyboard shortcut. Can be an int (FL_CTRL+'a') or a string ("^a"). Default is 0.
[in]callbackOptional callback invoked when user clicks the item. Default 0 if none.
[in]userdataOptional user data passed as an argument to the callback. Default 0 if none.
[in]flagsOptional flags that control the type of menu item; see add() for more info. Default is 0 for none.
Returns:
The index into the menu() array, where the entry was added.
See also:
add()

Definition at line 364 of file Fl_Menu_add.cxx.

References alloc, copy(), fl_menu_array_owner, Fl_Menu_Item::insert(), and size().

Referenced by add().

int Fl_Menu_::item_pathname ( char *  name,
int  namelen,
const Fl_Menu_Item finditem = 0 
) const

Get the menu 'pathname' for the specified menuitem.

If finditem==NULL, mvalue() is used (the most recently picked menuitem).

Example:

      Fl_Menu_Bar *menubar = 0;
      void my_menu_callback(Fl_Widget*,void*) {
        char name[80];
        if ( menubar->item_pathname(name, sizeof(name)-1) == 0 ) {   // recently picked item
          if ( strcmp(name, "File/&Open") == 0 ) { .. }              // open invoked
          if ( strcmp(name, "File/&Save") == 0 ) { .. }              // save invoked
          if ( strcmp(name, "Edit/&Copy") == 0 ) { .. }              // copy invoked
        }
      }
      int main() {
        [..]
        menubar = new Fl_Menu_Bar(..);
        menubar->add("File/&Open",  0, my_menu_callback);
        menubar->add("File/&Save",  0, my_menu_callback);
        menubar->add("Edit/&Copy",  0, my_menu_callback);
        [..]
      }
Returns:
  • 0 : OK (name has menuitem's pathname)
  • -1 : item not found (name="")
  • -2 : 'name' not large enough (name="")
See also:
find_item()

Definition at line 73 of file Fl_Menu_.cxx.

References Fl_Menu_Item::label(), m, menu(), mvalue(), SAFE_STRCAT, size(), and Fl_Menu_Item::submenu().

Referenced by Fl_Comment_Type::open().

void Fl_Menu_::menu ( const Fl_Menu_Item m)

Sets the menu array pointer directly. If the old menu is private it is deleted. NULL is allowed and acts the same as a zero-length menu. If you try to modify the array (with add(), replace(), or remove()) a private copy is automatically done.

Definition at line 339 of file Fl_Menu_.cxx.

References clear().

void Fl_Menu_::mode ( int  i,
int  fl 
) [inline]

Sets the flags of item i. For a list of the flags, see Fl_Menu_Item.

Definition at line 114 of file Fl_Menu_.H.

References Fl_Menu_Item::flags, i, and menu_.

int Fl_Menu_::mode ( int  i) const [inline]

Gets the flags of item i. For a list of the flags, see Fl_Menu_Item.

Definition at line 116 of file Fl_Menu_.H.

References Fl_Menu_Item::flags, i, and menu_.

const Fl_Menu_Item* Fl_Menu_::mvalue ( ) const [inline]

Returns a pointer to the last menu item that was picked.

Definition at line 119 of file Fl_Menu_.H.

Referenced by Fl_Input_Choice_Type::click_test(), Fl_Menu_Type::click_test(), Fl_Choice::draw(), Fl_Choice::handle(), item_pathname(), Fl_Menu_Button::popup(), and subtype_cb().

const Fl_Menu_Item * Fl_Menu_::picked ( const Fl_Menu_Item v)

When user picks a menu item, call this. It will do the callback. Unfortunately this also casts away const for the checkboxes, but this was necessary so non-checkbox menus can really be declared const...

Definition at line 261 of file Fl_Menu_.cxx.

References Fl_Menu_Item::callback_, Fl_Widget::changed(), Fl_Widget::do_callback(), Fl_Menu_Item::do_callback(), FL_MENU_TOGGLE, FL_MENU_VALUE, FL_WHEN_CHANGED, FL_WHEN_NOT_CHANGED, FL_WHEN_RELEASE, Fl_Menu_Item::flags, Fl_Menu_Item::radio(), Fl_Widget::redraw(), Fl_Widget::set_changed(), Fl_Menu_Item::value(), and Fl_Widget::when().

Referenced by Fl_Menu_Bar::handle(), Fl_Choice::handle(), HandleMenu(), and Fl_Menu_Button::popup().

void Fl_Menu_::remove ( int  i)

Deletes item 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.

Parameters:
iindex into menu array

Definition at line 478 of file Fl_Menu_add.cxx.

References alloc, copy(), i, Fl_Menu_Item::next(), size(), and Fl_Menu_Item::text.

Referenced by Fl_Comment_Type::open().

void Fl_Menu_::replace ( int  i,
const char *  str 
)

Changes the text of item 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.

Parameters:
iindex into menu array
strnew label for menu item at index i

Definition at line 458 of file Fl_Menu_add.cxx.

References alloc, copy(), i, size(), and Fl_Menu_Item::text.

void Fl_Menu_::shortcut ( int  i,
int  s 
) [inline]

Changes the shortcut of item i to n.

Definition at line 112 of file Fl_Menu_.H.

References i, menu_, and Fl_Menu_Item::shortcut().

int Fl_Menu_::size ( ) const

This returns the number of Fl_Menu_Item structures that make up the menu, correctly counting submenus. This includes the "terminator" item at the end. To copy a menu array you need to copy size()*sizeof(Fl_Menu_Item) bytes. If the menu is NULL this returns zero (an empty menu will return 1).

Definition at line 328 of file Fl_Menu_.cxx.

References Fl_Menu_Item::size().

Referenced by clear(), clear_submenu(), find_index(), find_item(), insert(), item_pathname(), Fl_Comment_Type::open(), print_load(), remove(), replace(), Fl_File_Chooser::rescan_keep_filename(), and Fl_Choice::value().

void Fl_Menu_::size ( int  W,
int  H 
) [inline]

Changes the size of the widget.

size(W, H) is a shortcut for resize(x(), y(), W, H).

Parameters:
[in]W,Hnew size
See also:
position(int,int), resize(int,int,int,int)

Reimplemented from Fl_Widget.

Definition at line 106 of file Fl_Menu_.H.

References size.

const Fl_Menu_Item* Fl_Menu_::test_shortcut ( ) [inline]

Returns the menu item with the entered shortcut (key value).

This searches the complete menu() for a shortcut that matches the entered key value. It must be called for a FL_KEYBOARD or FL_SHORTCUT event.

If a match is found, the menu's callback will be called.

Returns:
matched Fl_Menu_Item or NULL.

Reimplemented from Fl_Widget.

Definition at line 84 of file Fl_Menu_.H.

References test_shortcut().

Referenced by Fl_Menu_Button::handle(), Fl_Menu_Bar::handle(), and test_shortcut().

const char* Fl_Menu_::text ( int  i) const [inline]

Returns the title of item i.

Definition at line 133 of file Fl_Menu_.H.

References i, menu_, and Fl_Menu_Item::text.

const char* Fl_Menu_::text ( ) const [inline]
Fl_Color Fl_Menu_::textcolor ( ) const [inline]

Get the current color of menu item labels.

Definition at line 144 of file Fl_Menu_.H.

Referenced by Fl_Menu_Type::copy_properties(), Fl_Menu_Item::draw(), Fl_Choice::draw(), Fl_Menu_(), and Fl_Choice::handle().

void Fl_Menu_::textcolor ( Fl_Color  c) [inline]

Sets the current color of menu item labels.

Definition at line 146 of file Fl_Menu_.H.

Fl_Font Fl_Menu_::textfont ( ) const [inline]
void Fl_Menu_::textfont ( Fl_Font  c) [inline]

Sets the current font of menu item labels.

Definition at line 138 of file Fl_Menu_.H.

void Fl_Menu_::textsize ( Fl_Fontsize  c) [inline]

Sets the font size of menu item labels.

Definition at line 142 of file Fl_Menu_.H.

int Fl_Menu_::value ( int  i) [inline]

The value is the index into menu() of the last item chosen by the user. It is zero initially. You can set it as an integer, or set it with a pointer to a menu item. The set routines return non-zero if the new value is different than the old one.

Reimplemented in Fl_Choice.

Definition at line 129 of file Fl_Menu_.H.

References menu_, and value().

Referenced by value().

int Fl_Menu_::value ( ) const [inline]

Returns the index into menu() of the last item chosen by the user. It is zero initially.

Reimplemented in Fl_Choice.

Definition at line 121 of file Fl_Menu_.H.

References int, and menu_.

Referenced by Fl_Input_Choice_Type::click_test(), Fl_Menu_Type::click_test(), Fl_Comment_Type::open(), and Fl_Choice::value().

int Fl_Menu_::value ( const Fl_Menu_Item m)

The value is the index into menu() of the last item chosen by the user. It is zero initially. You can set it as an integer, or set it with a pointer to a menu item. The set routines return non-zero if the new value is different than the old one.

Reimplemented in Fl_Choice.

Definition at line 250 of file Fl_Menu_.cxx.

References Fl_Widget::clear_changed(), and m.


Member Data Documentation

uchar Fl_Menu_::alloc [protected]

Definition at line 55 of file Fl_Menu_.H.

Referenced by clear(), copy(), Fl_Menu_(), insert(), remove(), and replace().

Definition at line 56 of file Fl_Menu_.H.

Definition at line 59 of file Fl_Menu_.H.

Definition at line 57 of file Fl_Menu_.H.

Definition at line 58 of file Fl_Menu_.H.


The documentation for this class was generated from the following files: