Re: I want popup menus :(

On Jul 19, 2004, at 7:29 AM, ArtÅras Ålajus wrote:

Torsten Schoenfeld wrote:

Why do you put user_selected() in the user data slot of popup()? It would only be used if you provided a positioning callback.
what's a positioning callback? =]

just what it says, a callback that the system uses to determine where to place the menu.

a typical use for this is to make sure the menu is on the screen, or pop the menu off the edge of a button regardless of where you clicked (e.g. the gnome foot menu or the gimp arrow-button menu). i use this in the example to place menu over the "button" graphic such that the currently selected item is centered.

if you don't provide a positioning callback, the upper left corner of the menu appears at the location of the mouse.

"it's hard to be eventful when you have this much style."
   - me, rationalizing yet another night of sitting at home.

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