Changeset main,63
- Timestamp:
- 11/17/2007 12:40:30 AM (19 years ago)
- branch-nick:
- tui
- revision id:
- dsowen@fugue88.ws-20071117004030-ov0o4jfbzl3b9vup
- Location:
- main
- Files:
-
- 5 edited
-
form.lisp (modified) (2 diffs)
-
widget/generic.lisp (modified) (1 diff)
-
widget/label.lisp (modified) (1 diff)
-
widget/numberbox.lisp (modified) (1 diff)
-
widget/textbox.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
main/form.lisp
r47 r63 226 226 227 227 228 (defmethod activate ((form form) & optional (callback 'nothing))228 (defmethod activate ((form form) &key (key-callback 'nothing) &allow-other-keys) 229 229 (with-slots (peers) form 230 230 (flet ((callback (key) 231 231 (if (member key '(#\Return #\Newline #\Tab :key-btab)) 232 232 key 233 (funcall callback key))))233 (funcall key-callback key)))) 234 234 (let ((focus 0) 235 235 (n (length peers))) … … 237 237 (ensure-widget-visible form focus) 238 238 (refresh form) 239 (let ((key (activate (aref peers focus) #'callback)))239 (let ((key (activate (aref peers focus) :key-callback #'callback))) 240 240 (case key 241 241 ((#\Return #\Newline #\Tab) -
main/widget/generic.lisp
r46 r63 43 43 (defgeneric draw (widget)) 44 44 45 (defgeneric activate (widget & optional callback))45 (defgeneric activate (widget &key key-callback &allow-other-keys)) -
main/widget/label.lisp
r46 r63 29 29 (defmethod destroy ((label label))) 30 30 31 (defmethod activate ((label label) &optional callback) 32 (declare (ignore callback)) 33 #\Tab) 31 (defmethod activate ((label label) &key &allow-other-keys) 32 #\Tab) -
main/widget/numberbox.lisp
r46 r63 43 43 44 44 45 (defmethod activate :around ((numberbox numberbox)46 &optional (callback 'nothing))45 (defmethod activate ((numberbox numberbox) &key (key-callback 'nothing) 46 &allow-other-keys) 47 47 (with-slots (data) numberbox 48 48 (with-slots (edit) data 49 49 (setf edit t) 50 50 (setf (insertion-point numberbox) :end) 51 (let ((r (call-next-method numberbox callback)))51 (let ((r (call-next-method numberbox key-callback))) 52 52 (setf edit nil) 53 53 (setf (insertion-point numberbox) 0) -
main/widget/textbox.lisp
r46 r63 89 89 90 90 91 (defmethod activate ((textbox textbox) &optional (callback 'nothing)) 91 (defmethod activate ((textbox textbox) &key (key-callback 'nothing) 92 &allow-other-keys) 92 93 (with-slots (data window active) textbox 93 94 (setf active t) … … 119 120 (if (or (keywordp key) 120 121 (member key '(#\Return #\Newline #\Tab #\Esc))) 121 (let ((r (funcall callback key)))122 (let ((r (funcall key-callback key))) 122 123 (when r 123 124 (setf (insertion-point textbox) 0)
Note: See TracChangeset
for help on using the changeset viewer.
