/[mcclim]/mcclim/frames.lisp
ViewVC logotype

Diff of /mcclim/frames.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.102 by hefner1, Sun Oct 31 01:46:31 2004 UTC revision 1.103 by hefner1, Fri Nov 12 06:38:50 2004 UTC
# Line 928  frame, if any") Line 928  frame, if any")
928  (defclass menu-frame ()  (defclass menu-frame ()
929    ((left :initform 0 :initarg :left)    ((left :initform 0 :initarg :left)
930     (top :initform 0 :initarg :top)     (top :initform 0 :initarg :top)
931       (min-width :initform nil :initarg :min-width)
932     (top-level-sheet :initform nil :reader frame-top-level-sheet)     (top-level-sheet :initform nil :reader frame-top-level-sheet)
933     (panes :reader frame-panes :initarg :panes)     (panes :reader frame-panes :initarg :panes)
934     (graft :initform nil :accessor graft)     (graft :initform nil :accessor graft)
# Line 944  frame, if any") Line 945  frame, if any")
945      (let ((graft (find-graft :port (frame-manager-port fm))))      (let ((graft (find-graft :port (frame-manager-port fm))))
946        (sheet-adopt-child graft t-l-s)        (sheet-adopt-child graft t-l-s)
947        (setf (graft frame) graft))        (setf (graft frame) graft))
948      (let ((space (compose-space t-l-s)))      (let ((pre-space (compose-space t-l-s))
949        (allocate-space (frame-panes frame)            (frame-min-width (slot-value frame 'min-width)))
950                        (space-requirement-width space)        (multiple-value-bind (width min-width max-width height min-height max-height)
951                        (space-requirement-height space))            (space-requirement-components pre-space)
952        (setf (sheet-region t-l-s)          (flet ((foomax (x y) (max (or x 1) (or y 1))))
953              (make-bounding-rectangle 0 0            (let ((space (make-space-requirement :min-width  (foomax frame-min-width min-width)
954                                       (space-requirement-width space)                                                 :width      (foomax frame-min-width width)
955                                       (space-requirement-height space))))                                                 :max-width  (foomax frame-min-width max-width)
956      (setf (sheet-transformation t-l-s)                                                 :min-height min-height
957            (make-translation-transformation (slot-value frame 'left)                                                 :height     height
958                                             (slot-value frame 'top)))))                                                 :max-height max-height)))
959                (allocate-space (frame-panes frame)
960                                (space-requirement-width space)
961                                (space-requirement-height space))
962                (setf (sheet-region t-l-s)
963                      (make-bounding-rectangle 0 0
964                                               (space-requirement-width space)
965                                               (space-requirement-height space))))
966              (setf (sheet-transformation t-l-s)
967                    (make-translation-transformation (slot-value frame 'left)
968                                                     (slot-value frame 'top))))))))
969    
970  (defmethod disown-frame ((fm frame-manager) (frame menu-frame))  (defmethod disown-frame ((fm frame-manager) (frame menu-frame))
971    (setf (slot-value fm 'frames) (remove frame (slot-value fm 'frames)))    (setf (slot-value fm 'frames) (remove frame (slot-value fm 'frames)))
972    (sheet-disown-child (graft frame) (frame-top-level-sheet frame))    (sheet-disown-child (graft frame) (frame-top-level-sheet frame))
973    (setf (frame-manager frame) nil))    (setf (frame-manager frame) nil))
974    
975  (defun make-menu-frame (pane &key (left 0) (top 0))  (defun make-menu-frame (pane &key (left 0) (top 0) (min-width 1))
976    (make-instance 'menu-frame :panes pane :left left :top top))    (make-instance 'menu-frame :panes pane :left left :top top :min-width min-width))
977    
978  ;;; Frames and presentations  ;;; Frames and presentations
979  (defmethod frame-maintain-presentation-histories  (defmethod frame-maintain-presentation-histories

Legend:
Removed from v.1.102  
changed lines
  Added in v.1.103

  ViewVC Help
Powered by ViewVC 1.1.5