visit Kofax web site

SPGuiDisp.h File Reference


Detailed Description

SignWare Dynamic Development toolkit, display a signature.

Author:
uko
Display a signature in a window. The functions declared in this header are not yet implemented for Linux. An SPGuiDisp object creates a client window and displays the signature within this client window. It supports Standard window properties.
The functions declared in this header are not yet implemented for Linux.

The signature to be displayed is taken either from an SPSignature object (see SPGuiDispSetSignature) or from an SPImage object (see SPGuiDispSetImage). Additionally, weighted frames (see SPGuiDispSetWeightedFrames) and split lines (see SPGuiDispSetSplitLines) can be displayed.

Supported properties

The table below lists all supported Properties.

Name Default Range Description
"BackgroundColor" 0xFFFFFF Background color, format 0xrrggbb, rr: red, gg: green, bb: blue
"ForegroundColor" 0x000000 Foreground color, format 0xrrggbb, rr: red, gg: green, bb: blue
"FramesColor" 0xFF0000 Frames color, format 0xrrggbb, rr: red, gg: green, bb: blue, see @ref SPGuiDispSetWeightedFrames
"RectangleColor" 0x000000 Border color, format 0xrrggbb, rr: red, gg: green, bb: blue, see @ref SPGuiDispSetWeightedFrames
"PenThickness" 127 1 ... 255 Pen thickness, 1: thin, 255 bold pen
"ScrBorder" 5 0 ... 255 Size of the border in pixel
"SplitsColor" 0xFF0000 Split lines color, format 0xrrggbb, rr: red, gg: green, bb: blue, see @ref SPGuiDispSetSplitLines
"EraseBackground" false SPBOOL erase the background, see SP_ERASE_BACKGROUND for details
"WindowBorder" false SPBOOL Draw a border around the window, see SP_DRAW_HWND_BORDER for details
"TabletBorder" false SPBOOL Draw a border around the tablet, see SP_DRAW_TABLET_BORDER for details
"DrawBuffered" false SPBOOL double buffer the screen image, see SP_DRAW_BUFFERED for details
"JavaDrawInPanel" false SPBOOL only Java: the application also paints in the panel which hosts the SPGuiDisp object


Functions

SPINT32 __cdecl SPGuiDispCreate (pSPGUIDISP_T *ppSPGuiDisp, SPHWND hwndParent)
 Create an SPGuiDisp object (window).
SPINT32 __cdecl SPGuiDispCreateInClient (pSPGUIDISP_T *ppSPGuiDisp, SPHWND hwndClient, SPHWND hwndParent)
 Create an SPGuiDisp object embedded in a client window.
SPINT32 __cdecl SPGuiDispFree (pSPGUIDISP_T *ppSPGuiDisp)
 Free all resources used by an SPGuiDisp object.
SPINT32 SPGuiDispGetBackgroundColor (pSPGUIDISP_T pSPGuiDisp, SPINT32 *piBackgroundColor)
 Get the background color.
SPINT32 __cdecl SPGuiDispGetBoolProperty (pSPGUIDISP_T pSPGuiDisp, const SPCHAR *pszName, SPBOOL *pbValue)
 Set a property.
SPINT32 SPGuiDispGetBorder (pSPGUIDISP_T pSPGuiDisp, SPINT32 *piBorder)
 Get the size of the border of an SPGuiDisp object.
SPINT32 __cdecl SPGuiDispGetDrawMode (pSPGUIDISP_T pSPGuiDisp, SPINT32 *piDrawMode)
 Get the draw mode of an SPGuiDisp object.
SPINT32 SPGuiDispGetForegroundColor (pSPGUIDISP_T pSPGuiDisp, SPINT32 *piForegroundColor)
 Get the foreground color.
SPINT32 __cdecl SPGuiDispGetHwnd (pSPGUIDISP_T pSPGuiDisp, SPHWND *pHwnd)
 Get the window handle of the window associated with an SPGuiDisp object.
