CLIM mail archive

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

changing the mouse-glyph



    Date: Thu, 29 Oct 1992 14:08 EST
    From: Clinton Hyde <chyde@chesapeake.ads.com>

CLIM 1.1 doesn't support this at all.

In CLIM 2.0, you can call (SETF (POINTER-CURSOR (PORT-POINTER <port>)) <cursor>)
to change the cursor globally (although this may not be "sticky" on some
platforms, e.g., X Windows), or (SETF (SHEET-POINTER-CURSOR <sheet>) <cursor>)
to change it for one window.  

<cursor> can be one of

  :default                typically a north-west pointing arrow
  :vertical-scroll	  typically a vertical double-headed arrow
  :scroll-up		  typically a vertical arrow, pointing up
  :scroll-down		  typically a vertical arrow, pointing down
  :horizontal-scroll	  typically a horizontal double-headed arrow
  :scroll-left		  typically a horizontal arrow, pointing left
  :scroll-right		  typically a horizontal arrow, pointing right
  :busy			  typically an hourglass
  :upper-left		  typically an upper-left corner
  :upper-right		  typically an upper-right corner
  :lower-left		  typically a lower-left corner
  :lower-right		  typically a lower-right corner
  :vertical-thumb	  typically a horizontal arrow, pointing right
  :horizontal-thumb	  typically a vertical arrow, pointing up
  :button		  typically a vertical arrow, pointing up
  :prompt		  typically something like an i-beam
  :move			  typically an "X" crosshair
  :position		  typically a "+" crosshair

Ports can obviously extend this list, but the above is the basic list.

    I'd like to change the mouse glyph occasionally. in particular, I want
    a spinning watch or rotating something-or-other, to show 'app-busy'
    sort of things to the user. I've looked at the pointer object for a
    window, it's not very indicative of what happens. there's a slot
    called CURSOR-PATTERN which is unbound (it's a slot for a window, such
    as the root, and NOT a slot for a frame, which is consistent with the
    CLX docs).

    I would like to understand what happens with the cursor-pattern, if
    anything, how to change <something> to get the 'busy' indicator, and
    how to make the default be a larger arrow (I have the feeling our
    customers are going to be happier with a larger arrow).

    if the 'cursor-pattern' slot of a 'clim::standard-pointer held a
    clim:pattern thingie, would it be drawn as the mouse-glyph? (the book
    is not clear on the make-pattern stuff, with one example that makes
    sense after a while)

    my CLX book says you can (SETF (xlib:WINDOW-CURSOR win)
    -some-new-cursor-) but I haven't tried that, since I don't know what
    the cursor should be...

    any suggestions? I may just try creating a pattern and a new std-ptr
    and stuff it into a window and see what happens. I have this feeling
    that isn't quite good enough, however...

     -- clint

0,,

References:

Main Index | Thread Index