Contents Up Previous Next

wxCursor is-a wxBitmap

A cursor is a small bitmap used for representing the mouse pointer. It can be set for a particular subwindow, using wxWindow set-cursor, as a cue for what operations are possible in this window at this point in time.

wxCursor cursor-name
wxCursor x
wxCursor y
wxCursor create


wxCursor cursor-name

string cursor-name

A stock cursor name, one of the following:


wxCursor x

long x

The cursor hotspot x position (used only when loading a cursor from a file).


wxCursor y

long y

The cursor hotspot y position (used only when loading a cursor from a file).


wxCursor create

void ( create)

Creates either a stock cursor (if cursor-name is non-nil) or a cursor loaded from a disk file (if filename and bitmap-type are non-nil).

Under X, the permitted cursor types in bitmap-type are:

Under Windows, the permitted types are:

Examples:

  ; Create a stock cursor
  (bind ?cursor (make-instance (gensym*)
     of wxCursor (cursor-name "wxCURSOR_PENCIL")))

  ; Create a cursor from a .cur file
  (bind ?cursor (make-instance (gensym*)
     of wxCursor (filename "figure.cur") (bitmap-type "wxBITMAP_TYPE_CUR")))

  ; Create a cursor from a .ico file
  (bind ?cursor (make-instance (gensym*)
     of wxCursor (filename "figure.icor") (bitmap-type "wxBITMAP_TYPE_CUR")
                 (x 10) (y 10)))