CLIM mail archive


Mouse action on commanding

   Date: Tue, 15 Mar 1994 06:41:10 -0800
   From: Curt Eggemeyer <>

   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!

There really isn't a good way to do this.  The problem is that the
place that has this knowledge in the input editing stream. but
translators only have access to the real window stream.

   (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*))))


Main Index | Thread Index