- (cond
- ((consp parent)
- (with-slots ((container parent) child-slots) widget
- (setf
- container (car parent)
- child-slots
- (apply
- #'make-instance
- (slot-value (class-of container) 'child-class)
- :parent container :child widget (cdr parent)))))
- (parent
- (setf (slot-value widget 'parent) parent))))
+ (when parent
+ (let ((parent-widget (first (mklist parent)))
+ (args (rest (mklist parent))))
+ (apply #'container-add parent-widget widget args))))
+
+(defmethod initialize-instance :after ((widget widget) &rest initargs
+ &key show-all)
+ (declare (ignore initargs))
+ (when show-all
+ (widget-show-all widget)))