UCW

Components 

Login Component 

(defgeneric check-credentials (login)
  (:documentation "Returns T if LOGIN is valid."))
(defaction login-successful ((l login))
  (answer t))
(defaction try-login ((l login))
  (if (check-credentials l)
      (login-successful l)
      (setf (login.message l) "Bad username/password.")))

Error Message 

Error Component (Error with Backtrace) 

Message Dialog Component 

Generic Query/Option dialog 

(defaction respond ((dialog option-dialog) value)
  (if (confirm dialog)
      (if (call 'option-dialog
                :message (format nil "Are you sure you want to answer ~S to the question ~S?"
                                 (cdr (assoc value (options dialog)))
                                 (message dialog))
                :options '((t . "Yes")
                           (nil . "No")))
          (answer value)
          ;; repeat the question
          nil)
      (answer value)))

Range View 

(defgeneric render-range-view-item (response range-view item)
  (:documentation "Render a single element of a range-view.")
  (:method ((response response) (range-view range-view) (item t))
    "Standard implementaion of RENDER-RANGE-VIEW-ITEM. Simply
applies ITEM to princ (via <:as-html)."
    (declare (ignore response range-view))
    (<:as-html item)))
(defaction scroll-start ((range range-view))
  (setf (range-view.offset range) 0))
(defaction scroll-end ((range range-view))
  (setf (range-view.offset range) (1- (length (range-view.windows range)))))
(defaction scroll-forward ((view range-view) &optional (n 1))
  (with-slots (offset windows)
      view
    (incf offset n)
    (when (<= (length windows) offset)
      (scroll-end view))))
(defaction scroll-backward ((range range-view) &optional (n 1))
  (with-slots (offset)
      range
    (decf offset n)
    (when (minusp offset)
      (setf offset 0))))
(defaction scroll-to-page ((range range-view) window-number)
  (setf (range-view.offset range) window-number))

Redirect 

Tabbed Pane 

Task 

(defgeneric/cc start (task)
  (:documentation "action which gets called automatically when
task-component is active. Use defaction to define your own
\"start\" action"))

UCW Inspector 

(defaction call-action ((inspector ucw-inspector) action)
  "Call an inspector action."
  (funcall action))
(defaction call-inspector ((component component) datum)
  "Call an inspector for DATUM on the component COMPONENT."
  (call 'ucw-inspector :datum datum))