//======================================== // menus.H // // The Menu Bar - GKT+ version // // ZNibbles // Vincent Mallet 1997, 1998, 1999 - vmallet@enst.fr //======================================== // $Id: Menus.H,v 1.4 1999/05/12 01:51:14 vmallet Exp $ /* ZNibbles - a small multiplayer game * Copyright (C) 1997, 1998, 1999 Vincent Mallet - vmallet@enst.fr * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ // @@ Right now this is just a bunch of lines ripped from the // @@ itemfactory.c GTK example and put together back into // @@ a class.. I'll have to make real menus later. #ifndef __H_MENUS__ #define __H_MENUS__ #include class GtkInterface; class Menus { public: Menus(GtkInterface& interface) : menubar(0) { _interface = &interface; } void make(GtkWidget * main_w); GtkWidget * get_widget() { return menubar; } private: static GtkInterface * _interface; static GtkWidget * main_window; // @@ wow ! another ugly hack ! // @@ until I use real menus with // @@ real callbacks GtkWidget * menubar; static GtkItemFactoryEntry menu_items[]; static void menu_callback_static(gpointer data, gpointer action, GtkWidget *w); }; // class Menus #endif // __H_MENUS__