WtCursor Function

Sets or changes the cursor.

Usage

status = WtCursor(function, widget[, index])

Parameters

function:

'Default' — The default is the system cursor.

'System' — Sets the default system cursor.

'Wait' — Sets the wait cursor.

'Set' — Sets the specified cursor. If 'Set' is specified, the index parameter follows:

index — The cursor index (e.g., XC_X_cursor). See Appendix C: Widget Toolbox Cursors in the PV‑WAVE Application Developer’s Guide for a list of cursors.

widget — The ID of the widget for which the cursor is being set.

Returned Value

status — One (1) indicates success; zero (0) indicates failure.

Discussion

This routine changes the current cursor for a given widget to a new cursor defined by index. The following cursors are available:

All XC_* cursor types (for Motif and Windows) are listed in Appendix C: Widget Toolbox Cursors in the PV‑WAVE Application Developer’s Guide. For additional information on these cursors, see Appendix I of the Xlib Reference Manual, Volume 2, (O’Reilly & Associates, Inc., 1989).

A set of custom cursors designed by Rogue Wave listed in Appendix C: Widget Toolbox Cursors in the PV‑WAVE Application Developer’s Guide.

Note:

Rogue Wave has ported a subset of the Widget Toolbox (Wt) functionality that is available for Motif to Microsoft Windows. Because the Widget Toolbox under Windows is not a complete implementation, we recommend that Windows developers use the PV‑WAVE Widgets (Ww) layer or the VDA Tools when developing GUI applications.

Example

This example demonstrates a callback called to display the heartbeat.dat file with the WgMovieTool procedure. Because it takes a while to read the data file into PV‑WAVE, the wait cursor is set before the file is read to notify the user that the file is being read:

PRO MovieCB, wid, index
   @wtcursor
   top = WwGetValue(wid, /Userdata)
   CASE index OF
   1: BEGIN
      status = WtCursor('WAIT', top)
      heart = BYTARR(256, 256, 15)
      OPENR, u, !Data_Dir + 'heartbeat.dat', /Get_Lun
      READU, u, heart
      CLOSE, u
      WgMovieTool, heart, top, movie, widx, 1, /Popup, $
         /Do_tvscl
      status = WtCursor('DEFAULT', top)
      END
   2: BEGIN
      status = WwSetValue(top, /Close)
      END
   ENDCASE
END

See Also

For detailed information on GUI development, refer to the PV‑WAVE Application Developer’s Guide.

For more information about how to write an application program based on the PV‑WAVE Widget Toolbox, refer to Using the Widget Toolbox in the PV‑WAVE Application Developer’s Guide.