Author: junrue Date: Tue Mar 14 00:01:18 2006 New Revision: 39
Modified: trunk/src/packages.lisp trunk/src/tests/uitoolkit/layout-tester.lisp trunk/src/uitoolkit/widgets/layout.lisp trunk/src/uitoolkit/widgets/widget-classes.lisp trunk/src/uitoolkit/widgets/window.lisp Log: renamed window layout accessor
Modified: trunk/src/packages.lisp ============================================================================== --- trunk/src/packages.lisp (original) +++ trunk/src/packages.lisp Tue Mar 14 00:01:18 2006 @@ -398,7 +398,7 @@ #:key-down-p #:key-toggled-p #:layout - #:layout-manager + #:layout-of #:layout-p #:lines-visible-p #:location
Modified: trunk/src/tests/uitoolkit/layout-tester.lisp ============================================================================== --- trunk/src/tests/uitoolkit/layout-tester.lisp (original) +++ trunk/src/tests/uitoolkit/layout-tester.lisp Tue Mar 14 00:01:18 2006 @@ -159,13 +159,13 @@
(defun check-flow-orient-item (disp menu time) (declare (ignore disp time)) - (let ((layout (gfw:layout-manager *layout-tester-win*))) + (let ((layout (gfw:layout-of *layout-tester-win*))) (gfw:check (gfw:item-at menu 0) (find :horizontal (gfw:style-of layout))) (gfw:check (gfw:item-at menu 1) (find :vertical (gfw:style-of layout)))))
(defun set-flow-horizontal (disp item time rect) (declare (ignorable disp item time rect)) - (let* ((layout (gfw:layout-manager *layout-tester-win*)) + (let* ((layout (gfw:layout-of *layout-tester-win*)) (style (gfw:style-of layout))) (setf style (remove :vertical style)) (push :horizontal style) @@ -174,7 +174,7 @@
(defun set-flow-vertical (disp item time rect) (declare (ignorable disp item time rect)) - (let* ((layout (gfw:layout-manager *layout-tester-win*)) + (let* ((layout (gfw:layout-of *layout-tester-win*)) (style (gfw:style-of layout))) (setf style (remove :horizontal style)) (push :vertical style) @@ -183,7 +183,7 @@
(defun set-flow-layout-wrap (disp item time rect) (declare (ignorable disp item time rect)) - (let* ((layout (gfw:layout-manager *layout-tester-win*)) + (let* ((layout (gfw:layout-of *layout-tester-win*)) (style (gfw:style-of layout))) (if (find :wrap style) (setf (gfw:style-of layout) (remove :wrap style)) @@ -216,7 +216,7 @@ (gfw:append-submenu menu "Orientation" orient-menu #'check-flow-orient-item) (gfw:append-submenu menu "Spacing" spacing-menu nil) (setf it (gfw:append-item menu "Wrap" nil #'set-flow-layout-wrap)) - (gfw:check it (find :wrap (gfw:style-of (gfw:layout-manager *layout-tester-win*)))))) + (gfw:check it (find :wrap (gfw:style-of (gfw:layout-of *layout-tester-win*))))))
(defun exit-layout-callback (disp item time rect) (declare (ignorable disp item time rect)) @@ -233,7 +233,7 @@ (vis-menu-disp (make-instance 'child-menu-dispatcher :sub-disp-class 'visibility-child-dispatcher :check-test-fn #'gfw:visible-p))) (setf *layout-tester-win* (make-instance 'gfw:window :dispatcher (make-instance 'layout-tester-events) - :layout-manager (make-instance 'gfw:flow-layout))) + :layout (make-instance 'gfw:flow-layout))) (gfw:realize *layout-tester-win* nil :style-workspace) (setf menubar (gfw:defmenusystem ((:item "&File" :submenu ((:item "E&xit"
Modified: trunk/src/uitoolkit/widgets/layout.lisp ============================================================================== --- trunk/src/uitoolkit/widgets/layout.lisp (original) +++ trunk/src/uitoolkit/widgets/layout.lisp Tue Mar 14 00:01:18 2006 @@ -40,7 +40,7 @@
(defun perform-layout (win width-hint height-hint) "Calls compute-layout for a window and then handles the actual moving and resizing of its children." - (let ((layout (layout-manager win)) + (let ((layout (layout-of win)) (kids nil) (hdwp nil)) (when (and (layout-p win) layout)
Modified: trunk/src/uitoolkit/widgets/widget-classes.lisp ============================================================================== --- trunk/src/uitoolkit/widgets/widget-classes.lisp (original) +++ trunk/src/uitoolkit/widgets/widget-classes.lisp Tue Mar 14 00:01:18 2006 @@ -85,8 +85,8 @@ ((layout-p :reader layout-p :initform t) - (layout-manager - :accessor layout-manager - :initarg :layout-manager + (layout + :accessor layout-of + :initarg :layout :initform nil)) (:documentation "The window class is the base class for widgets that serve as containers (including top-level windows)."))
Modified: trunk/src/uitoolkit/widgets/window.lisp ============================================================================== --- trunk/src/uitoolkit/widgets/window.lisp (original) +++ trunk/src/uitoolkit/widgets/window.lisp Tue Mar 14 00:01:18 2006 @@ -262,9 +262,9 @@ (call-next-method))
(defmethod preferred-size ((win window) width-hint height-hint) - (let ((mgr (layout-manager win))) - (if (and (layout-p win) mgr) - (let ((new-client-sz (compute-size mgr win width-hint height-hint))) + (let ((layout (layout-of win))) + (if (and (layout-p win) layout) + (let ((new-client-sz (compute-size layout win width-hint height-hint))) (compute-outer-size win new-client-sz)) (size win))))
graphic-forms-cvs@common-lisp.net