SPINT32 __cdecl SPGuiDispGetImage (pSPGUIDISP_T pSPGuiDisp, pSPIMAGE_T *ppImage)
 Get the image that is displayed by an SPGuiDisp object.
SPINT32 __cdecl SPGuiDispGetIntProperty (pSPGUIDISP_T pSPGuiDisp, const SPCHAR *pszName, SPINT32 *piValue)
 Set a property.
SPINT32 __cdecl SPGuiDispGetSignature (pSPGUIDISP_T pSPGuiDisp, pSPSIGNATURE_T *ppSignature)
 Get the signature that is displayed by an SPGuiDisp object.
SPINT32 __cdecl SPGuiDispNew (pSPGUIDISP_T *ppSPGuiDisp)
 Create an SPGuiDisp object (window).
SPINT32 SPGuiDispSetBackgroundColor (pSPGUIDISP_T pSPGuiDisp, SPINT32 iBackgroundColor)
 Set the background color.
SPINT32 __cdecl SPGuiDispSetBoolProperty (pSPGUIDISP_T pSPGuiDisp, const SPCHAR *pszName, SPBOOL bValue)
 Set a property.
SPINT32 SPGuiDispSetBorder (pSPGUIDISP_T pSPGuiDisp, SPINT32 iBorder)
 Set the size of the border of an SPGuiDisp object.
SPINT32 __cdecl SPGuiDispSetClient (pSPGUIDISP_T pSPGuiDisp, SPHWND hwndClient, SPHWND hwndParent)
 Create the visual components of a SPGuiDisp object embedded in a client window.
SPINT32 __cdecl SPGuiDispSetDrawMode (pSPGUIDISP_T pSPGuiDisp, SPINT32 iDrawMode)
 Set the draw mode of an SPGuiDisp object.
SPINT32 SPGuiDispSetForegroundColor (pSPGUIDISP_T pSPGuiDisp, SPINT32 iForegroundColor)
 Set the foreground color.
SPINT32 __cdecl SPGuiDispSetImage (pSPGUIDISP_T pSPGuiDisp, pSPIMAGE_T pImage)
 Let an SPGuiDisp object display an image.
SPINT32 __cdecl SPGuiDispSetIntProperty (pSPGUIDISP_T pSPGuiDisp, const SPCHAR *pszName, SPINT32 iValue)
 Set a property.
SPINT32 __cdecl SPGuiDispSetSignature (pSPGUIDISP_T pSPGuiDisp, pSPSIGNATURE_T pSignature)
 Let an SPGuiDisp object display a signature.
SPINT32 __cdecl SPGuiDispSetSplitLines (pSPGUIDISP_T pSPGuiDisp, SPINT32 *pSplitPositions, SPINT32 iNumSplitPositions)
 Let an SPGuiDisp object display split lines.
SPINT32 __cdecl SPGuiDispSetWeight (pSPGUIDISP_T pSPGuiDisp, SPDOUBLE dWeight)
 Set the maximum weight of frames to be displayed by an SPGuiDisp object.
SPINT32 __cdecl SPGuiDispSetWeightedFrames (pSPGUIDISP_T pSPGuiDisp, pSP_WEIGHTED_FRAME_T pFrames, SPINT32 iNumFrames)
 Let an SPGuiDisp object display weighted frames.


Function Documentation

SPINT32 __cdecl SPGuiDispCreate pSPGUIDISP_T ppSPGuiDisp,
SPHWND  hwndParent
 

Create an SPGuiDisp object (window).

Parameters:
ppSPGuiDisp [o] pointer to a variable that will be filled with a pointer to the new SPGuiDisp object. The caller is responsible for deallocating the new object by calling SPGuiDispFree.
hwndParent [i] window handle of the parent window.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispFree
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispCreateInClient pSPGUIDISP_T ppSPGuiDisp,
SPHWND  hwndClient,
SPHWND  hwndParent
 

