.\
cgcmdwindow__define.pro
Graphics
Creates a "command" window for IDL traditional commands (Plot, Contour, Surface, etc. or for Coyote Graphics routines, cgPlot, cgContour, cgSurf, etc.). In addition, the window contents can be saved as PostScript files or as raster image files. If ImageMagick is installed on your machine, the raster image files can be created in very high quality from PostScript files. This program can be used in place of a normal draw widget or as a stand-alone program.
The program is designed to work with any IDL traditional graphics routine that is a procedure and includes no more than four positional parameters. Any number of keywords can be used to specify properties of the graphical output. Any number of graphics commands can be "added" the the window. Simply use the AddCommand method to add commands.
If your program does not load its own color tables, the color tables in effect when this program is initiated are used to display the graphics commands.
To create PostScript output from within the program, your graphics program has to be written in such a way that it can work properly in the PostScript device. This means there are no Window commands, WSet commands, and the like that are not allowed in the PostScript device. Such commands are allowed in programs, of course, if they are "protected". Usually such protection looks like this:
IF (!D.Flags AND 256) NE 0 THEN Window, ...
cgDisplay
is a good program for opening graphics
"windows", because such PostScript protection is built into the program. In a PostScript
device, cgDisplay produces a "window" with the same aspect ratio as the current
display graphics window, which is an aid in producing PostScript output that
looks like the same output in the display window.
Much better looking raster files can be created from the graphics window contents, if the raster files are created by converting PostScript files to the raster file. If the ImageMagick "convert" command can be found on your machine, you will have the option to create raster files using this method. I *highly* recommend doing so, as fonts and other plot annotation will be of much higher quality using this method.
This program has been designed to work with other Coyote Graphics routines: cgPlot
,
cgContour
, cgSurf
, and so on, although I expect it to work with any IDL
traditional graphics routine, if the routine is well written.
Class description for cgCmdWindow
Subclasses: cgPixmapWindow
Properties
Properties in cgCmdWindow
- Method init
- Motion_Events init
- MULTI get set
- WYPos init
- IM_RASTER get set
- NOEXECUTECOMMANDS get set
- _Extra get set init
- XOMARGIN get set
- Drop_Events init
- PS_DECOMPOSED get set
- PS_TT_FONT get set
- CmdDelay init
- PS_CHARSIZE get set
- ADJUSTSIZE get set
- IM_WIDTH set
- IM_DENSITY get set
- WMulti init
- WXSize init
- PS_SCALE_FACTOR get set
- WYSize init
- Wheel_Events init
- COMMANDS get
- WID get set
- IM_TRANSPARENT get set
- IM_OPTIONS get set
- AltPS_Keywords init
- P1 init
- Tracking_Events init
- WDestroyObjects init
- P2 init
- P3 init
- P4 init
- DIMENSIONS get set
- PALETTE get set
- OXMargin init
- DELAY get set
- PS_FONT get set
- WXPos init
- Background get set init
- PDF_PATH get set
- OYMargin init
- EraseIt get set init
- AltPS_Params init
- PS_METRIC get set
- PS_ENCAPSULATED get set
- PDF_UNIX_CONVERT_CMD get set
- IM_RESIZE get set
- Event_Handler init
- Button_Events init
- TLB get
- Storage get set init
- WAspect init
- PS_QUIET get set
- Keyboard_Events init
- YOMARGIN get set
- Group_Leader init
- UPDATE set
- Command init
- ReplaceCmd init
- WTitle init
- PS_DELETE get set
Fields
Fields in cgCmdWindow
- MSYSVAR ptr_new()
- G ptr_new()
- CREATEPARENT 0B
- DESTROYOBJECTS 0B
- R ptr_new()
- IM_RASTER 0L
- NOEXECUTECOMMANDS 0B
- XOMARGIN [0.000000, 0.000000]
- CMDS obj_new()
- LASTWRITEFILE ''
- PS_DECOMPOSED 0L
- PS_TT_FONT ''
- PS_CHARSIZE 0.000000
- ADJUSTSIZE 0B
- IM_WIDTH ptr_new()
- ZSYSVAR { !AXIS, TITLE: '', TYPE: 0L, STYLE: 0L, TICKS: 0L, TICKLEN: 0.000000, THICK: 0.000000, RANGE: [0.00000000D, 0.00000000D], CRANGE: [0.00000000D, 0.00000000D], S: [0.00000000D, 0.00000000D], MARGIN: [0.000000, 0.000000], OMARGIN: [0.000000, 0.000000], WINDOW: [0.000000, 0.000000], REGION: [0.000000, 0.000000], CHARSIZE: 0.000000, MINOR: 0L, TICKV: dblarr(60), TICKNAME: strarr(60), GRIDSTYLE: 0L, TICKFORMAT: strarr(10), TICKINTERVAL: 0.00000000D, TICKLAYOUT: 0L, TICKUNITS: strarr(10) }
- IM_DENSITY 0L
- PS_SCALE_FACTOR 0S
- WID 0L
- IM_TRANSPARENT 0B
- XSYSVAR { !AXIS, TITLE: '', TYPE: 0L, STYLE: 0L, TICKS: 0L, TICKLEN: 0.000000, THICK: 0.000000, RANGE: [0.00000000D, 0.00000000D], CRANGE: [0.00000000D, 0.00000000D], S: [0.00000000D, 0.00000000D], MARGIN: [0.000000, 0.000000], OMARGIN: [0.000000, 0.000000], WINDOW: [0.000000, 0.000000], REGION: [0.000000, 0.000000], CHARSIZE: 0.000000, MINOR: 0L, TICKV: dblarr(60), TICKNAME: strarr(60), GRIDSTYLE: 0L, TICKFORMAT: strarr(10), TICKINTERVAL: 0.00000000D, TICKLAYOUT: 0L, TICKUNITS: strarr(10) }
- IM_OPTIONS ''
- DRAWID 0L
- PMULTI [0L, 0L, 0L, 0L, 0L]
- YSYSVAR { !AXIS, TITLE: '', TYPE: 0L, STYLE: 0L, TICKS: 0L, TICKLEN: 0.000000, THICK: 0.000000, RANGE: [0.00000000D, 0.00000000D], CRANGE: [0.00000000D, 0.00000000D], S: [0.00000000D, 0.00000000D], MARGIN: [0.000000, 0.000000], OMARGIN: [0.000000, 0.000000], WINDOW: [0.000000, 0.000000], REGION: [0.000000, 0.000000], CHARSIZE: 0.000000, MINOR: 0L, TICKV: dblarr(60), TICKNAME: strarr(60), GRIDSTYLE: 0L, TICKFORMAT: strarr(10), TICKINTERVAL: 0.00000000D, TICKLAYOUT: 0L, TICKUNITS: strarr(10) }
- DELAY 0.000000
- PS_FONT 0S
- BACKGROUND ptr_new()
- PSYSVAR { !PLT, BACKGROUND: 0L, CHARSIZE: 0.000000, CHARTHICK: 0.000000, CLIP: lonarr(6), COLOR: 0L, FONT: 0L, LINESTYLE: 0L, MULTI: [0L, 0L, 0L, 0L, 0L], NOCLIP: 0L, NOERASE: 0L, NSUM: 0L, POSITION: [0.000000, 0.000000, 0.000000, 0.000000], PSYM: 0L, REGION: [0.000000, 0.000000, 0.000000, 0.000000], SUBTITLE: '', SYMSIZE: 0.000000, T: dblarr(4, 4), T3D: 0L, THICK: 0.000000, TITLE: '', TICKLEN: 0.000000, CHANNEL: 0L }
- PDF_PATH ''
- LASTWRITEDIR ''
- TITLE ''
- ERASEIT 0B
- PS_METRIC 0L
- PS_ENCAPSULATED 0L
- PDF_UNIX_CONVERT_CMD ''
- IM_RESIZE 0L
- EVENT_HANDLER ''
- TLB 0L
- STORAGE ptr_new()
- WASPECT 0.000000
- PS_QUIET 0S
- YOMARGIN [0.000000, 0.000000]
- B ptr_new()
- PS_DELETE 0L
Class description for cgWindow_Command
Properties
Properties in cgWindow_Command
- KEYWORDS init
- DESTROYOBJECTS init
- ALTPS_KEYWORDS init
- P1 init
- P2 init
- P3 init
- P4 init
- ALTPS_PARAMS init
- TYPE init
- COMMAND init
Fields
Fields in cgWindow_Command
- KEYWORDS ptr_new()
- DESTROYOBJECTS 0B
- NPARAMS 0S
- ALTPS_KEYWORDS ptr_new()
- P1 ptr_new()
- P2 ptr_new()
- P3 ptr_new()
- P4 ptr_new()
- ALTPS_PARAMS ptr_new()
- TYPE 0S
- COMMAND ''
Class description for cgWindow_ID
Fields
Fields in cgWindow_ID
- WID 0L
- WINDOWOBJ obj_new()
- TITLE ''
- TLB 0L
Author information
- Author
FANNING SOFTWARE CONSULTING:
David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com
- Copyright
Copyright (c) 2011, Fanning Software Consulting, Inc.
- History
Change History:
Separated from old cgWindow program 22 Jan 2012, by David W. Fanning. Fixed a typo in PackageCommand method that prevented extra keywords from being collectd. 26 Jan 2012. DWF. Fixed a problem with MULTI keyword. 31 Jan 2012. DWF. Added a COPY method. 7 Feb 2012. DWF. Fixed a problem with input filenames in the AutoRasterFile method. 22 Feb 2012. DWF. Modified Draw_Widget creation routine to account for events that were added in different versions of IDL. 23 Feb 2012. DWF. Added ability to use IM_WIDTH keyword to set the width of raster file output created with ImageMagick. 3 April 2012. DWF. Forgot to specify the GROUP_LEADER when calling cgPS_Open. Caused cgPS_Config to run though its block when cgWindow was called from a blocking widget program. 5 June 2012. DWF. Added the ability to save the file name and directory of the last output file, so that subsequent file saves can use that last name and directory as a starting default filename. 11 July 2012. DWF. In decompling cgWindow from cgCmdWindow, I accidentally named the WASPECT keyword ASPECT. Restored original name in this version. 13 July 2012. DWF. I added a new method, ReplaceEscapeSequences, that can evaluate escape sequences in string parameters and keywords to call the appropriate cgSymbol value at run-time. This eliminates the need for alternate keywords. 27 July 2012. DWF. Added WDestroyObjects keyword to destroy objects parameters, if needed. 11 November 2012. DWF. Not adding IM_WIDTH parameter from cgWindow_GetDefs. 19 November 2012. DWF. Modified ReplaceEscapeSequence method to use cgCheckForSymbols. 24 November 2012. DWF. Modified to allow keywords to turn off messages from cgPS_Open and cgPS_Close with keywords. 27 November 2012. DWF. The output filename was not specified correctly when making PDF file automatically. Fixed. 2 Dec 2012. DWF. Renamed the MULTI keyword to WMULTI, as it was suppose to be. 11 Feb 2013. DWF. Misspelled keyword in PackageCommand method. 21 February 2013. DWF. Modified GUI so there is only one Raster Image File choice, depending on if ImageMagick is installed. 21 May 2013. DWF. I made the IM_WIDTH field in the object a pointer, so it could remain an undefined variable, if necessary. 20 FEB 2014. DWF. Typo in the spelling of DESTROYOBJECTS when restoring a graphic visualization. Fixed. 20 Feb 2015. DWF.
Routines
result = cgCmdWindow::Init( [parent] [, AltPS_Keywords=string] [, AltPS_Params=IntArr(3)] [, Background=varies] [, /Button_Events] [, CmdDelay=float], Command=string [, /Drop_Events] [, /EraseIt] [, Event_Handler=string] [, Group_Leader=Group_Leader] [, /Keyboard_Events] [, /Method] [, /Motion_Events] [, OXMargin=float] [, OYMargin=float] [, P1=any] [, P2=any] [, P3=any] [, P4=any] [, /ReplaceCmd] [, Storage=any] [, /Tracking_Events] [, WAspect=float] [, /WDestroyObjects] [, /Wheel_Events] [, WMulti=intarr(5)] [, WTitle=string] [, WXPos=integer] [, WXSize=integer] [, WYPos=integer] [, WYSize=integer] [, _Extra=_Extra])
This method initializes the object that is at the heart of the Coyote Graphics system.
cgCmdWindowDrawRealize, drawID
This program is called when the draw widget is realized.
cgCmdWindowKillNotify, drawID
This program is called when the draw widget is destroyed.
cgCmdWindow::Cleanup
The cleanup method for the cgCmdWindow object.
cgWindow_Command::CreateCommandStruct [, structName] [, /Quiet]
This procedure builds a command structure and saves the structure to the main IDL level.
result = cgWindow_Command::Copy()
This procedure makes and returns a copy of a command object.
result = cgWindow_Command::Get_Keywords( [/HAS_KEYWORDS])
This procedure returns the keyword in a command object, if there are any keywords.
cgWindow_Command::Draw, SUCCESS=SUCCESS, KEYWORDS=KEYWORDS
result = cgWindow_Command::EvaluateKeywords(keywords [, /SUCCESS])
This method replaces stored keyword values with alternative keyword values, if they are available.
cgWindow_Command::List [, prefix]
This method lists the current command by printing a representation of the command in the command log window.
result = cgWindow_Command::ReplaceEscapeSequences(aString)
This method searches for escape sequences in text keywords and replaces them if necessary with the particular token from cgSymbol.
cgWindow_Command::Cleanup
The clean-up routine for the command object.
result = cgWindow_Command::INIT( [ALTPS_KEYWORDS=structure] [, ALTPS_PARAMS=structure], COMMAND=string [, /DESTROYOBJECTS] [, KEYWORDS=structure] [, P1=varies] [, P2=varies] [, P3=varies] [, P4=varies] [, TYPE=integer])
The initialization routine for the command object.
cgWindow_ID__Define
The structure definition module for structure that is stored on the window manager list.
cgCmdWindow_Cleanup, tlb
The clean-up method for the cgCmdWindow object.
cgWindow_Command__Define
The class definition module for the cgWindow_Command object.
cgCmdWindow::AddCommand, command [, INDEX=integer]
Adds a command object of class cgWINDOW_COMMAND to the command list maintained by the window.
cgCmdWindow::AutoPostScriptFile, filename
Provides a programmatic way to create a PostScript file from the window.
cgCmdWindow::AutoRasterFile, filetype, filename
Provides a programmatic way to create a raster file from the window.
cgCmdWindow::Copy [, DESTINATION=intarr(2)] [, EXTENT=intarr(2)] [, IMAGE=byte] [, ORIGIN=intarr(2)]
This method copies the contents of the draw widget to the current graphics window using the DEVICE COPY method.
cgCmdWindow::DrawWidgetConfig [, /Button_Events] [, /Drop_Events] [, Event_Handler=string] [, /Keyboard_Events] [, /Motion_Events] [, Storage=any] [, /Tracking_Events] [, /Wheel_Events]
This method allows you to turn draw widget events on and off and to set the name of an event handler procedure to accept these widget events.
cgCmdWindow::DrawWidgetEvents, event
This event handler processes draw widget events and sends the events to a user-defined event handler, if such and event handler exists.
cgCmdWindow::CreatePostScriptFile, event
Sends the window commands to a PostScript file.
cgCmdWindow::DeleteCommand [, cmdIndex] [, /ALL]
Deletes a command object from the command list maintained by the window.
cgCmdWindow_Dispatch_Events, event
All widget events come here and are dispatched to the proper object method.
cgCmdWindow::ExecuteCommands
This method executes the commands on the command list.
result = cgCmdWindow::GetCommandKeyword(keyword, cmdIndex [, /SUCCESS])
This method retrieves the value of a keyword from a particular command, if it can.
cgCmdWindow::GetProperty [, /ADJUSTSIZE] [, BACKGROUND=string] [, COMMANDS=COMMANDS] [, DELAY=float] [, DIMENSIONS=intarr(2)] [, /ERASEIT] [, IM_DENSITY=integer] [, IM_RESIZE=integer] [, IM_OPTIONS=string] [, /IM_RASTER] [, /IM_TRANSPARENT] [, /NOEXECUTECOMMANDS] [, MULTI=Intarr(5)] [, PALETTE=byte] [, PDF_PATH=string] [, PDF_UNIX_CONVERT_CMD=string] [, PS_CHARSIZE=float] [, /PS_DECOMPOSED] [, /PS_DELETE] [, /PS_ENCAPSULATED] [, PS_FONT=integer] [, /PS_METRIC] [, PS_SCALE_FACTOR=float] [, /PS_QUIET] [, PS_TT_FONT=string] [, TLB=long] [, STORAGE=STORAGE] [, WID=integer] [, XOMARGIN=intarr(2)] [, YOMARGIN=intarr(2)], _EXTRA=_EXTRA
This method retrieves properties from the object.
cgCmdWindow::InvalidateWidgetID
cgCmdWindow::ListCommand [, cmdIndex] [, CREATECOMMANDSTRUCT=structure]
This method lists the command indicated by the command index.
cgCmdWindow::LoadColors [, r] [, g] [, b] [, XCOLORS_DATA=structure]
This method loads color table vectors into the program.
cgCmdWindow::Output [, filename]
This method creates PostScript, PDF, BMP, GIF, JPEG, PNG, and TIFF file output from the pixmap window contents.
result = cgCmdWindow::PackageCommand(command [, p1] [, p2] [, p3] [, p4] [, /AddCmd] [, AltPS_Keywords=string] [, AltPS_Params=IntArr(3)] [, CmdIndex=integer], DestroyObjects=DestroyObjects [, /Execute] [, /Method] [, Multi=intarr(5)] [, /ReplaceCmd] [, _Extra=_Extra])
Packages the command up into a command object that can be added to the window or used to replace commands that are already in the window.
cgCmdWindow::ReplaceCommand, command [, cmdIndex] [, MULTI=intarr(5)]
This method replaces a command in the command list.
cgCmdWindow::Resize, x, y
This method resizes the graphics window and executes the commands again.
cgCmdWindow::SaveAsRaster, event
This event handler method saves the graphics window as a raster image file.
cgCmdWindow::RestoreCommands, filename
This method restores the commands from a specified file and loads them into the window.
cgCmdWindow::RestoreDataCoords
This method restores the current data coordinate system by restoring the system variable state from the last command execution.
cgCmdWindow::SaveCommands [, filename]
This method saves the commands from a cgWindow into a form that can be e-mailed to colleagues or restored to a cgWindow at some later time.
cgCmdWindow::SaveDataCoords
This method saves the current data coordinate system by saving all the plotting and mapping system variables after the commands have been executed in the program.
cgCmdWindow::SetProperty [, /ADJUSTSIZE] [, BACKGROUND=string] [, DELAY=float] [, DIMENSIONS=intarr(2)] [, /ERASEIT] [, IM_DENSITY=integer] [, IM_OPTIONS=string] [, /IM_RASTER] [, IM_RESIZE=integer] [, /IM_TRANSPARENT], IM_WIDTH=IM_WIDTH [, PDF_UNIX_CONVERT_CMD=string] [, PDF_PATH=string] [, PALETTE=byte] [, PS_CHARSIZE=float] [, /PS_DECOMPOSED] [, /PS_DELETE] [, /PS_ENCAPSULATED] [, PS_FONT=integer] [, /PS_METRIC] [, /PS_QUIET] [, PS_SCALE_FACTOR=float] [, PS_TT_FONT=string] [, /NOEXECUTECOMMANDS] [, MULTI=Intarr(5)] [, STORAGE=STORAGE] [, XOMARGIN=intarr(2)] [, YOMARGIN=intarr(2)] [, /UPDATE] [, WID=integer], _EXTRA=_EXTRA
This method sets properties of the window object.
cgCmdWindow::StoreObjectReference
This method saves the window object reference in a linked-list system variable.
cgCmdWindow__Define [, class]
The definition module for the cgCmdWindow object
Routine details
top cgCmdWindow::Init
result = cgCmdWindow::Init( [parent] [, AltPS_Keywords=string] [, AltPS_Params=IntArr(3)] [, Background=varies] [, /Button_Events] [, CmdDelay=float], Command=string [, /Drop_Events] [, /EraseIt] [, Event_Handler=string] [, Group_Leader=Group_Leader] [, /Keyboard_Events] [, /Method] [, /Motion_Events] [, OXMargin=float] [, OYMargin=float] [, P1=any] [, P2=any] [, P3=any] [, P4=any] [, /ReplaceCmd] [, Storage=any] [, /Tracking_Events] [, WAspect=float] [, /WDestroyObjects] [, /Wheel_Events] [, WMulti=intarr(5)] [, WTitle=string] [, WXPos=integer] [, WXSize=integer] [, WYPos=integer] [, WYSize=integer] [, _Extra=_Extra])
This method initializes the object that is at the heart of the Coyote Graphics system. It allows you to both configure the draw widget for events and to load a command into the command window.
Parameters
- parent in optional
The parent base widget for this draw widget object. If not defined, the program will create its own top-level base widget.
Keywords
- AltPS_Keywords in optional type=string
A structure containing alternative keyword names (as tags) and values for those keywords to be used when the current device is the PostScript device. See http://www.idlcoyote.com/cg_tips/kwexpressions.php and the examples below for details on how to use this keyword.
- AltPS_Params in optional type=IntArr(3)
A structure containing alternative parameter values to be used when the current device is the PostScript device. Structure names are restricted to the names "P1", "P2", "P3" and "P4"to correspond to the equivalent positional parameter. See http://www.idlcoyote.com/cg_tips/kwexpressions.php and the examples below for details on how to use this keyword.
- Background in optional type=varies default=!P.Background
The background color of the window. Specifying a background color automatically sets the WErase keyword.
- Button_Events in optional type=boolean
Set this keyword to turn button events on for the draw widget.
- CmdDelay in optional type=float
If this keyword is set to a value other than zero, there will be a delay of this many seconds between command execution. This will permit "movies" of command sequences to be displayed.
- Command in required type=string
The graphics procedure command to be executed. This parameter must be a string and the the command must be a procedure. Examples are 'Surface', 'Contour', 'Plot', 'cgPlot', cgContour, etc.
- Drop_Events in optional type=boolean
Set this keyword to turn drop events on for the draw widget.
- EraseIt in optional type=boolean default=0
Set this keyword to cause the window to be erased before graphics commands are drawn. This may need to be set, for example, to display images.
- Event_Handler in optional type=string
The name of an event handler procedure to accept events from the draw widget. Write the event handler procedure with two positional parameters. The first will be the event structure returned from the draw widget. The second will be the cgCmdWindow object reference (i.e., self) to allow you to manipulate the command window.
- Group_Leader in optional
The identifier of a widget to serve as a group leader for this program. If the group leader is destroyed, this program is also destroyed. Used when calling this program from another widget program.
- Keyboard_Events in optional type=boolean
Set this keyword to turn keyboard events on for the draw widget.
- Method in optional type=boolean default=0
Set this keyword if the command is an object method call rather than a procedure call. If this keyword is set, the first positional parameter, p1, must be present and must be a valid object reference.
- Motion_Events in optional type=boolean
Set this keyword to turn motion events on for the draw widget.
- OXMargin in optional type=float
A two-element array indicating the left and right X outside margins for the graphical display. Used only when doing multiple plots with
WMulti
.- OYMargin in optional type=float
A two-element array indicating the bottom and top Y outside margins for the graphical display. Used only when doing multiple plots with
WMulti
.- P1 in optional type=any
The first positional parameter appropriate for the graphics command.
- P2 in optional type=any
The second positional parameter appropriate for the graphics command.
- P3 in optional type=any
The third positional parameter appropriate for the graphics command.
- P4 in optional type=any
The fourth positional parameter appropriate for the graphics command.
- ReplaceCmd in optional type=boolean default=0
Set this keyword to replace a graphics command from an cgWindow. If CmdIndex is undefined, *all* commands in the window are replaced. Use WinID to identify the cgWindow you are interested in. If WinID is undefined, the last cgWindow created is used for the replacement.
- Storage in optional type=any
Any user-defined IDL variable will be stored in the object storage location. Defined here for convenience. Same as
Storage
keyword for the SetProperty method.- Tracking_Events in optional type=boolean
Set this keyword to turn tracking events on for the draw widget.
- WAspect in optional type=float default=normal
Set this keyword to the aspect ratio you would like the window to have. The aspect ratio is calculated as (ysize/xsize). Must be a float value. If this keyword is set, the window will maintain this aspect ratio, even when it is resized.
- WDestroyObjects in optional type=boolean default=0
If this keyword is set, and any of the input parameters p1-p4 is an object, the object parameter will be destroyed when the window is destroyed.
- Wheel_Events in optional type=boolean
Set this keyword to turn wheel events on for the draw widget.
- WMulti in optional type=intarr(5)
Set this keyword in exactly the same way you would set the !P.Multi keyword. It will allow you to display multi-plots in the cgWindow graphics window.
- WTitle in optional type=string default=Resizeable Graphics Window
The title of the graphics window if the program creates its own top-level base widget. A window index number is appended to the title so multiple cgWindow programs can be selected. Also used to register the widget program and as the title of the object when it is stored.
- WXPos in optional type=integer default=5
The x offset in device coordinates of the window from the upper-left corner of the display, if the program creates its own top-level base. Otherwise, this keyword is ignored.
- WXSize in optional type=integer default=640
The x size in device coordinates of the graphics window.
- WYPos in optional type=integer default=5
The y offset in device coordinates of the window from the upper-left corner of the display, if the program creates its own top-level base. Otherwise, this keyword is ignored.
- WYSize in optional type=integer default=512
The y size in device coordinates of the the graphics window.
- _Extra in optional
The "extra" keywords for the command that is being added to the window.
top cgCmdWindowDrawRealize
cgCmdWindowDrawRealize, drawID
This program is called when the draw widget is realized. The purpose is to find and set the window index number in the program, store the object reference on an external linked list so it can found again later, and to execute the loaded commands.
Parameters
- drawID in required
The widget identifier of the draw widget.
top cgCmdWindowKillNotify
cgCmdWindowKillNotify, drawID
This program is called when the draw widget is destroyed. The purpose is to clean up the object.
Parameters
- drawID in required
The widget identifier of the draw widget.
top cgWindow_Command::CreateCommandStruct
cgWindow_Command::CreateCommandStruct [, structName] [, /Quiet]
This procedure builds a command structure and saves the structure to the main IDL level. Its purpose is to allow the user to work with restored commands independently of the window interface.
Parameters
- structName in optional type=string default=cmd
The name of the command structure to be saved at the main IDL level.
Keywords
- Quiet in optional type=boolean
If set, the message indicated where the variable was saved and what its name is is not printed in the IDL command window.
top cgWindow_Command::Copy
result = cgWindow_Command::Copy()
This procedure makes and returns a copy of a command object.
top cgWindow_Command::Get_Keywords
result = cgWindow_Command::Get_Keywords( [/HAS_KEYWORDS])
This procedure returns the keyword in a command object, if there are any keywords.
Keywords
- HAS_KEYWORDS out optional type=boolean
If set to 1, the function returned keywords. If set to 0, there were no keywords in the command to return.
top cgWindow_Command::Draw
cgWindow_Command::Draw, SUCCESS=SUCCESS, KEYWORDS=KEYWORDS
Keywords
- SUCCESS
- KEYWORDS
top cgWindow_Command::EvaluateKeywords
result = cgWindow_Command::EvaluateKeywords(keywords [, /SUCCESS])
This method replaces stored keyword values with alternative keyword values, if they are available. The return variable is a list of the keywords with the alternative values substituted for the stored values.
Parameters
- keywords in required type=structure
The list of input keywords.
Keywords
- SUCCESS out optional type=boolean
If the command executed successfully, return a 1. Otherwise return a 0.
top cgWindow_Command::List
cgWindow_Command::List [, prefix]
This method lists the current command by printing a representation of the command in the command log window.
Parameters
- prefix in optional type=string
A prefix for the printed command (e.g., an index number, etc.).
top cgWindow_Command::ReplaceEscapeSequences
result = cgWindow_Command::ReplaceEscapeSequences(aString)
This method searches for escape sequences in text keywords and replaces them if necessary with the particular token from cgSymbol. To create an micrometer symbol, for example, you might specify an XTITLE keyword like this: XTITLE='Length ($\mu$M)'. The symbol name should be proceeded by a "$\" and ended with a "$".
Parameters
- aString in required
Either a scalar or array of strings, or a structure of keyword parameters. If a structure, then the ReplaceEscapeSequences method is called recursively.
top cgWindow_Command::Cleanup
cgWindow_Command::Cleanup
The clean-up routine for the command object.
top cgWindow_Command::INIT
result = cgWindow_Command::INIT( [ALTPS_KEYWORDS=structure] [, ALTPS_PARAMS=structure], COMMAND=string [, /DESTROYOBJECTS] [, KEYWORDS=structure] [, P1=varies] [, P2=varies] [, P3=varies] [, P4=varies] [, TYPE=integer])
The initialization routine for the command object.
Keywords
- ALTPS_KEYWORDS in optional type=structure
A structure of alternative keyword names and values to be used when the PostScript device is the current graphics device.
- ALTPS_PARAMS in optional type=structure
A structure of alternative parameters and values to be used when the PostScript device is the current graphics device.
- COMMAND in required type=string
The command that is being stored in the command object.
- DESTROYOBJECTS in optional type=boolean default=0
If this keyword is set, and any of the input parameters p1-p4 is an object, the object parameter will be destroyed when the window is destroyed.
- KEYWORDS in optional type=structure
A structure containing keyword:value pairs to be executed with the command.
- P1 in optional type=varies
The first positional parameter of the command being stored in the structure.
- P2 in optional type=varies
The second positional parameter of the command being stored in the structure.
- P3 in optional type=varies
The third positional parameter of the command being stored in the structure.
- P4 in optional type=varies
The fourth positional parameter of the command being stored in the structure.
- TYPE in optional type=integer default=0
The type of command. 0 indicates a procedure. 1 indicates an object method.
top cgWindow_ID__Define
cgWindow_ID__Define
The structure definition module for structure that is stored on the window manager list.
top cgCmdWindow_Cleanup
cgCmdWindow_Cleanup, tlb
The clean-up method for the cgCmdWindow object.
Parameters
- tlb
top cgWindow_Command__Define
cgWindow_Command__Define
The class definition module for the cgWindow_Command object.
top cgCmdWindow::AddCommand
cgCmdWindow::AddCommand, command [, INDEX=integer]
Adds a command object of class cgWINDOW_COMMAND to the command list maintained by the window.
Parameters
- command in required type=object
A command object of class cgWINDOW_COMMAND.
Keywords
- INDEX in optional type=integer
The index number of where the command should be added in the command list. The command is added to the end of the command list by default.
top cgCmdWindow::AutoPostScriptFile
cgCmdWindow::AutoPostScriptFile, filename
Provides a programmatic way to create a PostScript file from the window. Call by setting the CREATE_PS keyword with cgControl.
Parameters
- filename in required type=string
The name of the PostScript file to generate.
top cgCmdWindow::AutoRasterFile
cgCmdWindow::AutoRasterFile, filetype, filename
Provides a programmatic way to create a raster file from the window. Call by setting the create_png, etc. keyword with cgControl.
Parameters
- filetype in required type=string
The type of raster file (e.g., PNG, JPEG, etc.).
- filename in required type=string
The name of the output file.
top cgCmdWindow::Copy
cgCmdWindow::Copy [, DESTINATION=intarr(2)] [, EXTENT=intarr(2)] [, IMAGE=byte] [, ORIGIN=intarr(2)]
This method copies the contents of the draw widget to the current graphics window using the DEVICE COPY method. The DEVICE COPY command looks like this:
DEVICE, COPY=[origin[0], origin[1], extent[0], extent[1], destination[0], destination[1], self.wid]
Keywords
- DESTINATION in optional type=intarr(2)
A two-element array specifying the device coordinates of the lower-left corner of the copied region in the destination window. By default, [0,0].
- EXTENT in optional type=intarr(2)
A two-element array specifying the number of columns and rows to copy. If missing, the entire draw widget window is copied. By default, [!D.X_Size, !D.Y_Size].
- IMAGE out optional type=byte
Set this keyword to a named IDL variable that returns a copy of the draw widget contents as a band interleaved (MxNx3) image. If this keyword is set nothing is copied from the window.
- ORIGIN in optional type=intarr(2)
A two-element array specifying the device coordinates of the lower-left corner of region in the draw widget window to be copied. By default, [0,0].
top cgCmdWindow::DrawWidgetConfig
cgCmdWindow::DrawWidgetConfig [, /Button_Events] [, /Drop_Events] [, Event_Handler=string] [, /Keyboard_Events] [, /Motion_Events] [, Storage=any] [, /Tracking_Events] [, /Wheel_Events]
This method allows you to turn draw widget events on and off and to set the name of an event handler procedure to accept these widget events. An event handler procedure must be defined to get the events processed correctly.
Keywords
- Button_Events in optional type=boolean
Set this keyword to turn button events on for the draw widget.
- Drop_Events in optional type=boolean
Set this keyword to turn drop events on for the draw widget.
- Event_Handler in optional type=string
The name of an event handler procedure to accept events from the draw widget. Write the event handler procedure with two positional parameters. The first will be the event structure returned from the draw widget. The second will be the cgCmdWindow object reference (i.e., self) to allow you to manipulate the command window.
- Keyboard_Events in optional type=boolean
Set this keyword to turn keyboard events on for the draw widget.
- Motion_Events in optional type=boolean
Set this keyword to turn motion events on for the draw widget.
- Storage in optional type=any
Any user-defined IDL variable will be stored in the object storage location. Defined here for convenience. Same as
Storage
keyword for the SetProperty method.- Tracking_Events in optional type=boolean
Set this keyword to turn tracking events on for the draw widget.
- Wheel_Events in optional type=boolean
Set this keyword to turn wheel events on for the draw widget.
top cgCmdWindow::DrawWidgetEvents
cgCmdWindow::DrawWidgetEvents, event
This event handler processes draw widget events and sends the events to a user-defined event handler, if such and event handler exists. The event handler must be defined to accept two positional parameters. The first is the event structure returned by the draw widget, and the second is the cgCmdWindow object reference.
Parameters
- event in required type=structure
An event structure.
top cgCmdWindow::CreatePostScriptFile
cgCmdWindow::CreatePostScriptFile, event
Sends the window commands to a PostScript file.
Parameters
- event in required type=structure
An event structure.
top cgCmdWindow::DeleteCommand
cgCmdWindow::DeleteCommand [, cmdIndex] [, /ALL]
Deletes a command object from the command list maintained by the window.
Parameters
- cmdIndex in optional type=integer
The zero-based index of the command to delete. If undefined, the index of the last command in the window is used.
Keywords
- ALL in optional type=boolean
If set, all the commands in the command list are deleted.
top cgCmdWindow_Dispatch_Events
cgCmdWindow_Dispatch_Events, event
All widget events come here and are dispatched to the proper object method.
Parameters
- event in required type=structure
An event structure.
top cgCmdWindow::ExecuteCommands
cgCmdWindow::ExecuteCommands
This method executes the commands on the command list.
top cgCmdWindow::GetCommandKeyword
result = cgCmdWindow::GetCommandKeyword(keyword, cmdIndex [, /SUCCESS])
This method retrieves the value of a keyword from a particular command, if it can.
Parameters
- keyword in required type=string
The name of the keyword you would like to retrieve from the command.
- cmdIndex in required type=integer
The index number of the command you wish to retrieve the keyword from.
Keywords
- SUCCESS out optional type=boolean
If the program can successfully get the keyword, this variable will contain the value 1. Otherwise, it will contain the value 0.
top cgCmdWindow::GetProperty
cgCmdWindow::GetProperty [, /ADJUSTSIZE] [, BACKGROUND=string] [, COMMANDS=COMMANDS] [, DELAY=float] [, DIMENSIONS=intarr(2)] [, /ERASEIT] [, IM_DENSITY=integer] [, IM_RESIZE=integer] [, IM_OPTIONS=string] [, /IM_RASTER] [, /IM_TRANSPARENT] [, /NOEXECUTECOMMANDS] [, MULTI=Intarr(5)] [, PALETTE=byte] [, PDF_PATH=string] [, PDF_UNIX_CONVERT_CMD=string] [, PS_CHARSIZE=float] [, /PS_DECOMPOSED] [, /PS_DELETE] [, /PS_ENCAPSULATED] [, PS_FONT=integer] [, /PS_METRIC] [, PS_SCALE_FACTOR=float] [, /PS_QUIET] [, PS_TT_FONT=string] [, TLB=long] [, STORAGE=STORAGE] [, WID=integer] [, XOMARGIN=intarr(2)] [, YOMARGIN=intarr(2)], _EXTRA=_EXTRA
This method retrieves properties from the object.
Keywords
- ADJUSTSIZE out optional type=boolean
Set this keyword to adjust default character size to the display window size.
- BACKGROUND out optional type=string
The background color of the window. Only use if the ERASEIT property is also set.
- COMMANDS out optional
A list of the commands stored in the window.
- DELAY out optional type=float
Set this keyword to the amount of "delay" you want between commands in the command list.
- DIMENSIONS out optional type=intarr(2)
Set this keyword to a two-element array giving the xsize and ysize of the draw widget.
- ERASEIT out optional type=boolean
If this property is set, the cgWindow erases with the background color before displaying the commands in the window's command list.
- IM_DENSITY out optional type=integer default=300
Set this keyword to the sampling density when ImageMagick creates raster image file from PostScript outout.
- IM_RESIZE out optional type=integer default=25
Set this keyword to percentage that the raster image file created my ImageMagick from PostScript output should be resized.
- IM_OPTIONS out optional type=string
Set this keyword to any ImageMagick options you would like to pass along to the ImageMagick convert command when creating raster image files from PostScript output.
- IM_RASTER out optional type=boolean default=1
Set this keyword to zero to create raster files using the create_png etc. keywords directly, instead of via ImageMagick.
- IM_TRANSPARENT out optional type=boolean default=0
Set this keyword to allow ImageMagick to create transparent backgrounds when it makes raster image files from PostScript output.
- NOEXECUTECOMMANDS out optional type=boolean default=0
Set this keyword to 1 to prevent the window from executing the commands and to 0 if you want the window to execute the commands.
- MULTI out optional type=Intarr(5)
Set this keyword to the !P.MULTI setting you want to use for the window. !P.MULTI is set to this setting before command execution, and set back to it's default value when the commands are finished executing.
- PALETTE out optional type=byte
Use this keyword to pass in an N-by-3 (or 3-by-N) byte array containing the R, G, and B vectors of a color table. It is probably easier to use cgLoadCT or XCOLORS to load color tables for the window, but this is provided as another option.
- PDF_PATH out optional type=string
Set this keyword to the name of the path to the Ghostscript command for converting PS to PDF.
- PDF_UNIX_CONVERT_CMD out optional type=string
Set this keyword to the name of an alternative UNIX command to convert PostScript to PDF.
- PS_CHARSIZE out optional type=float
The PostScript character size.
- PS_DECOMPOSED out optional type=boolean default=0
Set this keyword to zero to set the PostScript color mode to indexed color and to one to set the PostScript color mode to decomposed color.
- PS_DELETE out optional type=boolean default=1
Set this keyword to zero if you want to keep the PostScript output ImageMagick creates when making raster file output.
- PS_ENCAPSULATED out optional type=boolean default=0
Set this keyword to configure cgPS_Config to produce encapsulated PostScript output by default.
- PS_FONT out optional type=integer
Set this keyword to the type of font you want to use in PostScript output. It sets the FONT keyword on the cgPS_Config command. Normally, 0 (hardware fonts) or 1 (true-type fonts).
- PS_METRIC out optional type=boolean default=0
Set this keyword to configure cgPS_Config to use metric values and A4 page size in its interface.
- PS_SCALE_FACTOR out optional type=float
Set his keyword to the PostScript scale factor you wish to use in creating PostScript output.
- PS_QUIET out optional type=boolean default=0
Set this keyword to set the QUIET keyword on cgPS_Open.
- PS_TT_FONT out optional type=string
Set this keyword to the name of a true-type font to use in creating PostScript output.
- TLB out optional type=long
The widget identifier of the top-level base widget.
- STORAGE out optional
An IDL variable that was defined and stored here by the program's user .
- WID out optional type=integer
The window index number of the draw widget.
- XOMARGIN out optional type=intarr(2)
Sets the !X.OMargin system variable when multiple plots are displayed in the window.
- YOMARGIN out optional type=intarr(2)
Sets the !Y.OMargin system variable when multiple plots are displayed in the window.
- _EXTRA
top cgCmdWindow::InvalidateWidgetIDprivate
cgCmdWindow::InvalidateWidgetID
top cgCmdWindow::ListCommand
cgCmdWindow::ListCommand [, cmdIndex] [, CREATECOMMANDSTRUCT=structure]
This method lists the command indicated by the command index. In the absence of the command index, all commands are listed.
Parameters
- cmdIndex in optional type=index
The index number of the command you wish to list. If not supplied, all the commands in the window are listed.
Keywords
- CREATECOMMANDSTRUCT out optional type=structure
Set to a named variable to return a command structure of this command.
top cgCmdWindow::LoadColors
cgCmdWindow::LoadColors [, r] [, g] [, b] [, XCOLORS_DATA=structure]
This method loads color table vectors into the program. The XCOLORS_DATA keyword is required to get color vector information from XCOLORS.
Parameters
- r in optional type=bytarr(256)
The red color vector.
- g in optional type=bytarr(256)
The green color vector.
- b in optional type=bytarr(256)
The blue color vector.
Keywords
- XCOLORS_DATA in optional type=structure
The information XColors sends to an object when colors are changed in XColors.
top cgCmdWindow::Output
cgCmdWindow::Output [, filename]
This method creates PostScript, PDF, BMP, GIF, JPEG, PNG, and TIFF file output from the pixmap window contents. The method assumes ImageMagick and Ghostscript are installed correctly.
Parameters
- filename in optional type=string default=idl.ps
The name of the output file. The type of file is determined from the file name extension.
top cgCmdWindow::PackageCommand
result = cgCmdWindow::PackageCommand(command [, p1] [, p2] [, p3] [, p4] [, /AddCmd] [, AltPS_Keywords=string] [, AltPS_Params=IntArr(3)] [, CmdIndex=integer], DestroyObjects=DestroyObjects [, /Execute] [, /Method] [, Multi=intarr(5)] [, /ReplaceCmd] [, _Extra=_Extra])
Packages the command up into a command object that can be added to the window or used to replace commands that are already in the window.
Return value
The command, packaged as a cgWindow_Command object, is returned.
Parameters
- command in required type=string
The graphics procedure command to be executed. This parameter must be a string and the the command must be a procedure. Examples are 'Surface', 'Contour', 'Plot', 'cgPlot', cgContour, etc.
- p1 in optional type=any
The first positional parameter appropriate for the graphics command.
- p2 in optional type=any
The second positional parameter appropriate for the graphics command.
- p3 in optional type=any
The third positional parameter appropriate for the graphics command.
- p4 in optional type=any
The fourth positional parameter appropriate for the graphics command.
Keywords
- AddCmd in optional type=boolean default=0
Set this keyword to add the packaged command to the command list.
- AltPS_Keywords in optional type=string
A structure containing alternative keyword names (as tags) and values for those keywords to be used when the current device is the PostScript device. See http://www.idlcoyote.com/cg_tips/kwexpressions.php and the examples below for details on how to use this keyword.
- AltPS_Params in optional type=IntArr(3)
A structure containing alternative parameter values to be used when the current device is the PostScript device. Structure names are restricted to the names "P1", "P2", "P3" and "P4" to correspond to the equivalent positional parameter. See http://www.idlcoyote.com/cg_tips/kwexpressions.php and the examples below for details on how to use this keyword.
- CmdIndex in optional type=integer
The command list index. This is used when adding or replacing a command. If the command index is undefined when replacing a command, all the commands in the command list are replaced with the command that is being added. If the command index is undefined when adding a command, the command is added to the end of the command list.
- DestroyObjects
- Execute in optional type=boolean default=0
Set this keyword is you want to execute the commands in the command list as soon as the current command is added to the list. Otherwise, no command execution takes place.
- Method in optional type=boolean default=0
Set this keyword if the command is an object method call rather than a procedure call. If this keyword is set, the first positional parameter, p1, must be present and must be a valid object reference.
- Multi in optional type=intarr(5)
A replacement value to assign to the self.pmulti value. It is a way to reset multiple command plotting to single command plotting for a new single command. Like calling: object -> SetPropery, MULTI=multi. Used only if
ReplaceCmd
is set.- ReplaceCmd in optional type=boolean default=0
Set this keyword to replace a graphics command with this packaged command on the command list If
CmdIndex
is undefined, *all* the commands on the command list are replaced.- _Extra in optional
Any extra keywords are collected by keyword inheritance for the command structure.
top cgCmdWindow::ReplaceCommand
cgCmdWindow::ReplaceCommand, command [, cmdIndex] [, MULTI=intarr(5)]
This method replaces a command in the command list. If cmdIndex is missing, all the commands in the command list are replaced by this command.
Parameters
- command in required type=object
The new command object.
- cmdIndex in optional type=integer
The index number of the "command" to replace. If absent, then all the current commands are replaces with this new command.
Keywords
- MULTI in optional type=intarr(5)
A replacement value to assign to the self.pmulti value. It is a way to reset multiple command plotting to single command plotting for a new single command. Like calling: object -> SetPropery, MULTI=multi.
top cgCmdWindow::Resize
This method resizes the graphics window and executes the commands again.
Parameters
- x in required type=integer
The new X size of the draw widget in device coordinates.
- y in required type=integer
The new Y size of the draw widget in device coordinates.
top cgCmdWindow::SaveAsRaster
cgCmdWindow::SaveAsRaster, event
This event handler method saves the graphics window as a raster image file. PDF files also pass through here.
Parameters
- event in required type=structure
The event structure.
top cgCmdWindow::RestoreCommands
cgCmdWindow::RestoreCommands, filename
This method restores the commands from a specified file and loads them into the window.
Parameters
- filename in required type=string
The name of the file containing the cgWindow commands that were previously saved.
top cgCmdWindow::RestoreDataCoords
cgCmdWindow::RestoreDataCoords
This method restores the current data coordinate system by restoring the system variable state from the last command execution.
top cgCmdWindow::SaveCommands
cgCmdWindow::SaveCommands [, filename]
This method saves the commands from a cgWindow into a form that can be e-mailed to colleagues or restored to a cgWindow at some later time.
Parameters
- filename in optional type=string default=commands.cgs
The name of the file where the cgWindow commands are to be saved.
top cgCmdWindow::SaveDataCoords
cgCmdWindow::SaveDataCoords
This method saves the current data coordinate system by saving all the plotting and mapping system variables after the commands have been executed in the program.
top cgCmdWindow::SetProperty
cgCmdWindow::SetProperty [, /ADJUSTSIZE] [, BACKGROUND=string] [, DELAY=float] [, DIMENSIONS=intarr(2)] [, /ERASEIT] [, IM_DENSITY=integer] [, IM_OPTIONS=string] [, /IM_RASTER] [, IM_RESIZE=integer] [, /IM_TRANSPARENT], IM_WIDTH=IM_WIDTH [, PDF_UNIX_CONVERT_CMD=string] [, PDF_PATH=string] [, PALETTE=byte] [, PS_CHARSIZE=float] [, /PS_DECOMPOSED] [, /PS_DELETE] [, /PS_ENCAPSULATED] [, PS_FONT=integer] [, /PS_METRIC] [, /PS_QUIET] [, PS_SCALE_FACTOR=float] [, PS_TT_FONT=string] [, /NOEXECUTECOMMANDS] [, MULTI=Intarr(5)] [, STORAGE=STORAGE] [, XOMARGIN=intarr(2)] [, YOMARGIN=intarr(2)] [, /UPDATE] [, WID=integer], _EXTRA=_EXTRA
This method sets properties of the window object.
Keywords
- ADJUSTSIZE in optional type=boolean
Set this keyword to adjust default character size to the display window size.
- BACKGROUND in optional type=string
The background color of the window. Only use if the ERASEIT property is also set.
- DELAY in optional type=float
Set this keyword to the amount of "delay" you want between commands in the command list.
- DIMENSIONS in optional type=intarr(2)
Set this keyword to a two-element array giving the xsize and ysize of the draw widget.
- ERASEIT in optional type=boolean
If this property is set, the cgWindow erases with the background color before displaying the commands in the window's command list.
- IM_DENSITY in optional type=integer default=300
Set this keyword to the sampling density when ImageMagick creates raster image file from PostScript outout.
- IM_OPTIONS in optional type=string
Set this keyword to any ImageMagick options you would like to pass along to the ImageMagick convert command when creating raster image files from PostScript output.
- IM_RASTER in optional type=boolean default=1
Set this keyword to zero to create raster files using the create_png etc. keywords directly, instead of via ImageMagick.
- IM_RESIZE in optional type=integer default=25
Set this keyword to percentage that the raster image file created my ImageMagick from PostScript output should be resized.
- IM_TRANSPARENT in optional type=boolean default=0
Set this keyword to allow ImageMagick to create transparent backgrounds when it makes raster image files from PostScript output.
- IM_WIDTH
- PDF_UNIX_CONVERT_CMD out optional type=string
Set this keyword to the name of an alternative UNIX command to convert PostScript to PDF.
- PDF_PATH out optional type=string
Set this keyword to the name of the path to the Ghostscript command for converting PS to PDF.
- PALETTE in optional type=byte
Use this keyword to pass in an N-by-3 (or 3-by-N) byte array containing the R, G, and B vectors of a color table. It is probably easier to use cgLoadCT or XCOLORS to load color tables for the window, but this is provided as another option.
- PS_CHARSIZE in optional type=float
The PostScript character size.
- PS_DECOMPOSED in optional type=boolean default=0
Set this keyword to zero to set the PostScript color mode to indexed color and to one to set the PostScript color mode to decomposed color.
- PS_DELETE in optional type=boolean default=1
Set this keyword to zero if you want to keep the PostScript output ImageMagick creates when making raster file output.
- PS_ENCAPSULATED in optional type=boolean default=0
Set this keyword to configure cgPS_Config to produce encapsulated PostScript output by default.
- PS_FONT in optional type=integer
Set this keyword to the type of font you want to use in PostScript output. It sets the FONT keyword on the cgPS_Config command. Normally, 0 (hardware fonts) or 1 (true-type fonts).
- PS_METRIC in optional type=boolean default=0
Set this keyword to configure cgPS_Config to use metric values and A4 page size in its interface.
- PS_QUIET in optional type=boolean default=0
Set this keyword to set the QUIET keyword on cgPS_Open.
- PS_SCALE_FACTOR in optional type=float
Set his keyword to the PostScript scale factor you wish to use in creating PostScript output.
- PS_TT_FONT in optional type=string
Set this keyword to the name of a true-type font to use in creating PostScript output.
- NOEXECUTECOMMANDS in optional type=boolean default=0
Set this keyword to 1 to prevent the window from executing the commands and to 0 if you want the window to execute the commands.
- MULTI in optional type=Intarr(5)
Set this keyword to the !P.MULTI setting you want to use for the window. !P.MULTI is set to this setting before command execution, and set back to it's default value when the commands are finished executing.
- STORAGE in optional
A storage location for any kind of IDL variable. This functions like a user value in a widget program.
- XOMARGIN in optional type=intarr(2)
Sets the !X.OMargin system variable when multiple plots are displayed in the window.
- YOMARGIN in optional type=intarr(2)
Sets the !Y.OMargin system variable when multiple plots are displayed in the window.
- UPDATE in optional type=boolean default=1
Set this keyword to zero if you do not want the updates to be done immediately after the properties are changed.
- WID in optional type=integer
The draw window index number. Not to be used by the user. Used by the draw widget Notify_Realize callback routine when the draw widget is realized.
- _EXTRA
top cgCmdWindow::StoreObjectReference
cgCmdWindow::StoreObjectReference
This method saves the window object reference in a linked-list system variable.
File attributes
Modification date: | Fri Mar 27 11:07:39 2015 |
Lines: | 3,166 |
Docformat: | rst rst |