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