r1024: Add optional graduations to waveform.
[cinelerra_cv.git] / guicast / bcmenu.h
blob9b0ed074208a94d3766ac31da75faeddc1e1d5f7
1 #ifndef BCMENU_H
2 #define BCMENU_H
7 #include "bcmenubar.inc"
8 #include "bcmenuitem.inc"
9 #include "bcmenupopup.inc"
10 #include "bcwindowbase.inc"
13 // Subscripts for menu images
14 #define MENU_BG 0
15 #define MENU_ITEM_UP 1
16 #define MENU_ITEM_HI 1
17 #define MENU_ITEM_DN 1
21 class BC_Menu
23 public:
24 BC_Menu(char *text);
25 virtual ~BC_Menu();
27 friend class BC_MenuBar;
29 // Called by user to add items
30 int add_item(BC_MenuItem* menuitem);
31 // Remove the item ptr and the object
32 int remove_item(BC_MenuItem* item = 0);
33 int total_menuitems();
34 int set_text(char *text);
36 // Called by BC_Menubar
37 int initialize(BC_WindowBase *top_level, BC_MenuBar *menu_bar, int x, int y, int w, int h);
38 int dispatch_button_press();
39 int dispatch_button_release();
40 int dispatch_keypress();
41 int dispatch_motion_event();
42 int dispatch_cursor_leave();
43 int dispatch_translation_event();
44 int deactivate_menu();
45 int activate_menu();
46 int unhighlight();
47 void draw_items();
49 private:
50 int draw_title();
51 // If this menu is pulled down
52 int active;
53 char text[1024];
54 BC_WindowBase *top_level;
55 // Owner menubar if there is one
56 BC_MenuBar *menu_bar;
57 // Client popup
58 BC_MenuPopup *menu_popup;
59 int highlighted;
60 // Dimensions relative to menubar.
61 int x, y, w, h;
66 #endif