From: Stalkern 2 Reply-To: stalkern2 at tin.it To: lablgtk at kaba.or.jp Subject: Re: About automatic column sorting and right-click detection Date: Fri, 19 Dec 2003 15:50:35 +0100 References: <200312171132.49128.stalkern2 at tin.it> <16352.20548.48550.69416 at akasha.ijm.jussieu.fr> In-Reply-To: <16352.20548.48550.69416 at akasha.ijm.jussieu.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200312191550.35477.stalkern2 at tin.it> Il Wednesday 17 December 2003 13:47, Olivier Andrieu ha scritto: > > 2) How do I recognize a right-clicking on a button or a drawing > > area? I'm getting a bit puzzled by events and signals (and types > > with type variables like GtkSignal.t) > > All event-related methods and signals are in an #event sub-object. So, > with > button#event#connect#button_press callback > you should be able to detect righ-clicks. > > Note that sometimes you have to modify the event mask so that the > events you're interested in are reported : button#event#add . I'm trying to work out right-clicking driven actions on a GTree.view. However, I'd need to set my ideas clearer about these issues: 1_ GTree.tree (and GList.clist, and several classes in GBin) has a #event subobject, but GTree.view has not 2_ If I set a event_box besides setting GTree.view, and I pack GTree.view in it, I "hide" it so the "button pressed" event never reaches it 3_ The example http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch08s07.html#id2879790 suggests wrapping the default handler for GTree.view. I'd love to do so, but where is it? If callbacks where all event-to-unit functions, it'd be so easy to overload them, but when they're unit-to-unit functions, what can be done? 4_ To connect a signal to an object, one can use GtkSignal.connect etc. To create (well, pick in a list) an event, one can use GdkEvent.create. But how do I create a Signal? How do I listen to an event and have it trigger the emission of that signal? Actually, I can not understand whether I can do that with the standard distribution of LablGtk2.2. Everything seems so close... yet so far. T I A for any advice Ernesto