8 #include "bcmenubar.inc"
9 #include "bcmenuitem.inc"
10 #include "bcpopup.inc"
11 #include "bcpopupmenu.inc"
12 #include "bcwindowbase.inc"
15 // A window that contains a menu.
22 virtual ~BC_MenuPopup();
24 friend class BC_MenuItem
;
25 friend class BC_PopupMenu
;
27 int initialize(BC_WindowBase
*top_level
,
30 BC_MenuItem
*menu_item
,
31 BC_PopupMenu
*popup_menu
);
32 int add_item(BC_MenuItem
*item
);
33 int remove_item(BC_MenuItem
* item
= 0);
34 int total_menuitems();
36 // Deactivates all submenus in a downward progression except for the exclude
37 int deactivate_submenus(BC_MenuPopup
*exclude
= 0);
38 int dispatch_button_press();
39 int dispatch_button_release();
40 int dispatch_key_press();
41 int dispatch_motion_event();
42 int dispatch_cursor_leave();
43 int dispatch_translation_event();
44 int deactivate_menu();
45 int activate_menu(int x
, int y
, int w
, int h
, int top_window_coords
, int vertical_justify
);
49 BC_Popup
* get_popup();
54 ArrayList
<BC_MenuItem
*> menu_items
;
55 BC_WindowBase
*top_level
;
56 BC_MenuItem
*menu_item
;
58 BC_PopupMenu
*popup_menu
;
60 // Dimensions relative to root window
62 // Horizontal position of hotkey text
64 // Popup window that only exists when menu is down.
68 // Images for backgrounds
70 BC_Pixmap
*item_bg
[3];
73 class BC_SubMenu
: public BC_MenuPopup
77 virtual ~BC_SubMenu();
79 int add_submenuitem(BC_MenuItem
*item
);