Re: item factory menu parents



Apparently I've been sending to the wrong list.

Sorry about that.

On Fri, Nov 25, 2011 at 5:58 PM, Steve . <iteration69 gmail com> wrote:
Hello,

I'm trying to get the parent widget of a menu from the callback function of a menu created with item factory macro.

I was under the impression that i could get the parent via  widget->parent But I'm sure i properly understand the menu hierarchy.

I start with a window and then attach a fixed container. Then i create a drawable that is a fraction the size of the fixed container and attach
the drawable to the fixed. I then create a menu and add it to the drawable.

Inside the menu callback i'm trying to get the drawable, which i thought would be the parent.  Ie, widget->parent.  but this is not working. I also tried widget->parent->parent. Right now i'm using a global widget for the drawable because i can't seem to figure out how to access the drawable from the menu item call back-- this a bad hack and i'd like to correct it very soon.

So i have:
window
            fixed
                    drawable
                                   menu
                                            menu items

What is the suggested method of obtaining the drawable from the menu item callback?


Steve


       





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