[mcclim-cvs] CVS mcclim
thenriksen
thenriksen at common-lisp.net
Mon Aug 20 14:27:14 UTC 2007
Update of /project/mcclim/cvsroot/mcclim
In directory clnet:/tmp/cvs-serv30204
Modified Files:
input-editing.lisp decls.lisp
Log Message:
Fixed last known Drei input-editing-stream issue by implementing
Goatee-style handling of :REPLACE keyword parameter to
STREAM-REPLACE-INPUT (not mentioned in the spec).
--- /project/mcclim/cvsroot/mcclim/input-editing.lisp 2006/12/12 22:36:32 1.55
+++ /project/mcclim/cvsroot/mcclim/input-editing.lisp 2007/08/20 14:27:14 1.56
@@ -382,6 +382,7 @@
(adjust-array so-far (length input)
:fill-pointer (length input))
(replace so-far input)
+ ;; XXX: Relies on non-specified behavior of :rescan.
(replace-input stream input :rescan nil)))
(multiple-value-bind (object success input)
(complete-input-rescan stream func partial-completers
@@ -420,9 +421,8 @@
:n-columns 1)
(declare (ignore event))
(if item
- (progn
- (setf (values input success object nmatches)
- (values (car item) t menu-object 1)))
+ (setf (values input success object nmatches)
+ (values (car item) t menu-object 1))
(setf success nil
nmatches 0))))
(unless (and (eq mode :complete) (not success))
--- /project/mcclim/cvsroot/mcclim/decls.lisp 2007/02/07 12:44:16 1.46
+++ /project/mcclim/cvsroot/mcclim/decls.lisp 2007/08/20 14:27:14 1.47
@@ -581,10 +581,42 @@
;;; 24.4 Reading and Writing of Tokens
(defgeneric replace-input
- (stream new-input &key start end buffer-start rescan))
+ (stream new-input &key start end buffer-start rescan)
+ ;; XXX: Nonstandard behavior for :rescan.
+ (:documentation "Replaces the part of the input editing stream
+`stream's input buffer that extends from `buffer-start' to its
+scan pointer with the string `new-input'. `buffer-start' defaults
+to the current input position of stream, which is the position at
+which the current accept \"session\" starts. `start' and `end' can be
+supplied to specify a subsequence of `new-input'; start defaults to
+0 and end defaults to the length of `new-input'.
+
+`replace-input' will queue a rescan by calling `queue-rescan' if
+the new input does not match the old input, or `rescan' is
+true. If `rescan' is explicitly provided as NIL, no rescan will
+be queued in any case.
+
+The returned value is the position in the input buffer."))
+
(defgeneric presentation-replace-input
(stream object type view
- &key buffer-start rescan query-identifier for-context-type))
+ &key buffer-start rescan query-identifier for-context-type)
+ (:documentation "Like `replace-input', except that the new
+input to insert into the input buffer is gotten by presenting
+`object' with the presentation type `type' and view
+`view'. `buffer-start' and `rescan' are as for `replace-input',
+and `query-identifier' and `for-context-type' as as for
+`present'.
+
+Typically, this function will be implemented by calling
+`present-to-string' on `object', `type', `view', and
+`for-context-type', and then calling `replace-input' on the
+resulting string.
+
+If the object cannot be transformed into an acceptable textual
+form, it may be inserted as a special \"accept result\" that is
+considered a single gesture. These accept result objects have no
+standardised form."))
;;; 27.3 Command Menus
More information about the Mcclim-cvs
mailing list