CLIM mail archive

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

Mouse action on commanding



I have the following presentation actions setup, so the user can work the
command loop in the application with only the mouse, however, is there a way
to test the queue to see if nothing has been entered yet to start a command.
I need this as a tester function for both complete-an-argument-in-command-line
and complete-command-line actions to prevent their effect occuring when there
is an empty command prompt that causes the annoying message about attempting
to complete the null string warning.  Any queue checking internal function
for this? Thanks!

(define-presentation-action Complete-An-Argument-In-Command-Line
    (blank-area nil others :menu nil :gesture :left :documentation "Complete argument in command line")
  ()
  (clim-utils:queue-put (clim:stream-input-buffer (frame-query-io *Apgen*)) #\space)
  (clim::immediate-rescan (clim:stream-input-buffer (frame-query-io *Apgen*))))

(define-presentation-action Describe-Command-Or-Argument
    (blank-area nil others :menu nil :gesture :middle :documentation "Describe either command or a command argument")
  ()
  (clim-utils:queue-put (clim:stream-input-buffer (frame-query-io *Apgen*)) #\control-?)
  (clim::immediate-rescan (clim:stream-input-buffer (frame-query-io *Apgen*))))

(define-presentation-action Complete-Command-Line
    (blank-area nil others :menu nil :gesture :right :documentation "Complete command line input")
  ()
  (clim-utils:queue-put (clim:stream-input-buffer (frame-query-io *Apgen*)) #\newline)
  (clim::immediate-rescan (clim:stream-input-buffer (frame-query-io *Apgen*))))

Follow-Ups:

Main Index | Thread Index