Next: Menu Remarks, Previous: Other Menu Routines, Up: Menu Object [Contents][Index]
Any boxtype can be used for a menu except for those of type
FL_PULLDOWN_MENU
, for which FL_NO_BOX
should not be
used.
Using the functiond
The first color argument (col1
) to
fl_set_object_color()
controls the color of the menu’s
box when not open and the second (col2
) is the color when the
menu is shown.
To change the font style and size used in the popup menus (not the menu label), use the following routines
void fl_setpup_default_fontstyle(int style); void fl_setpup_default_fontsize(int size);
These settings apply to all menus at once.
If desired, you can attach an external popup to a menu object via the following routine
void fl_set_menu_popup(FL_OBJECT *obj, int pupID);
where pupID
is the ID returned by fl_newpup()
or
fl_defpup()
. See XPopup, for more details on popup
creation.
For a menu created this way only fl_get_menu()
and
fl_get_menu_text()
work as expected. Other services such as
mode setting and query etc. should be done via the popup routines.
To obtain the popup ID associated with a menu, use the following routine
int fl_get_menu_popup(FL_OBJECT *obj);
The function returns the popup ID if the menu was created using
fl_set_menu_popup()
or
fl_set_menu_entries()
, otherwise it returns -1.
The callback associated with a menu
Normally in the popup opened for a menu a title is shown. This can be switched off (and back on again by using the function
fl_set_menu_notitle(FL_OBJECT *obj, int off);
Next: Menu Remarks, Previous: Other Menu Routines, Up: Menu Object [Contents][Index]