[gtkada] Select_Row signal in Clist

Emmanuel Briot briot at ACT-Europe.FR
Tue Nov 20 11:13:17 CET 2001


Preben Randhol <randhol at pvv.org> writes:

> This works and is OK. The problem is when I now want to catch the signal
> select_row in a clist. This is described in the documentation as:
> 
>      * "select_row"
> 
>      procedure Handler (Clist  : access Gtk_Clist_Record'Class;
>      Row    : Gint;
>      Column : Gint;
>      Event  : Gdk.Event.Gdk_Event);
>      Emitted when a row is selected. Column contains the column number
>      in which the user has clicked, or -1 if the selection was done
>      internally by GtkAda.  Event will be null if the selection was not
>      triggered by an event, eg if the row was selected through a call
>      to Select_Row.
> 
> How do I make To_Marshaller work with this so I get the Row, Column and
> Event data in my On_Row_Selected callback procedure ?


There is no To_Marshaller provided for this particular profile, and thus you
indeed have to use the general form of the callbacks (that gets an array of
arguments, and where you need to extract them yourself with the functions in
Gtk.Arguments).

Note that a Marshaller is basically simply a function that splits this array
into a number of separate parameters and then call your callback, so there is
no difference in safety.

We'll enhance the GtkAda user's guide to add a little bit more information
about this, since indeed it is lacking...

thanks
Emmanuel




More information about the gtkada mailing list