Re: gtk_menu_popup () and GtkMenuPositionFunc ()



Scratch that, After taking a couple min break and re-RTFM'n I noticed I had a bug the size of a train.
Working with no problems now.

On Mon, Nov 21, 2011 at 3:53 AM, Steve . <iteration69 gmail com> wrote:
I'm having trouble manually positioning a popup menu.

Looking at the prototype of gtk_menu_popup ():
http://developer.gnome.org/gtk/2.24/GtkMenu.html#gtk-menu-popup
And here is GtkMenuPositionFunc ():
http://developer.gnome.org/gtk/2.24/GtkMenu.html#GtkMenuPositionFunc

I see there  is a position function (arg4 of gtk_menu_popup) and data to be passed to the position function (arg5 of gtk_menu_popup)
I cant seem to get the menu to position using a function, so then i tried to manually place the menu by modifying the event data, and this still did not work. The only example i found on this matter was in Syd logons book, but it did not help.

My last resort was to try this;
gtk_menu_popup(GTK_MENU(callback_data),NULL,NULL,NULL,NULL,NULL,NULL); 

Somehow gtk_menu_popup is fetching the cursor position,  internal access i suppose.

Obviously I don't understand how the menu is suppose to be positioned and i'm having a difficult time finding information.

Any help would be greatly appreciated.

Steve



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]