[mcclim-cvs] CVS update: mcclim/panes.lisp

Max-Gerd Retzlaff mretzlaff at common-lisp.net
Mon Aug 29 22:39:32 UTC 2005


Update of /project/mcclim/cvsroot/mcclim
In directory common-lisp.net:/tmp/cvs-serv15426

Modified Files:
	panes.lisp 
Log Message:
Added a method PANE-BORDER that works just like PANE-VIEWPORT and
PANE-SCROLLER, only for BORDER-PANEs. It is not in the spec, but so
is the BORDER-PANE as a whole. (And, yes, I needed it.)

In addition to this it changes the IFs in PANE-VIEWPORT and
PANE-SCROLLER to WHENs (both had no else-forms).

(Minor change:
 Five changes in the comments: The section titles of the different
 panes are made consistent. (Most of them were of the pattern
 "FOO PANE", only five of them "FOO-PANE"; as I liked the former
 pattern more, they are now all of that pattern.))

Date: Tue Aug 30 00:39:31 2005
Author: mretzlaff

Index: mcclim/panes.lisp
diff -u mcclim/panes.lisp:1.154 mcclim/panes.lisp:1.155
--- mcclim/panes.lisp:1.154	Fri Aug 19 04:20:35 2005
+++ mcclim/panes.lisp	Tue Aug 30 00:39:31 2005
@@ -27,7 +27,7 @@
 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;;; Boston, MA  02111-1307  USA.
 
-;;; $Id: panes.lisp,v 1.154 2005/08/19 02:20:35 rstrandh Exp $
+;;; $Id: panes.lisp,v 1.155 2005/08/29 22:39:31 mretzlaff Exp $
 
 (in-package :clim-internals)
 
@@ -795,7 +795,7 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-;;; BASIC-PANE
+;;; BASIC PANE
 
 (defclass basic-pane (;; layout-protocol-mixin
                       standard-space-requirement-options-mixin
@@ -957,7 +957,7 @@
 			 (event window-manager-delete-event))
   (frame-exit (pane-frame (event-sheet event))))
 
-;;;; UNMANAGED-TOP-LEVEL-SHEET-PANE
+;;;; UNMANAGED-TOP-LEVEL-SHEET PANE
 
 (defclass unmanaged-top-level-sheet-pane (top-level-sheet-pane)
   ()
@@ -1643,7 +1643,7 @@
                     (- width border-width border-width)
                     (- height border-width border-width)))))
 
-;;; OUTLINED-PANE
+;;; OUTLINED PANE
 
 ;; same as SPACING-PANE but a different default background.
 
@@ -1654,7 +1654,7 @@
 (defmacro outlining ((&rest options) &body contents)
   `(make-pane 'outlined-pane , at options :contents (list , at contents)))
 
-;;; BORDER-PANE
+;;; BORDER PANE
 
 ;; same as outlined-pane, but thickness is now called border-width.
 
@@ -1667,6 +1667,11 @@
 (defmacro bordering ((&rest options) &body contents)
   `(make-pane 'border-pane , at options :contents (list , at contents)))
 
+(defmethod pane-border ((pane basic-pane))
+  (let ((parent (sheet-parent pane)))
+    (when (and parent (typep parent 'border-pane))
+	parent)))
+
 ;;; RAISED PANE
 
 (defclass raised-pane (border-pane permanent-medium-sheet-output-mixin)
@@ -1751,7 +1756,7 @@
   (note-input-focus-changed (sheet-child pane) state))
 
 ;;;;
-;;;; SCROLLER-PANE
+;;;; SCROLLER PANE
 ;;;;
 
 ;;; How scrolling is done
@@ -2033,9 +2038,8 @@
 
 (defmethod pane-viewport ((pane basic-pane))
   (let ((parent (sheet-parent pane)))
-    (if (and parent (typep parent 'viewport-pane))
-	parent
-      nil)))
+    (when (and parent (typep parent 'viewport-pane))
+	parent)))
 
 ;;; Default for streams that aren't even panes.
 
@@ -2051,7 +2055,7 @@
 
 (defmethod pane-scroller ((pane basic-pane))
   (let ((viewport (pane-viewport pane)))
-    (if viewport
+    (when viewport
 	(sheet-parent viewport))))
 
 (defmethod scroll-extent ((pane basic-pane) x y)




More information about the Mcclim-cvs mailing list