NCL Home > Documentation > HLUs > Classes

XWorkstation class

The XWorkstation manages communication with the NCAR Graphcs X Workstation input/output device.


Header file:		ncarg/hlu/XWorkstation.h
Class name:		xWorkstationClass
Class pointer:		NhlxWorkstationClass
Fortran class function:	NHLFXWORKSTATIONCLASS
Superclass:		Workstation
Composite classes:	<None>

Class-defined types

Type name:		NhlTXColorMode
Definition:		typedef enum {
				NhlSHARE	= 0,	/* "Share","Shared"*/
				NhlPRIVATE	= 1,	/* "Private"	*/
				NhlMIXED	= 2	/* "Mixed"	*/
			} NhlXColorMode;


Local resources

|			XWorkstation Resource Set		|
| wkWindowId			NhlTInteger		RCG	|
|	WkWindowId			NULL			|
| wkXColorMode			NhlTXColorMode		RCG	|
|	WkXColorMode			<Dynamic>		|
| wkPause			NhlTBoolean		RCSG	|
|	WkPause				<Dynamic>		|

Composite resources

The XWorkstation object class has no composite class objects.

Superclass resources

You can set all resources defined by the superclass of the XWorkstation object class, including:


The XWorkstation object is derived from the Workstation class and thus inherits all of the color map management and control functions associated with the Workstation class.

The XWorkstation adds three new resources to the Workstation set. These resources enable X Window programmers to seemlessly integrate their GUI's and the HLU libraries. The most significant of these resources is wkWindowId. This resource allows users to pass in the X window ID into which all children of a given XWorkstation object will draw. This means the users can embed NCAR graphics in their own GUI's. The only restriction to this is that the window id passed in through wkWindowId must have been created using the default visual.

The XWorkstation object can still be used without having to pass in a window id. If the resource wkWindowId is not set at create time then the XWorkstation object will create and manage its own X Window. To configure the size of the window that the XWorkstation object creates, you need to add a resource entry into your .Xdefaults file. The following is an example of how to set the geometry of the XWorkstation window to 800x800 pixels:

	xgks*geometry: 800x800
Eventually the XWorkstation object will accept an X-Window color map id as a resource but currently this feature is not implemented.

The final feature added to the Workstation class by the XWorkstation object is the ability to pause and wait for user input. This feature only applies when the resource wkWindowId is not set at create time. You control this feature using the resource wkPause. When set True, the XWorkstation will pause during any call to the NhlClearWorkstation or NhlFrame functions and wait for the user to press a mouse button or press a key.

Support functions

The XWorkstation object does not define any support functions, but inherits all the support functions available to its superclass.


See also