4 #include "bcmenubar.inc"
5 #include "bcmenuitem.inc"
6 #include "bcmenupopup.inc"
7 #include "bcsubwindow.h"
10 // A menu that pops up in the middle of a window or under a button.
14 class BC_PopupMenu
: public BC_SubWindow
22 // Data for alternative title images
24 // Alternative text margin
30 // Data for alternative title images
32 virtual ~BC_PopupMenu();
34 static int calculate_h(VFrame
**data
= 0);
35 virtual int handle_event() { return 0; };
38 int add_item(BC_MenuItem
*item
);
39 int remove_item(BC_MenuItem
*item
);
41 BC_MenuItem
* get_item(int i
);
43 void set_text(char *text
);
44 // Set icon of menu. Disables text.
45 void set_icon(BC_Pixmap
*pixmap
);
48 int reposition_window(int x
, int y
);
51 int deactivate_menu();
52 int focus_out_event();
53 int repeat_event(int64_t duration
);
54 int button_press_event();
55 int button_release_event();
56 int cursor_leave_event();
57 int cursor_enter_event();
58 int cursor_motion_event();
59 int translation_event();
60 int drag_start_event();
61 int drag_stop_event();
62 int drag_motion_event();
63 int set_images(VFrame
**data
);
75 BC_MenuPopup
*menu_popup
;
76 // Remember cursor position when no title
77 int button_press_x
, button_press_y
;