Create an SPGuiDisp object embedded in a client window.

Parameters:
ppSPGuiDisp [o] pointer to a variable that will be filled with a pointer to the new SPGuiDisp object. The caller is responsible for deallocating the new object by calling SPGuiDispFree.
hwndClient [i] window handle of the window that will be subclassed to add the SPGuiDisp functionality.
hwndParent [i] Window handle of the parent window.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispFree
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispFree pSPGUIDISP_T ppSPGuiDisp  ) 
 

Free all resources used by an SPGuiDisp object.

The SPGuiDisp object must have been created by SPGuiDispCreate or SPGuiDispCreateInClient.

Parameters:
ppSPGuiDisp [io] pointer to a variable containing a pointer to an SPGuiDisp object. The variable will be set to NULL if this function succeeds.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispCreate, SPGuiDispCreateInClient
Todo:
Implement for Linux

SPINT32 SPGuiDispGetBackgroundColor pSPGUIDISP_T  pSPGuiDisp,
SPINT32 piBackgroundColor
 

Get the background color.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
piBackgroundColor [i] pointer to a variable that will be filled with the background color (see SPGuiDispSetBackgroundColor for details).
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispGetForegroundColor, SPGuiDispSetBackgroundColor
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispGetBoolProperty pSPGUIDISP_T  pSPGuiDisp,
const SPCHAR pszName,
SPBOOL pbValue
 

Set a property.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
pszName [i] Name of the property, see SPGuiDisp Properties
pbValue [i] pointer to avariable that will be filled with the value of the property
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
Todo:
Implement for Linux

SPINT32 SPGuiDispGetBorder pSPGUIDISP_T  pSPGuiDisp,
SPINT32 piBorder
 

Get the size of the border of an SPGuiDisp object.

By default, the border size is 5 pixels.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
piBorder [o] pointer to a variable that will be filled with the border size (in screen pixels).
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispSetBorder
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispGetDrawMode pSPGUIDISP_T  pSPGuiDisp,
SPINT32 piDrawMode
 

Get the draw mode of an SPGuiDisp object.

The tablet area may be smaller than the window area because the tablet area will be zoomed to maintain the aspect ratio of the tablet hardware.

Note:
Use SPGuiDispGetBoolProperty instead
Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
piDrawMode [i] pointer to a variable that will be filled with draw mode:
Operating Systems:
Windows (Win32)
See also:
SP_DRAW_TABLET_BORDER, SP_DRAW_HWND_BORDER, SP_ERASE_BACKGROUND, SP_DRAW_BUFFERED

SPGuiDispGetBoolProperty

Todo:
Implement for Linux

SPINT32 SPGuiDispGetForegroundColor pSPGUIDISP_T  pSPGuiDisp,
SPINT32 piForegroundColor
 

Get the foreground color.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
piForegroundColor [i] pointer to a variable that will be filled with the foreground color (see SPGuiDispSetForegroundColor for details).
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispGetBackgroundColor, SPGuiDispSetForegroundColor
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispGetHwnd pSPGUIDISP_T  pSPGuiDisp,
SPHWND pHwnd
 

Get the window handle of the window associated with an SPGuiDisp object.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
pHwnd [o] pointer to a variable that will be filled with the window handle that is associated with the SPGuiDisp object.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispCreate, SPGuiDispCreateInClient
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispGetImage pSPGUIDISP_T  pSPGuiDisp,
pSPIMAGE_T ppImage
 

Get the image that is displayed by an SPGuiDisp object.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
ppImage [o] pointer to a variable that will be filled with a pointer to a copy of the image displayed by an SPGuiDisp (ie, set by SPGuiDispSetImage). The caller is responsible for deallocating the new object by calling SPImageFree.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispSetImage, SPImageFree
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispGetIntProperty pSPGUIDISP_T  pSPGuiDisp,
const SPCHAR pszName,
SPINT32 piValue
 

