chiark / gitweb /
New method CREATE-CALLBACK-FUNCTION
[clg] / gtk / gtkcontainer.lisp
index a6981c692257dc313c6d7e44e173f39533e0ee16..6729eb397973606976efb23159a4ac81860a9d33 100644 (file)
@@ -15,7 +15,7 @@
 ;; License along with this library; if not, write to the Free Software
 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-;; $Id: gtkcontainer.lisp,v 1.15 2004-12-29 21:14:23 espen Exp $
+;; $Id: gtkcontainer.lisp,v 1.16 2005-01-06 21:00:53 espen Exp $
 
 (in-package "GTK")
 
@@ -30,6 +30,15 @@ (defmethod shared-initialize ((container container) names &rest initargs
    initargs :child :children))
 
 
+(defmethod create-callback-function ((container container) function arg1)
+  (if (eq arg1 :children)
+      #'(lambda (&rest args)
+         (mapc #'(lambda (child)
+                   (apply function child (rest args)))
+               (container-children container)))
+    (call-next-method)))
+
+
 (defbinding %container-add () nil
   (container container)
   (widget widget))