refresh frame fix, dblclk proxy viewer fix, vicon refresh fix for awdw resize, fix...
[goodguy/history.git] / cinelerra-5.1 / guicast / bcmenubar.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef BCMENUBAR_H
23 #define BCMENUBAR_H
24
25 #include "bcmenu.inc"
26 #include "bcmenubar.inc"
27 #include "bcpixmap.inc"
28 #include "bcsubwindow.h"
29
30 class BC_MenuBar : public BC_SubWindow
31 {
32 public:
33         BC_MenuBar(int x, int y, int w);
34         virtual ~BC_MenuBar();
35
36         friend class BC_Menu;
37
38         int add_menu(BC_Menu* menu);
39         static int calculate_height(BC_WindowBase *window);
40
41         int initialize();
42         int focus_out_event();
43         int keypress_event();
44         int button_press_event();
45         int button_release_event();
46         int cursor_motion_event();
47         int cursor_enter_event();
48         int cursor_leave_event();
49         int resize_event(int w, int h);
50         int translation_event();
51         int deactivate();
52         int unhighlight();
53 // Redraws items in active menu
54         void draw_items();
55
56 private:
57         int draw_face(int flash, int flush);
58         int activate();
59 // Array of menu titles
60         ArrayList<BC_Menu*> menu_titles;
61 // number of button releases since activation
62         int button_releases;
63 // When a menu is pulled down
64         int active;
65         BC_Pixmap *menu_bar_bg;
66         BC_Pixmap *menu_title_bg[3];
67 };
68
69
70
71
72
73 #endif