Changeset main,39


Ignore:
Timestamp:
11/08/2007 05:57:54 AM (19 years ago)
Author:
David Owen <dsowen@…>
branch-nick:
tui-new
revision id:
dsowen@fugue88.ws-20071108055754-sphaa0ww9903cndr
Message:

Use the BOUND and BOUNDF from DSO-UTIL.

Location:
main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/flat-menu.lisp

    r19 r39  
    5555  (redraw-selected menu nil))
    5656
    57 (defun bound (a b c)
    58   (min (max a b) c))
    59 
    6057(defmethod (setf selected) :around (i (menu menu))
    61   (call-next-method (bound 0 i (1- (length (slot-value menu 'entries)))) menu))
     58  (call-next-method (bound i 0 (1- (length (slot-value menu 'entries)))) menu))
    6259
    6360(defmethod (setf selected) :after (i (menu menu))
  • main/grid/display.lisp

    r26 r39  
    113113
    114114
    115 (defun bound (a b c)
    116   (min (max a b) c))
    117 
    118115(defmethod max-row-scroll ((grid grid))
    119116  (with-slots (data header-rows window) grid
     
    121118
    122119(defmethod (setf row-scroll) :around (i (grid grid))
    123   (call-next-method (bound 0 i (max-row-scroll grid)) grid))
     120  (call-next-method (bound i 0 (max-row-scroll grid)) grid))
    124121
    125122(defmethod row-scroll-percent ((grid grid))
     
    131128
    132129(defmethod (setf column-scroll) :around (i (grid grid))
    133   (call-next-method (bound 0 i (max-column-scroll grid)) grid))
     130  (call-next-method (bound i 0 (max-column-scroll grid)) grid))
    134131
    135132(defmethod column-scroll-percent ((grid grid))
Note: See TracChangeset for help on using the changeset viewer.