[gtkmm] gtkmm-2.0 and Plug/Socket



Hello,

I am trying to write a ROX-Plugin using gtkmm-2.0 and run into the following problems:

I use a class derived from Gtk::Plug, constructor looks like this:

Applet::Applet(	GdkNativeWindow socket_id ) 
	: Gtk::Plug( socket_id ) { ... }

Now  I want to get a property from the corresponding Gtk::Socket ( in this case the ROX_Panel and the property "_ROX_PANEL_MENU_POS" ), because I need it to calculate the position of my widget's menu. 

My questions:

a) with pygtk and Python getting that property looks something like

class Applet( gtk.Plug ):
	def __init__(self, xid):
		self.socket = gtk.gdk.window_foreign_new(xid)
		pos = self.socket.property_get('_ROX_PANEL_MENU_POS',
			'STRING', gtk.FALSE)
	( ... )

how to do it in gtkmm-2.0?

b) for the menu's popup function 
( void popup ( const SlotPositionCalc& position_calc_slot, guint button, 	guint32 activate_time ) )
I need to know the height of the menu, but the menu's Gdk::Window only knows it after it has been shown once. Or is there an other way to do it?

Thanks,
Lars

btw.: Can I create/delete directories with Glib::Dir API ?
--
dOOOmed, dooomed



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