Changeset 628


Ignore:
Timestamp:
Mar 7, 2004, 7:53:09 AM (15 years ago)
Author:
gb
Message:

Let Cocoa scroll windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/hemlock/src/cursor.lisp

    r56 r628  
    326326;;; exactly.
    327327;;;
    328 (defun scroll-window (window n)
    329   "Scroll Window down N lines, up if negative."
    330   (let ((start (window-display-start window))
    331         (point (window-point window))
    332         (width (window-width window))
    333         (height (window-height window)))
    334     (cond ((dis-line-offset-guess start n width))
    335           ((minusp n)
    336            (buffer-start start))
    337           (t
    338            (buffer-end start)
    339            (let ((fraction (- (truncate height 3) height)))
    340              (dis-line-offset-guess start fraction width))))
    341     (update-window-image window)
    342     (let ((iscurrent (eq window *current-window*))
    343           (bpoint (buffer-point (window-buffer window))))
    344       (when iscurrent (move-mark point bpoint))
    345       (unless (%displayed-p point window)
    346         (move-mark point start)
    347         (dis-line-offset-guess point (truncate (window-height window) 2)
    348                                width)
    349       (when iscurrent (move-mark bpoint point)))))
    350   t)
     328
    351329
    352330
Note: See TracChangeset for help on using the changeset viewer.