GRAPH Messages

From STX Wiki
Jump to navigationJump to search
Graph Item
INTRODUCTION NEW SET ATTRIBUTES MESSAGES EXAMPLES

The following messages are sent by graph items.

Context Menu

CMITEM

GRAPH graphitemname CMITEM menuitem

This message is generated if a context menu item (right mouse click) was selected. The parameter menuitem is the (zero-based) index of the selected menu item. Note: unlike dialogs, the graphs do not send a CMSTAT message, since only one context menu can be added to each graph. If the copy/print ... item was selected, the graph does not generate a message but displays the standard copy/print dialog instead

Background Data Loading

DATASETLOADED

GRAPH graphitemname DATASETLOADED inputName

The DATASETLOADED message is sent by a graph when the data for a particular graph input has been successfully loaded. The message was implemented because data is now loaded in a separate thread. The inputName identifies the data which has loaded and is a combination of the input (X or Y) and the input index (e.g. Y0 for the first Y input, Y1 for the second Y input and so on).

Keyboard

KEY

GRAPH graphitemname KEY keycode keyname

The key message is generated by the active graph when a (non-system) key is pressed. See DIALOG and DISPLAY item messages for message parameters details. See KEY message parameters for the format of keycode.

Some special keys (e.g. cursor keys) may be processed by the graph. For details about the configuration of keyboard handling read the description of the command SET GRAPH.

Graph Activation

RESTORE

GRAPH graphitemname RESTORE par

This message is generated when a graph is activated (becomes the current graph in the display). The parameter par is meaningless (and normally set to 0). You can programatically set the active graph using the SET display GRAPH command.

Printing

STOP

GRAPH graphitemname STOP par

If a copy/print process (initiated via a command or the copy/print dialog) has finished, the graph sends a STOP message to the shell. The parameter par is meaningless (and normally set to 0).

Mouse Wheel

WHEEL

GRAPH graphitem WHEEL wheelcode delta control shift left right

The wheel message is generated by the active graph when the position of the mouse wheel has been changed. See DIALOG and DISPLAY item messages for message parameters details.

Cursor Messages

CURSORSELECTED

GRAPH graphitemname CURSORSELECTED 1|2

The CURSORSELECTED message is sent when the first (1) or second (2) cursor is selected.

CURSORDESELECTED

GRAPH graphitemname CURSORDESELECTED cursorID

The CURSORDESELECTED message is sent when the first (cursorID=1) or second (cursorID=2) cursor is deselected.

Metasegments messages

The following messages are generated and sent to the containing graph when metasegments are manipulated.

The following parameter has the same meaning for all metasegment messages:

msindex The current index of the metasegment generating the message. This can be used to access the metasegment's properties. The index is only valid until the next time a metasegment is generated, updated or deleted!

MSCOMMAND

GRAPH graphitemname MSCOMMAND msindex

The MSCOMMAND message is generated when a metasegment is double-clicked.

MSDESELECT

GRAPH graphitemname MSDESELECT msindex

The MSDESELECT message is generated when a selected metasegment is deselected.

MSRESIZING

GRAPH graphitemname MSRESIZING msindex 

The MSRESIZING message is sent by a graph whilst a metasegment is being resized. This can be useful, for example, for changing the metasegment's text whilst resizing is taking place (e.g. displaying the changing coordinates).

This does not affect the MSUPDATE message, which is sent by a graph when a metasegment has finished being resized.

MSSELECT

GRAPH graphitemname MSSELECT msindex

The MSSELECT message is generated when a metasegments is selected (i.e. clicked upon) by the user and sends the index (see !SEGMENTS) of the selected metasegment.

MSUPDATE

GRAPH graphitemname MSUPDATE msindex

The MSUPDATE message is generated when a metasegment is resized or moved by the user. The message is sent once resizing has finished (i.e. the left mouse button is released).

Selection messages

SELECTIONACTIVATED

GRAPH graphitemname SELECTIONACTIVATED id

The SELECTIONACTIVATED message is sent when an inactive selection is activated by the user. The id identifies the selection in the graph graphitemname.

SELECTIONCHANGED

GRAPH graphitemname SELECTIONCHANGED id

The SELECTIONCHANGED message is sent when the shape of a selection is changed by the user.The id identifies the selection in the graph graphitemname.

SELECTIONDEACTIVATED

GRAPH graphitemname SELECTIONDEACTIVATED id modified

The SELECTIONDEACTIVATED message is sent when an active selection is deactivated by the user. The id identifies the selection in the graph graphitemname. The value of modified is 1 if the selection has been modified since it was last set (see the SELECTION SET command), otherwise it is 0.

Navigation menu

Personal tools