r717: Made the highlighted text color of the menus WHITE
[cinelerra_cv/mob.git] / guicast / bcpopupmenu.h
blobeb10182f08939a0d594cbb13688ae57d32bb08f2
1 #ifndef BCPOPUPMENU_H
2 #define BCPOPUPMENU_H
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
15 public:
16 BC_PopupMenu(int x,
17 int y,
18 int w,
19 char *text,
20 int use_title = 1,
21 // Data for alternative title images
22 VFrame **data = 0,
23 // Alternative text margin
24 int margin = -1);
25 BC_PopupMenu(int x,
26 int y,
27 char *text,
28 int use_title = 1,
29 // Data for alternative title images
30 VFrame **data = 0);
31 virtual ~BC_PopupMenu();
33 static int calculate_h(VFrame **data = 0);
34 virtual int handle_event() { return 0; };
35 char* get_text();
36 int initialize();
37 int add_item(BC_MenuItem *item);
38 int remove_item(BC_MenuItem *item);
39 int total_items();
40 BC_MenuItem* get_item(int i);
41 // Set title of menu
42 void set_text(char *text);
43 // Set icon of menu. Disables text.
44 void set_icon(BC_Pixmap *pixmap);
45 // Draw title of menu
46 int draw_title();
47 int reposition_window(int x, int y);
48 int deactivate();
49 int activate_menu();
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);
64 private:
65 char text[BCTEXTLEN];
66 int margin;
67 VFrame **data;
68 BC_Pixmap *images[9];
69 BC_Pixmap *icon;
70 int highlighted;
71 int popup_down;
72 int use_title;
73 int button_releases;
74 BC_MenuPopup *menu_popup;
75 // Remember cursor position when no title
76 int button_press_x, button_press_y;
77 int w_argument;
78 int status;
83 #endif