Set a property.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
pszName [i] Name of the property, see SPGuiDisp Properties
piValue [i] pointer to avariable that will be filled with the value of the property
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispGetSignature pSPGUIDISP_T  pSPGuiDisp,
pSPSIGNATURE_T ppSignature
 

Get the signature that is displayed by an SPGuiDisp object.

This function is similar to SPSignatureCreateFromGuiDisp, usage of which is recommended.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
ppSignature [o] pointer to a variable that will be filled with a pointer to a copy of the signature displayed by an SPGuiDisp (ie, set by SPGuiDispSetSignature). The caller is responsible for deallocating the new object by calling SPSignatureFree.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispSetSignature, SPSignatureCreateFromGuiDisp, SPSignatureFree
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispNew pSPGUIDISP_T ppSPGuiDisp  ) 
 

Create an SPGuiDisp object (window).

SPGuiDispNew creates the native object, but does not instantiate any visual components.
Call SPGuiDispSetClient to create the visual components.

Note:
The calling sequence SPGuiDispNew and SPGuiDispSetClient equals the call SPGuiDispCreate or SPGuiDispCreateInClient
Parameters:
ppSPGuiDisp [o] pointer to a variable that will be filled with a pointer to the new SPGuiDisp object. The caller is responsible for deallocating the new object by calling SPGuiDispFree.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispSetClient, SPGuiDispFree
Todo:
Implement for Linux

SPINT32 SPGuiDispSetBackgroundColor pSPGUIDISP_T  pSPGuiDisp,
SPINT32  iBackgroundColor
 

Set the background color.

The background color is used to draw a pen stroke that has minimum pressure. It will also be used to erase the background if SP_ERASE_BACKGROUND is set.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
iBackgroundColor [i] the new background color as integer 0xrrggbb with bb = blue, gg = green, rr = red, each color being in the range 0 through 0xff.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispGetBackgroundColor, SPGuiDispSetForegroundColor
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispSetBoolProperty pSPGUIDISP_T  pSPGuiDisp,
const SPCHAR pszName,
SPBOOL  bValue
 

Set a property.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
pszName [i] Name of the property, see SPGuiDisp Properties
bValue [i] the value of the property
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
Todo:
Implement for Linux

SPINT32 SPGuiDispSetBorder pSPGUIDISP_T  pSPGuiDisp,
SPINT32  iBorder
 

Set the size of the border of an SPGuiDisp object.

By default, the border size is 5 pixels.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
iBorder [i] the new border size (in screen pixels).
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispGetBorder
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispSetClient pSPGUIDISP_T  pSPGuiDisp,
SPHWND  hwndClient,
SPHWND  hwndParent
 

Create the visual components of a SPGuiDisp object embedded in a client window.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object, may be null.
hwndClient [i] window handle of the window that will be subclassed to add the SPGuiDisp functionality.
hwndParent [i] Window handle of the parent window.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispFree
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispSetDrawMode pSPGUIDISP_T  pSPGuiDisp,
SPINT32  iDrawMode
 

Set the draw mode of an SPGuiDisp object.

The tablet area may be smaller than the window area because the tablet area will be zoomed to maintain the aspect ratio of the tablet hardware.

Note:
Use SPGuiDispSetBoolProperty instead
Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
iDrawMode [i] the new draw mode:
Operating Systems:
Windows (Win32)
See also:
SP_DRAW_TABLET_BORDER, SP_DRAW_HWND_BORDER, SP_ERASE_BACKGROUND, SP_DRAW_BUFFERED

SPGuiDispSetBoolProperty

Todo:
Implement for Linux

SPINT32 SPGuiDispSetForegroundColor pSPGUIDISP_T  pSPGuiDisp,
SPINT32  iForegroundColor
 

Set the foreground color.

