4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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
28 #include "bcmenubar.inc"
29 #include "bcmenuitem.inc"
30 #include "bcmenupopup.inc"
31 #include "bcwindowbase.inc"
34 // Subscripts for menu images
36 #define MENU_ITEM_UP 1
37 #define MENU_ITEM_HI 1
38 #define MENU_ITEM_DN 1
45 BC_Menu(const char *text);
48 friend class BC_MenuBar;
50 // Called by user to add items
51 int add_item(BC_MenuItem* menuitem);
52 // Remove the item ptr and the object
53 int del_item(BC_MenuItem* item=0);
55 int set_text(char *text);
57 // Called by BC_Menubar
58 int initialize(BC_WindowBase *top_level, BC_MenuBar *menu_bar, int x, int y, int w, int h);
59 int dispatch_button_press();
60 int dispatch_button_release();
61 int dispatch_keypress();
62 int dispatch_motion_event();
63 int dispatch_cursor_leave();
64 int dispatch_translation_event();
65 int deactivate_menu();
71 int draw_title(int flash, int flush);
72 // If this menu is pulled down
75 BC_WindowBase *top_level;
76 // Owner menubar if there is one
79 BC_MenuPopup *menu_popup;
81 // Dimensions relative to menubar.