I_SNAPSHOT

Save/restore an input window’s controls

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall I_SNAPSHOT(D_COPY|D_LOAD, window_id, snapshot, [length], [record]
&     [, a_methoddata1, ..., a_methoddata20])

D_COPY

Copy the current controls. (n)

D_LOAD

Load previously copied controls. (n)

window_id

The ID of the input window. (n)

snapshot

The snapshot information field. (a)

length

(optional) The returned length of the snapshot information. (n)

record

(optional) The structure data for redisplaying the fields on a D_LOAD operation. (a)

a_methoddata1 through a_methoddata20

(optional) Up to 20 additional data arguments. (any)

I_SNAPSHOT enables you to “take a picture” of the input window’s controls, then restore them at a later time. The information that is saved/restored includes the following:

Additionally, on a D_LOAD (restore) operation, the fields can be redisplayed according to their cleared states. This is done by passing record, which will be used as the structure data for all input sets. If record is not passed, the display will not be affected.

This subroutine is useful in conjunction with I_SETDEL, as it can restore fields that had been previously deleted from a set.

I_SNAPSHOT has the following limitations:

A_methoddata1 through a_methoddata20 are up to 20 additional optional arguments that can be passed to I_SNAPSHOT. I_ SNAPSHOT, in turn, passes them directly to %IDISPLAY_METHOD. This allows you to communicate additional information to your display method.

The following example copies the current input window control information for the window identified by inpid into the field inpinfo, and returns the length of that information in infolen.

xcall i_snapshot(D_COPY, inpid, inpinfo, infolen)

The next example resets the same input window to its state at the time that the D_COPY operation in the first example occurred.

xcall i_snapshot(D_LOAD, inpid, inpinfo(1:infolen))

The example for I_SETDEL also shows the I_SNAPSHOT subroutine being used. (See the I_SETDEL Examples for more information.).