Re: Has anyone used a pop-up menu on a GtkGLArea?
- From: Carlos Pereira <carlos pehoe civil ist utl pt>
- To: gtk-app-devel-list gnome org
- Subject: Re: Has anyone used a pop-up menu on a GtkGLArea?
- Date: Fri, 14 Dec 2001 02:24:18 GMT
I keep getting an invalid cast error ? Do I need to do anything special ?
pop-up menus with GtkGlArea work fine for me (GTK 1.2.x)
see example below,
Carlos
static GtkWidget *static_menu (etc...)
{
GtkWidget *menu, *menu_item;
menu = gtk_menu_new ();
menu_item = gtk_menu_item_new_with_label (string);
gtk_menu_append (GTK_MENU (menu), menu_item);
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
GTK_SIGNAL_FUNC (static_activate), data);
gtk_widget_show (menu_item);
return menu;
}
int press_gl_area (GtkWidget *widget, GdkEventButton *event, gpointer data)
{
GtkWidget *menu;
menu = static_menu (etc...);
gtk_menu_popup ((GtkMenu *) menu, NULL, NULL, NULL, NULL, event->button, event->time);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]