[gtkada] Event handler using Gtk.Widget

Rick Duley rickduley at gmail.com
Sun Jun 21 05:19:54 CEST 2009


Hi folks

I am building a composite wiget as a learning exercise. I declared callback
handlers for each of the active widget types I am using :
   package Window_Callback_Pkg is new
      Gtk.Handlers.Callback (Gtk.Window.Gtk_Window_Record);

   package Image_Menu_Item_Callback_Pkg is new
      Gtk.Handlers.Callback
(Gtk.Image_Menu_Item.Gtk_Image_Menu_Item_Record);

   package Button_Callback_Pkg is new
      Gtk.Handlers.Callback (Gtk.Button.Gtk_Button_Record);

Following communication with folks on the list it has occurred to me that I
need not work so hard. I think I could simply write one instantiation :
   package Widget_Callback_Pkg is new
      Gtk.Handlers.Callback (Gtk.Widget.Gtk_Widget_Record);

which would cover all eventualities. Am I right about this?

Has at least one penny dropped?
-- 
Rick Duley
North Perth,
Western Australia
http://www.freewebs.com/rickduley/
                                    .-_|\
                                   /     \
                             perth *_.-._/
                                        v
aussie :      04...
o'seas :   +61 ...
--------------------------------------------
Committees:
"... dark alley down which ideas are led
                   ... then strangled."
                                  (PepsiCo)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/gtkada/attachments/20090621/53600089/attachment.htm 


More information about the gtkada mailing list