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>
Type name: NhlTXColorMode Definition: typedef enum { NhlSHARE = 0, /* "Share","Shared"*/ NhlPRIVATE = 1, /* "Private" */ NhlMIXED = 2 /* "Mixed" */ } NhlXColorMode;
+---------------------------------------------------------------+ | XWorkstation Resource Set | |---------------------------------------------------------------| | NAME TYPE ACCESS | | CLASS DEFAULT | |===============================================================| | wkWindowId NhlTInteger RCG | | WkWindowId NULL | |---------------------------------------------------------------| | wkXColorMode NhlTXColorMode RCG | | WkXColorMode <Dynamic> | |---------------------------------------------------------------| | wkPause NhlTBoolean RCSG | | WkPause <Dynamic> | +---------------------------------------------------------------+
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: 800x800Eventually 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 ClearWorkstation Frame functions and wait for the user to press a mouse button or press a key.
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?