[gtkada] Select_Row signal in Clist
Preben Randhol
randhol at pvv.org
Sun Nov 18 18:54:18 CET 2001
Preben Randhol <randhol at pvv.org> wrote on 18/11/2001 (16:48) :
>
> 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 ?
After two hours testing I got this to work:
-- Connecting the signal to the procedure On_Row_Selected
Widget_Callback.Connect (Gui_List.List_Clist,
"select_row",
Callbacks.On_Row_Selected'Access);
-- The procedure On_Row_Selected
use Gtk.Arguments;
procedure On_Row_Selected
(Object : access Gtk_Widget_Record'Class;
Params : Gtk.Arguments.Gtk_Args ) is
Row : Gint := To_Gint (Params, 1);
Column : Gint := To_Gint (Params, 2);
Event : Gdk_Event := To_Event (Params, 3);
begin
-- Testing to see if this works or not.
Put_Line ("Row,Cell :" & Integer'Image (Integer (Row)) & "," &
Integer'Image (Integer (Column)));
end On_Row_Selected;
This is not using To_Marshaller, but I understood that this is safer?
How can one do it with To_Marshaller or is this the only way?
Thanks in advance.
Preben
--
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
«For me, Ada95 puts back the joy in programming.»
More information about the gtkada
mailing list