(defpackage :junk (:use :clim-lisp :clim)) (in-package :junk) (defclass example-pane2 (application-pane) ()) #+McCLIM ; from McCLIM source (defmethod window-clear ((pane example-pane2)) (stream-close-text-output-record pane) (let ((output-history (stream-output-history pane))) (with-bounding-rectangle* (left top right bottom) output-history (when (sheet-viewable-p pane) (medium-clear-area (sheet-medium pane) left top right bottom))) (clear-output-record output-history)) (window-erase-viewport pane) (alexandria:when-let ((cursor (stream-text-cursor pane))) (setf (cursor-position cursor) (clim-extensions:stream-cursor-initial-position pane))) #+() (progn ; why is this here? Infinite recursion results (setf (climi::stream-width pane) 0) (setf (climi::stream-height pane) 0) (scroll-extent pane 0 0) (change-space-requirements pane))) #+McCLIM (defmethod redisplay-frame-pane :around ((frame application-frame) (pane climi::pane-display-mixin) &key force-p) (declare (ignore force-p)) (funcall (climi::pane-display-function pane) (pane-frame pane) pane)) (defmethod resize-sheet :after ((pane example-pane2) x y) (declare (ignore x y)) (window-clear pane) #| stack blown with redisplay-frame-pane 44 Clear the output history of the pane and reattempt forceful redisplay. 45 Clear the output history of the pane, but don't redisplay. 46 Skip this redisplay. 47 Clear the output history of the pane and reattempt forceful redisplay. 48 Clear the output history of the pane, but don't redisplay. 49 Skip this redisplay. 50 (abort) Return to top loop level 0. |# ;#+clim-2.0 (redisplay-frame-pane (pane-frame pane) pane) ;#+McCLIM (cpd2 (pane-frame pane) pane) ) (defun cpd2 (frame pane) ; display function (with-bounding-rectangle* (x1 y1 x2 y2) pane (let* ((w (- x2 x1)) (h (- y2 y1)) (r (* .1 (min w h)))) (updating-output (pane) (draw-ellipse* pane (/ w 2) (/ h 2) r 0 0 r :ink +green+))))) (define-application-frame test2 () () (:panes (p1 (make-pane 'example-pane2 :width 300 :max-width +fill+ :height 300 :max-height +fill+ :display-function 'cpd2 :incremental-redisplay t ))) (:layouts (vertically p1))) (defun tryit () ;; grab edge or corner with mouse pointer and stretch #+:CLX (pushnew :clx *default-server-path*) (run-frame-top-level (make-application-frame 'test2)))