Changeset main,53 for main/grid/display.lisp
- Timestamp:
- 11/15/2007 09:11:06 PM (19 years ago)
- branch-nick:
- tui
- revision id:
- dsowen@fugue88.ws-20071115211106-ix3zpfhce07h8wg8
- File:
-
- 1 edited
-
main/grid/display.lisp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
main/grid/display.lisp
r39 r53 16 16 (make-instance 'grid 17 17 :data data 18 :column-widths column-widths18 :column-widths (coerce column-widths 'vector) 19 19 :header-rows header-rows 20 20 :header-columns header-columns … … 62 62 (let ((text (item grid row column)) 63 63 (x (column-offset grid column))) 64 ( cdk::move-and-add-string main-window row x text))))64 (move-and-add-string main-window row x text)))) 65 65 66 66 (defun draw-header-top-item (grid row column) … … 68 68 (let ((text (item grid row column)) 69 69 (x (column-offset grid column))) 70 ( cdk::move-and-add-string main-window row x text))))70 (move-and-add-string main-window row x text)))) 71 71 72 72 (defun draw-item (grid row column) … … 76 76 (y (+ row y-scroll))) 77 77 (let ((x (+ column-offset x-scroll))) 78 ( cdk::move-and-add-string window y x text)))))78 (move-and-add-string window y x text))))) 79 79 80 80 ;;;; ------------------------------------------------- ;;;; … … 91 91 (dotimes (i header-rows) 92 92 (draw-cell grid i column i x)) 93 (dotimes (i (- ( cdk::getmaxywindow) header-rows))93 (dotimes (i (- (size window) header-rows)) 94 94 (let* ((y (+ i header-rows)) 95 95 (row (+ y row-scroll))) … … 100 100 (defun draw (grid) 101 101 (with-slots (data column-widths header-columns window column-scroll) grid 102 ( cdk::c-erase-windowwindow)102 (erase window) 103 103 (let ((x 0)) 104 104 (dotimes (i header-columns) … … 107 107 (do ((i (+ header-columns column-scroll) (incf i))) 108 108 ((or (>= i (columns data)) 109 (> x ( cdk::getmaxx window))))109 (> x (nth-value 1 (size window))))) 110 110 (draw-column grid i x) 111 111 (incf x (svref column-widths i)))))) … … 115 115 (defmethod max-row-scroll ((grid grid)) 116 116 (with-slots (data header-rows window) grid 117 (max 0 (- (rows data) ( cdk::getmaxywindow)))))117 (max 0 (- (rows data) (size window))))) 118 118 119 119 (defmethod (setf row-scroll) :around (i (grid grid))
Note: See TracChangeset
for help on using the changeset viewer.