The foreground color is used to draw a pen stroke that has maximum pressure.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
iForegroundColor [i] the new foreground color as integer 0xrrggbb with bb = blue, gg = green, rr = red, each color being in the range 0 through 0xff.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispGetForegroundColor, SPGuiDispSetBackgroundColor
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispSetImage pSPGUIDISP_T  pSPGuiDisp,
pSPIMAGE_T  pImage
 

Let an SPGuiDisp object display an image.

This function makes a copy of the image; modifying the SPImage object after calling this function won't have an effect on the SPGuiDisp object.

This function overrides the signature set with SPGuiDispSetImage.

Any weighted frames or split linew will be reset.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
pImage [i] pointer to an SPImage object or NULL to display neither a signature nor an image.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispGetImage, SPGuiDispSetSignature, SPGuiDispSetSplitLines, SPGuiDispSetWeightedFrames
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispSetIntProperty pSPGUIDISP_T  pSPGuiDisp,
const SPCHAR pszName,
SPINT32  iValue
 

Set a property.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
pszName [i] Name of the property, see SPGuiDisp Properties
iValue [i] the value of the property
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispSetSignature pSPGUIDISP_T  pSPGuiDisp,
pSPSIGNATURE_T  pSignature
 

Let an SPGuiDisp object display a signature.

This function makes a copy of the signature; modifying the SPSignature object after calling this function won't have an effect on the SPGuiDisp object.

This function overrides the image set with SPGuiDispSetImage.

Any weighted frames or split linew will be reset.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
pSignature [i] pointer to an SPSignature object or NULL to display neither a signature nor an image.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispGetSignature, SPGuiDispSetImage, SPGuiDispSetSplitLines, SPGuiDispSetWeightedFrames, SPSignatureCreateFromGuiDisp
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispSetSplitLines pSPGUIDISP_T  pSPGuiDisp,
SPINT32 pSplitPositions,
SPINT32  iNumSplitPositions
 

Let an SPGuiDisp object display split lines.

This function makes a copy of the array of split positions; modifying the array after calling this function won't have an effect on the SPGuiDisp object.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
pSplitPositions [i] pointer to an array of integers, one for each split position. Split positions are X coordinates of possible word boundaries.
iNumSplitPositions [i] number of values in the array pointed to by pSplitPositions. Pass 0 to not display split lines.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispSetImage, SPGuiDispSetSignature, SPGuiDispSetWeightedFrames, SPImageGetSplitPositions
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispSetWeight pSPGUIDISP_T  pSPGuiDisp,
SPDOUBLE  dWeight
 

Set the maximum weight of frames to be displayed by an SPGuiDisp object.

Frames having a weight greater than the maximum weight won't be displayed. The default value for the maximum weight is 0.5. SPGuiDispSetWeightedFrames resets the maximum weight to 0.5.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
dWeight [i] the new maximum weight
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispSetWeightedFrames
Todo:
Implement for Linux

SPINT32 __cdecl SPGuiDispSetWeightedFrames pSPGUIDISP_T  pSPGuiDisp,
pSP_WEIGHTED_FRAME_T  pFrames,
SPINT32  iNumFrames
 

Let an SPGuiDisp object display weighted frames.

This function makes a copy of the array of weighted frames; modifying the array after calling this function won't have an effect on the SPGuiDisp object.

This function resets the maximum weight to 0.5.

Parameters:
pSPGuiDisp [i] pointer to an SPGuiDisp object.
pFrames [i] pointer to an array of SPWeightedFrame objects.
iNumFrames [i] number of objects in the array pointed to by pFrames. Pass 0 to not display weighted frames.
Returns:
SP_NOERR on success, else error code:
Operating Systems:
Windows (Win32)
See also:
SPGuiDispSetImage, SPGuiDispSetSignature, SPGuiDispSetSplitLines, SPGuiDispSetWeight, SPImageGetFrames
Todo:
Implement for Linux