[cells-gtk-devel] tree-view children
Peter Denno
peter.denno at nist.gov
Wed Feb 2 17:40:25 UTC 2005
Hi,
Does anyone here know how the tree-view widget in the example
test-gtk/test-tree-view.lisp gets its children? I'd expect that you'd have to
supply it with a function which takes an element of the tree and returns a
list of its children. By the name of it, :items-factory seems to fit that
description, but apparently it only provides the printed representation.
:items (c? (list (upper self gtk-app)))
:items-factory #'(lambda (item)
(list
(format nil "~a" (class-name (class-of item)))
(case (class-name (class-of item))
(gtk-app "home")
(vbox "open")
(hbox "open")
(window "index")
(t "jump-to"))
(length (kids item))
(format nil "~a"
(when (subtypep (class-name (class-of item))
'cells-gtk::gtk-object)
(cells-gtk::id item)))))
--
Best Regards,
- Peter
Peter Denno
National Institute of Standards and Technology,
Manufacturing System Integration Division,
100 Bureau Drive, Mail Stop 8264 Tel: +1 301-975-3595
Gaithersburg, MD, USA 20899-8264 FAX: +1 301-975-4694
More information about the cells-gtk-devel
mailing list