5 #include "bcmenubar.inc"
6 #include "bcmenupopup.inc"
7 #include "bcpixmap.inc"
8 #include "bcpopupmenu.inc"
9 #include "bcwindowbase.inc"
16 BC_MenuItem(char *text
, char *hotkey_text
= "", int hotkey
= 0);
17 virtual ~BC_MenuItem();
19 friend class BC_MenuPopup
;
22 int add_submenu(BC_SubMenu
*submenu
);
23 int set_checked(int value
);
25 void set_text(char *text
);
27 void set_icon(BC_Pixmap
*icon
);
28 BC_Pixmap
* get_icon();
29 void set_hotkey_text(char *text
);
30 int set_shift(int value
= 1);
31 int set_alt(int value
= 1);
33 int deactivate_submenus(BC_MenuPopup
*exclude
);
34 int activate_submenu();
35 virtual int handle_event() { return 0; };
36 int dispatch_button_press();
37 int dispatch_button_release(int &redraw
);
38 int dispatch_motion_event(int &redraw
);
39 int dispatch_translation_event();
40 int dispatch_cursor_leave();
41 int dispatch_key_press();
42 int add_item(BC_MenuItem
*item
);
43 int initialize(BC_WindowBase
*top_level
, BC_MenuBar
*menu_bar
, BC_MenuPopup
*menu_popup
);
45 BC_WindowBase
* get_top_level();
46 BC_PopupMenu
* get_popup_menu();
49 BC_WindowBase
*top_level
;
51 BC_MenuPopup
*menu_popup
;
52 // Submenu if this item owns one.
54 // whether the cursor is over or not
56 // whether the cursor is over and the button is down
64 // Hotkey requires shift
66 // Hotkey requires alt
68 // Character code of hotkey
70 // icon or 0 if there is no icon
72 // y position of this item set during menu activation
74 // height of item is set during menu activation