- (t (call-next-method))))
-
-
-(defun child-slot-value (widget slot)
- (slot-value (widget-child-slots widget) slot))
-
-(defun (setf child-slot-value) (value widget slot)
- (setf (slot-value (widget-child-slots widget) slot) value))
-
-(defmacro with-child-slots (slots widget &body body)
- `(with-slots ,slots (widget-child-slots ,widget)
+ ((call-next-method))))
+
+
+(defmethod compute-signal-function ((widget widget) signal function object)
+ (if (eq object :parent)
+ #'(lambda (&rest args)
+ (if (slot-boundp widget 'parent)
+ (apply function (widget-parent widget) (rest args))
+ ;; Delay until parent is set
+ (signal-connect widget 'parent-set
+ #'(lambda (old-parent)
+ (declare (ignore old-parent))
+ (let ((*signal-stop-emission*
+ #'(lambda ()
+ (warn "Ignoring emission stop in delayed signal handler"))))
+ (apply function (widget-parent widget) (rest args))))
+ :remove t)
+; (warn "Widget has no parent -- ignoring signal")
+ ))
+ (call-next-method)))
+
+(defun child-property-value (widget slot)
+ (slot-value (widget-child-properties widget) slot))
+
+(defun (setf child-property-value) (value widget slot)
+ (setf (slot-value (widget-child-properties widget) slot) value))
+
+(defmacro with-child-properties (slots widget &body body)
+ `(with-slots ,slots (widget-child-properties ,widget)