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

more on mouse to command presentation

    Date: Wed, 11 Jul 90 17:24:52 MDT
    From: drstrip@cs.sandia.gov (David R Strip [1411])

    I guess I wasn't specific enough.
    I would like to present a pretty something to stand in for a
    form to be evaluated in the listener.

There is a presentation type of SI:PSEUDO-COMMAND which allows you to
specify a form to evaluate, a "command" string which shows up in the
mouse documentation line, and then some output which is the "icon" on
which you click:

  (dw:with-output-as-presentation (:stream window
				   :object '((form) "Command string")
				   :type 'si:pseudo-command
				   :single-box t)
    (format window "Click here to execute \"Command string\""))

  (dw:with-output-as-presentation (:stream window
				   :object '((this-is-a-hold-up) "Get robbed")
				   :type 'si:pseudo-command
				   :single-box t)
    (with-character-style ((si:backtranslate-font 'fonts:scrawl) window)
      (format window "Your money or your life")))

You can also draw things in the inside of the WITH-OUTPUT-AS-PRESENTATION,
thus allowing for an iconic representation of the command instead of the
textual ones I've shown.

There is a whole selection of things like this in SI:DRAW-INITIAL-WINDOW
and its guts; for example, the thing which puts the mouse in the place
where you can just click on the <Select>-D hack in your initial window.