CGraphSetup

From STX Wiki
Jump to navigationJump to search




CGRAPHSETUP

This macro (or the static functions of the class CGraphSetup) implements functions to start the graphics setup dialog and to load global graphics settings.



DIALOG

Starts the graphics setup dialog with the specified profile.

Usage:

CGRAPHSETUP DIALOG [ profile ]

Parameters:
profile
The name of graphics profile (color scheme). If not specified, then the color scheme 'DEFAULT' is used.
Result:

The name of profile selected in the dialog.



GETSETTINGS

Loads the graphics profile and initializes the shell graphics settings variables with the specified color scheme data.

Usage:

CGRAPHSETUP GETSETTINGS [ profile ]

Parameters:
profile
The name of graphics profile (if not specified DEFAULT is used).
Result:

None.

Notes:

Graphics settings variables. These shell variables are set by the function.

variable name description
DCSET The name of the screen color table.
PCSET The name of the printer color table.
DCPAL The name of the screen palette table.
PCPAL The name of the printer palette table.
GGFONTTITLE The graph title font definition.
GGFONTAXIS The axis title font definition.
GGFONTLABELS The labels font definition.
GGFONTMARKER The segment marker font definition.
GGMINORXTICKS The number of minor ticks on the x scale.
GGMINORYTICKS The number of minor ticks on the y scale.
GGMAJORSIZE The size of the major ticks in pixels.
GGMINORSIZE The size of the minor ticks in pixels.
GGLINESTYLES The line styles (style1 width1 ... style5 width5).


The palette tables are extended tables with the three fields R, G and B. Each entry defines one palette color.


The color tables are simple tables with four entries containing the following color definitions:

$#colortable[0] textbackgroundcolor plotbackgroundcolor
$#colortable[1] scalecolor labelscolor titlecolor gridcolor markerscolor
$#colortable[2] linecolor1 ... linecolor5
$#colortable[3] activecursorcolor inactivecursorcolor




IMPORT

Import a color scheme into the STx Workspace file.

Usage:

CGRAPHSETUP IMPORT [ profile ] [ ; file ]

Parameters:
profile
The name of graphics profile (color scheme). If not specified, then the color scheme 'DEFAULT' is used.
file
The path to the file to import. If no file is supplied, the user is prompted to select a file from disk.



EXPORT

Export a color scheme into the STx Workspace file.

Usage:

CGRAPHSETUP EXPORT [ profile ] [ ; file ]

Parameters:
profile
The name of graphics profile (color scheme). If not specified, then the color scheme 'DEFAULT' is used.
file
The path to the file to export to. If no file is supplied, the user is prompted to select a location to export to on disk.



GETPROFILELIST

Retrieve a list of color profiles defined in the STx INI file.

Usage:

CGRAPHSETUP GETPROFILELIST

Result:

A simple table with one entry per profile containing the profile name.



GRAPHLEGEND

The CGRAPHSETUP command GRAPHLEGEND displays an amplitude legend in a spectrogram plot.

Usage:

CGRAPHSETUP GRAPHLEGEND cmd ; graphItem [ ; xmin xmax ymin ymax ]

Parameters:
cmd
One of the keywords ADD or REMOVE.
graphItem
The id of a graph item containing a spectrogram plot
xmin, xmax, ymin, ymax
The position at which to display the legend. This is optional. If it is not specified, the legend is displayed at the right hand side of the graph.
Result:

None.



GETCOLORPALETTE

Retrieve a profile's color palette as an extended table.

Usage:

CGRAPHSETUP GETCOLORPALETTE profile [ type ]

Parameters:
profile
The name of graphics profile (color scheme). If the profile does not exist, an empty table is returned.
type
One of the following values:
screen - the screen palette is returned (default).
print - the print palette is returned.
Result:

An extended table with three fields (R, G, and B) containing the color palette.

Array

Navigation menu

Personal tools