r136: This commit was manufactured by cvs2svn to create tag 'hv_1_1_8'.
[cinelerra_cv/ct.git] / hvirtual / guicast / bcpopupmenu.h
blob714245c438dbae4a019dddaa3601e0e14d6da02e
1 #ifndef BCPOPUPMENU_H
2 #define BCPOPUPMENU_H
4 #include "bcmenubar.inc"
5 #include "bcmenuitem.inc"
6 #include "bcsubwindow.h"
9 // A menu that pops up in the middle of a window or under a button.
13 class BC_PopupMenu : public BC_SubWindow
15 public:
16 BC_PopupMenu(int x,
17 int y,
18 int w,
19 char *text,
20 int use_title = 1);
21 virtual ~BC_PopupMenu();
23 virtual int handle_event() { return 0; };
24 char* get_text();
25 int initialize();
26 int add_item(BC_MenuItem *item);
27 int remove_item(BC_MenuItem *item);
28 int total_items();
29 BC_MenuItem* get_item(int i);
30 // Set title of menu
31 void set_text(char *text);
32 // Set icon of menu. Disables text.
33 void set_icon(BC_Pixmap *pixmap);
34 // Draw title of menu
35 int draw_title();
36 int deactivate();
37 int activate_menu();
38 int deactivate_menu();
39 int focus_out_event();
40 int repeat_event(int64_t duration);
41 int button_press_event();
42 int button_release_event();
43 int cursor_leave_event();
44 int cursor_enter_event();
45 int cursor_motion_event();
46 int translation_event();
47 int drag_start_event();
48 int drag_stop_event();
49 int drag_motion_event();
50 int set_images(VFrame **data);
52 private:
53 char text[BCTEXTLEN];
54 BC_Pixmap *images[9];
55 BC_Pixmap *icon;
56 int highlighted;
57 int popup_down;
58 int use_title;
59 int button_releases;
60 BC_MenuPopup *menu_popup;
61 // Remember cursor position when no title
62 int button_press_x, button_press_y;
63 int status;
68 #endif