Sysquake Instances

This section describes functions related to Sysquake instances, i.e. particular SQ files loaded in Sysquake. Public handlers permit to execute code in the context of another instance, to get or change its variables and to trigger an update of its figures.

sqcall

Execute a public handler.

Syntax

xdataOut = sqcall(id, name, xdataIn)

Description

sqcall(id,name,xdataIn) executes the public handler whose name is given by the string name in the context of the SQ file instance identified by id. The third input argument, if provided, can be retrieved with _xdata in the public handler. The output argument of sqcall is the value assigned to _xdata in the public handler declaration. Draw handlers are called to update the graphics.

sqcurrentinstance

Get the ID of the current SQ file instance.

Syntax

id = sqcurrentinstance

Description

sqcurrentinstance gives the ID of the current SQ file instance.

See also

sqinstances

sqguicmd

Execute a Sysquake GUI command.

Syntax

sqguicmd(cmd)
b = sqguicmd(cmd, 'enabled')
b = sqguicmd(cmd, 'checkmark')
sqguicmd(id, ...)

Description

sqguicmd(cmd) executes a Sysquake GUI command identified by string cmd. Sysquake GUI commands are commands available in the application graphical user interface (GUI), typically in the menus. sqguicmd can be used when alternative GUI controls are added (e.g. buttons in the figure), or when standard menus are not displayed.

sqguicmd(cmd, 'enabled') or sqguicmd(cmd, 'e') returns true if the command is enabled, or false if it is disabled.

sqguicmd(cmd, 'checkmark') or sqguicmd(cmd, 'c') returns true if the command should be displayed with a checkmark (option set), or false otherwise (option not set or plain action without state).

The target of sqguicmd is the SQ file instance where the handler which calls sqguicmd is defined. It is also possible to specify it with the instance ID as an initial numeric argument, for instance for code executed from the command-line interface.

Here is the list of commands.

cmdMenu
file/reset File > Reset Data
action/manipulate Figure > Manipulate
action/zoom Figure > Zoom
action/zoom-x Figure > Zoom X
action/drag Figure > Drag
action/select Figure > Select
scale/locked Figure > Locked Scale
scale/zoom-in -
scale/zoom-out -
scale/zoom-x-in -
scale/zoom-x-out -
scale/log-x Figure > Log X
scale/log-y Figure > Log Y
scale/db-y Figure > dB Y
3d/perspective Figure > Perspective
3d/auto-target Figure > Automatic View > Target
3d/auto-view-point Figure > Automatic View > View Point
3d/auto-up-vector Figure > Automatic View > Up Vector
scale-sync/no Figure > Scale Sync > No
scale-sync/x Figure > Scale Sync > X Axis
scale-sync/y Figure > Scale Sync > Y Axis
scale-sync/xy Figure > Scale Sync > Both Axes
scale-sync/select Figure > Scale Sync > Select Group
figure/frame Figure > Options > Frame
figure/margin Figure > Options > Margin
figure/label Figure > Options > Label
figure/legend Figure > Options > Legend
grid/no Figure > Grids > None
grid/basic Figure > Grids > Basic
grid/full Figure > Grids > Full
grid/x Figure > Grids > X Grid
grid/y Figure > Grids > Y Grid
grid/z Figure > Grids > Z Grid
sq/idle-processing Figure > Idle Processing
sq/sandbox Figure > Sandbox
layout/free Layout > Free
layout/fixed Layout > Fixed
layout/1x1 Layout > 1x1
layout/1x2 Layout > 1x2
etc.  
layout/4x4 Layout > 4x4

Remarks: the sandbox mode cannot be switched off. If it is active, the command is disabled. Otherwise, it would be a way to escape from the sandbox.

Commands scale/zoom-in etc. do not correspond to menu items in Sysquake. They have the same effect as a single click in the middle of the figure when the manipulation mode is Zoom or Zoom X Axis without or with the Shift key held down, respectively.

See also

sqcurrentinstance, sqinstances, sqselect

sqinstances

Get the IDs of all SQ file instances.

Syntax

idvec = sqinstances

Description

sqinstances gives a vector of IDs of all SQ file instances.

See also

sqcurrentinstance

sqinstancetitle

Get the title of an SQ file instance.

Syntax

str = sqinstancetitle(id)

Description

sqinstancetitle gives the title string of the SQ file instance specified by id.

See also

sqinstances

sqselect

Select the specified subplots in the current SQ file instance.

Syntax

sqselect(S)
S = sqselect

Description

sqselect(S) selects the subplots in the current SQ file instance whose indices are specified in array S. Indices correspond to the elements of subplots.

With an output argument, sqselect returns the current set of selected subplots.

See also

subplots, sqguicmd


Copyright 2005-2015, Calerga.
All rights reserved.