CLIM mail archive

[Prev][Next][Index][Thread]

Re: stopping echoing of accepting?



>
>ACCEPT in development version of CLIM has a :REPLACE-INPUT keyword to
>which you can supply a value of NIL to prevent echoing when you click
>on something.  There is no way to cause CLIM not to echo typed input
>to ACCEPT.
>
>
We wrote our own simple version of accept to get around this problem using
read-gesture and find-innermost-applicable-presentation. 
find-innermost-applicable-presentation wants an input context whose
structure or creation isn't documentated very well in the manual.  The only
way we could think of creating it was to wrap
find-innermost-applicable-presentation within with-input-context and using
the variable *input-context* for the input context.  Is there a better way?

e.g.
(defun get-user-input (stream)
  (let ((gesture (read-gesture :stream stream))
        presentation)
    (typecase gesture
      (POINTER-BUTTON-PRESS-EVENT
       (setf presentation
             (with-input-context (t) nil
                   (find-innermost-applicable-presentation *input-context*
stream 
                                                     (pointer-event-x
gesture)
                                                     (pointer-event-y
gesture))
               nil))
       (if presentation
         (values (presentation-object presentation) 
                 (presentation-type presentation))
         nil))
      (t gesture))))


0,,

Follow-Ups:

Main Index | Thread Index