home *** CD-ROM | disk | FTP | other *** search
- (in-package :oou)
- (oou-provide :frame-3D-svm)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; frame-3D-svm.Lisp
- ;;
- ;; Copyright ⌐ 1991 Northwestern University Institute for the Learning Sciences
- ;; All Rights Reserved
- ;;
- ;; author: Michael S. Engber
- ;;
- ;; Simple view mixin for 3D framing the view.
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- (oou-dependencies
- :frame-svm
- :QuickDraw-u)
-
- (export '(frame-3D-svm))
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- (defclass frame-3D-svm (frame-svm)
- ((shadow-position :initarg :shadow-position))
- (:default-initargs
- :frame-width 2
- :shadow-position :botRight))
-
- (defmethod draw-frame ((sv frame-3D-svm) rect)
- ;;Frames a view with a 3D looking frame.
- ;;Note: this effect only looks right over grayish backgrounds.
- (with-back-color (getf (part-color-list sv) :frame-lite *white-color*)
- (frame-rect-3D rect (frame-width sv) (slot-value sv 'shadow-position))))
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- #|
-
- ;;; a modest example - adding a frame to static text dialog items
-
- (defclass sttxt-3D (static-text-dialog-item frame-3D-svm) ())
-
- (progn
- (setf *test-w*
- (make-instance 'dialog
- :window-type :document
- :view-position :centered
- :view-size #@(200 100)
- :window-title "3D frame demo"
- ))
- (with-focused-view *test-w* (#_BackPat *gray-pattern*))
- (invalidate-view *test-w* t)
- (add-subviews *test-w* (make-dialog-item 'sttxt-3D
- #@(20 20)
- #@(163 18)
- "I'm static text + a mixin"
- #'(lambda (item) (declare (ignore item)) (ed-beep))
-
- :view-nick-name :butt
- )))
-
- ;(setf (frame-width (view-named :butt *test-w*)) 4)
-
- |#