CLIM mail archive


Further Use of the mouse to complete a command!!!!!

Below are three presentation-actions that will permit you to minimize going
back and forth between the mouse and keyboard during command input.   The
only problem I have is that the first presentation action can be invoked before
entering any command to the application.  Does anybody know how I can check
to see if there exists any input to the command queue to add to the tester
function for the first action?

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

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

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

Main Index | Thread Index