2006-10-29 17:16:03 +03:00
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
|
|
|
<TITLE>Fl_Menu_Bar</TITLE>
|
|
|
|
</HEAD>
|
|
|
|
<BODY>
|
2001-11-28 21:00:17 +03:00
|
|
|
<!-- NEW PAGE -->
|
1999-01-13 22:28:54 +03:00
|
|
|
<H2><A name=Fl_Menu_Bar>class Fl_Menu_Bar</A></H2>
|
|
|
|
<HR>
|
|
|
|
<H3>Class Hierarchy</H3>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
|
|
|
<A href=Fl_Menu_.html#Fl_Menu_>Fl_Menu_</A>
|
1998-12-29 17:21:17 +03:00
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
+----<B>Fl_Menu_Bar</B>
|
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H3>Include Files</H3>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
|
|
|
#include <FL/Fl_Menu_Bar.H>
|
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H3>Description</H3>
|
2001-11-29 22:24:00 +03:00
|
|
|
This widget provides a standard menubar interface. Usually you will
|
|
|
|
put this widget along the top edge of your window. The height of the
|
|
|
|
widget should be 30 for the menu titles to draw correctly with the
|
|
|
|
default font.
|
|
|
|
<P>The items on the bar and the menus they bring up are defined by a
|
1999-01-13 22:28:54 +03:00
|
|
|
single <A href=Fl_Menu_Item.html#Fl_Menu_Item><TT>Fl_Menu_Item</TT></A>
|
2001-11-29 22:24:00 +03:00
|
|
|
array. Because a <TT>Fl_Menu_Item</TT> array defines a hierarchy, the
|
|
|
|
top level menu defines the items in the menubar, while the submenus
|
|
|
|
define the pull-down menus. Sub-sub menus and lower pop up to the right
|
1999-01-13 22:28:54 +03:00
|
|
|
of the submenus. </P>
|
2001-05-06 20:25:05 +04:00
|
|
|
<P ALIGN=CENTER><IMG src="menubar.gif" ALT="Fl_Menu_Bar widget."></P>
|
2001-11-29 22:24:00 +03:00
|
|
|
<P>If there is an item in the top menu that is not a title of a
|
|
|
|
submenu, then it acts like a "button" in the menubar. Clicking on it
|
1999-01-13 22:28:54 +03:00
|
|
|
will pick it. </P>
|
2001-11-29 22:24:00 +03:00
|
|
|
<P>When the user picks an item off the menu, the item's callback is
|
|
|
|
done with the menubar as the <TT>Fl_Widget*</TT> argument. If the item
|
1999-01-13 22:28:54 +03:00
|
|
|
does not have a callback the menubar's callback is done instead. </P>
|
2001-11-29 22:24:00 +03:00
|
|
|
<P>Submenus will also pop up in response to shortcuts indicated by
|
|
|
|
putting a '&' character in the name field of the menu item. If you put a
|
|
|
|
'&' character in a top-level "button" then the shortcut picks it. The
|
1999-01-27 11:45:11 +03:00
|
|
|
'&' character in submenus is ignored until the menu is popped up. </P>
|
2001-11-29 22:24:00 +03:00
|
|
|
<P>Typing the <TT>shortcut()</TT> of any of the menu items will cause
|
1999-01-13 22:28:54 +03:00
|
|
|
callbacks exactly the same as when you pick the item with the mouse. </P>
|
|
|
|
<H3>Methods</H3>
|
|
|
|
<UL>
|
|
|
|
<LI><A href=#Fl_Menu_Bar.Fl_Menu_Bar>Fl_Menu_Bar</A></LI>
|
|
|
|
<LI><A href=#Fl_Menu_Bar.~Fl_Menu_Bar>~Fl_Menu_Bar</A></LI>
|
|
|
|
</UL>
|
2001-11-29 22:24:00 +03:00
|
|
|
<H4><A name=Fl_Menu_Bar.Fl_Menu_Bar>Fl_Menu_Bar::Fl_Menu_Bar(int x, int
|
1999-01-13 22:28:54 +03:00
|
|
|
y, int w, int h, const char *label = 0)</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
Creates a new <TT>Fl_Menu_Bar</TT> widget using the given position,
|
|
|
|
size, and label string. The default boxtype is <TT>FL_UP_BOX</TT>.
|
1999-01-13 22:28:54 +03:00
|
|
|
<P>The constructor sets <TT>menu()</TT> to <TT>NULL</TT>. See <A href=Fl_Menu_.html#Fl_Menu_>
|
|
|
|
<TT>Fl_Menu_</TT></A> for the methods to set or change the menu. </P>
|
|
|
|
<P><TT>labelsize()</TT>, <TT>labelfont()</TT>, and <TT>labelcolor()</TT>
|
2001-11-29 22:24:00 +03:00
|
|
|
are used to control how the menubar items are drawn. They are
|
|
|
|
initialized from the <TT>Fl_Menu</TT> static variables, but you can
|
1999-01-13 22:28:54 +03:00
|
|
|
change them if desired. </P>
|
2001-11-29 22:24:00 +03:00
|
|
|
<P><TT>label()</TT> is ignored unless you change <TT>align()</TT> to
|
1999-01-13 22:28:54 +03:00
|
|
|
put it outside the menubar. </P>
|
|
|
|
<H4><A name=Fl_Menu_Bar.~Fl_Menu_Bar>virtual Fl_Menu_Bar::~Fl_Menu_Bar()</A>
|
|
|
|
</H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
The destructor removes the <TT>Fl_Menu_Bar</TT> widget and all of its
|
1999-01-15 01:14:01 +03:00
|
|
|
menu items. </BODY></HTML>
|