[comp.windows.x] Attaching a widget to a non-widget window

evgabb@sdrc.UUCP (rob gabbard) (04/20/89)

I want to popup a menu upon receiving a button press inside a regular
X window (XCreateWindow). However the menu is implemented via a 
PopupShell Widget and it needs another widget as its parent. What's the
best way to do this ?


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rob Gabbard (uunet!sdrc!crgabb)                 _    /|
Workstation Systems Programmer                  \'o.O'
Structural Dynamics Research Corporation        =(___)=   
                                                   U
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (04/21/89)

> I want to popup a menu upon receiving a button press inside a regular
> X window (XCreateWindow). However the menu is implemented via a 
> PopupShell Widget and it needs another widget as its parent. What's the
> best way to do this ?

You can't or it is at least very difficult.

Instead of just using a window, use a core widget, which is essentially 
a window with the basic toolkit widget wrapper around it.  You will need
to have all of you windows represented as widgets anyway in order to 
get the toolkit to process your events.

                                                Chris D. Peterson
                                                MIT X Consortium