Changeset 13901


Ignore:
Timestamp:
Jun 29, 2010, 1:49:39 PM (9 years ago)
Author:
gz
Message:

try for a better stream-line-length for listener

Location:
trunk/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/cocoa-editor.lisp

    r13484 r13901  
    19021902              (slot-value modeline 'pane) pane))
    19031903      tv)))
     1904
     1905(defmethod hemlock-view-size ((view hi:hemlock-view))
     1906  (let* ((pane (hi::hemlock-view-pane view))
     1907         (bounds (#/bounds (#/contentView (text-pane-scroll-view pane))))
     1908         (tv (text-pane-text-view pane))
     1909         (char-width (text-view-char-width tv))
     1910         (line-height (text-view-line-height tv)))
     1911    (values (floor (ns:ns-rect-width bounds) char-width)
     1912            (floor (ns:ns-rect-height bounds) line-height))))
     1913
    19041914
    19051915(defmethod hemlock-ext:change-active-pane ((view hi:hemlock-view) new-pane)
  • trunk/source/cocoa-ide/cocoa-listener.lisp

    r13402 r13901  
    240240
    241241(defmethod ccl:stream-line-length ((stream cocoa-listener-output-stream))
    242   ;; TODO: ** compute length from window size **
    243   80)
    244 
     242  (with-slots (hemlock-view) stream
     243    (values (hemlock-view-size hemlock-view))))
    245244
    246245(defloadvar *cocoa-listener-count* 0)
  • trunk/source/level-1/l1-streams.lisp

    r13648 r13901  
    341341  "This is meant to be shadowed by particular kinds of streams,
    342342   esp those associated with windows."
    343   80)
     343  *default-right-margin*)
    344344
    345345(defmethod interactive-stream-p ((x t))
     
    38423842           (synonym-method stream-clear-output)
    38433843           (synonym-method stream-line-column)
     3844           (synonym-method stream-line-length)
    38443845           (synonym-method stream-set-column new)
    38453846           (synonym-method stream-advance-to-column new)
     
    39363937  (two-way-output-method stream-clear-output)
    39373938  (two-way-output-method stream-line-column)
     3939  (two-way-output-method stream-line-length)
    39383940  (two-way-output-method stream-set-column new)
    39393941  (two-way-output-method stream-advance-to-column new)
  • trunk/source/lib/streams.lisp

    r13368 r13901  
    131131
    132132(defun line-length (stream)
    133   (or (stream-line-length stream) 80))
     133  (or (stream-line-length stream) *default-right-margin*))
    134134
    135135(defun write-byte (byte stream)
Note: See TracChangeset for help on using the changeset viewer.