Re: popping up a menu from a bonobo object



On Mon, 2002-03-25 at 17:02, Michael Meeks wrote:
> Hi Jaca,
Hi Mikhael ;)

> 	I still don't quite understand what you want to do; but it is quite
> possible to share the Control side popup UIContainer for your own ends
> via bonobo_control_get_popup_ui_container. But again, if you're going to
> do something extremely whacked out with this you're creating a tight
> contract that no-one else will know about.
Let me illustrate this on the GGV example...

You have the following objects:

GgvPostscriptView, which is basically a GtkGS widget in a BonoboObject
with a PersistFile, PersistStream and an ItemContainer interface. It
merges its user interface from an XML file. This includes a popup menu
with page navigation items. The GtkGS widget catches button-press events
on its window and would like to display the popup menu from the XML file
(this is the part I'm having trouble with...) when mouse button is
pressed.

GgvControl which is a BonoboControl with a Zoomable interface, wrapped
aroung a GgvPostscriptView in a GtkScrolledWindow. The GtkScrolledWindow
is the control's root widget. The control attempts to merge its user
interface from another XML file that adds zoom items to the very same
popup menu that is used by the GgvPostscriptView. When the control is
activated, it sets the remote UIContainer to its (and
GgvPostScriptView's) UIComponent, merging their UIs.

And finally, there is the GGV shell which acquires a reference to a
GgvControl, embedds it in a BonoboControlFrame in a BonoboWindow and
activates it. This, I suppose, is when the GgvControl's UI (and in turn
GgvPostscriptView's) is merged with that of the shell. The shell, of
course, adds some more items, namely the ones for configuring the shell,
to, yet again, the same popup menu as GgvControl and GgvPostScriptView.

I hope the explanation was clear enough; the part I'm having trouble
with is popping up the menu from the GgvPostScriptView's level.

regards,
	jaKa

-- 

email: jaka gnu org
w3:    http://pluton.ijs.si/~jaka




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