First checkin, AXE release 0.2
[AXE.git] / doc / menu_item.html
1 <html>
2 <head>
3 <title>menu_item - ANDROMEDA X-windows Encapsulation</title>
4 </head>
5 <body bgcolor=white>
6
7 <h1>class menu_item</h1>
8 <hr>
9
10 <h2> NAME</h2>
11 menu_item - Base class for items in a menu container
12 <h2> SYNOPSIS</h2>
13 #include "menu.h"
14 <p>
15 class menu_item : public window
16
17 <h2> DESCRIPTION</h2>
18
19 A <strong>menu_container</strong> is a window that contains subwindows in the
20 form of <strong>menu_item</strong> objects.
21 It is the job of the <strong>menu_container</strong> to line-up its menu items.
22 The menu items handle all action in the menu system.
23 A <strong>menu_item</strong> reacts when it is entered by the pointer by
24 highlighting itself, usually changing the background color.
25 When the pointer leaves a <strong>menu_item</strong>, the highlight
26 vanishes and the <strong>menu_item</strong> returns to its original state.
27
28 <p>
29
30 A <strong>menu_item</strong> may relate to an other
31 <strong>menu_container</strong> in the form of a <strong>popup_menu</strong>.
32 The <strong>popup_menu</strong> is not a child window of the
33 <strong>menu_item</strong> but is an independent window; an unmanaged
34 direct child of the root window.
35 The popup menu pops up, i.e. becomes visible when the pointer enters
36 the menu item.
37 Once a popup menu is visible, it stays visible until the pointer enters another
38 menu item in the same menu container or when a mouse button is clicked.
39 So when a menu item is highlighted, it tells its sibling menu items
40 to remove their popup menus.
41 Removing a submenu means the menu items in the submenu must also remove
42 their submenus recursively.
43
44 <p>
45
46 The third action of a <strong>menu_item</strong> when the pointer enters
47 its window, is grabbing the pointer.
48 This prevents windows which are not part of the menu system from reacting
49 to the mouse buttons.
50 The menu system remains active until the button is clicked.
51 After the mouse button is released, all popup menus are removed and the
52 pointer grab is cancelled.
53
54 <p>
55
56 The pointer grab may be released inside a menu item or outside a menu item.
57 Only when the button click happens inside a menu item that does not
58 have a popup menu will the menu item send a comamnd back to the application.
59
60 <table>
61 <tr><th colspan=2>Member functions</th></tr>
62
63 <tr>
64    <td width=150><a href="menu_item_menu_item.html">menu_item</a></td>
65    <td>menu_item contructors and destructors</td>
66 <tr> 
67    <td width=150><a href="menu_item_HideSubmenu.html">HideSubmenu</a></td>
68    <td>Hide the submenus related to this item
69 <tr>
70    <td width=150><a href="menu_item_ShowSubmenu.html">ShowSubmenu</a>
71    <td>Show the submenu related to this item
72 <tr>
73    <td width=150><a href="menu_item_Popup.html">Popup</a>
74    <td>Relate the item to a submenu
75 <tr>
76    <td width=150><a href="menu_item_Enable.html">Enable</a>
77    <td>Enable or disable a menu item
78 </table>
79
80 <h2> SEE ALSO</h2>
81 <h2> DIAGNOSTICS</h2>
82
83 </body>
84 </html>