[gtkada] Select_Row signal in Clist

Preben Randhol randhol at pvv.org
Sun Nov 18 17:45:29 CET 2001


Hi

I have a bit problem understanding how signals work in GtkAda. I usually
connect my buttons like this:

   Button_Callback.Connect (Gui_List.Close_Button, "clicked", 
      Button_Callback.To_Marshaller (Callbacks.On_Close_Clicked'Access));

I have done in a callbacks package for the program:

   package Button_Callback is new
         Gtk.Handlers.Callback (Gtk_Button_Record);

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 ?

Thanks in advance.

Preben
-- 
«Don't use C;  In my opinion,  C is a library programming language
 not an app programming language.»  - Owen Taylor (GTK+ developer)

Use Ada 95, a free language. More info at http://www.adapower.com/




More information about the gtkada mailing list