Programmer Guide/Shell Items/Graph/GRAPH Messages: Difference between revisions

From STX Wiki
Jump to navigationJump to search
Line 24: Line 24:
  GRAPH <var>graphitemname</var> DATASETLOADED <var>inputName</var>
  GRAPH <var>graphitemname</var> DATASETLOADED <var>inputName</var>


The <code>DATASETLOADED</code> 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 <var>inputName</var> identifies the data which has loaded and is a combination of the input (<code>X</code> or <code>Y</code>) and the input index (e.g. <code>Y0</code> for the first Y input).
The <code>DATASETLOADED</code> 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 <var>inputName</var> identifies the data which has loaded and is a combination of the input (<code>X</code> or <code>Y</code>) and the input index (e.g. <code>Y0</code> for the first Y input, <code>Y1</code> for the second Y input and so on).


==KEY==
==KEY==

Revision as of 12:32, 31 October 2012

The following messages are sent by graph items.

Context Menu
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 &quote;copy/print…&quote; item was selected, the graph does not generate a message but displays the standard copy/print dialog instead.
Printing
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).
Activation
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).
Mouse 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.
Keyboard
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 Keyname Parameter Values 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.

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

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).

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 Keyname Parameter Values 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.

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).

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).

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 by the user (clicked on).

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