SPGuiContainer.h File Reference
Detailed Description
SignWare Dynamic Development toolkit, container for SPGui-Objects.
- Author:
- uko
The functions declared in this header are not yet implemented for Linux.
SPGuiContainer
The container may hold one or more SignWare Gui (SPGuiAcqu or SPGuiDisp) objects. The container includes a layout manager to display the objects horizontally tiled, vertically tiled or stacked.Access to the contained objects is granted, however the container returns references to the objects rather than copies. This means that the application must not free object references.
Callbacks / event notifications are normally redirected from the capture object to the container, and then to the application.
Callbacks are called from the windows message event thread for the associated native window handle.
Do not free the SPContainer object within a callback method.
If the application registers notifications directly in the SPGuiAcqu object then the container will not be called but the application is directly called from the SPGuiAcqu event handlers.
If the application should be called from SPGuiContainer event handling then
- do not register event listeners (do not call SPGUiAcquSetButtonListener, SPGUiAcquSetStatusListener, SPGUiAcquSetTimeoutListener
- pass NULL as event listener(s) for SPGuiAcquRegisterRect, SPGuiAcquRegisterRect2
- use SPGuiAcquSetTimeout2, do not use SPGuiAcquSetTimeout
SPGuiContainer uses indices to address the contained objects. However the indices may change when removing objects (SPGuiContainerObjectFree). The container inherits an object property "ObjectId", the application may use this property to identify each object.
SPGuiContainer uses Windows messages to synchronize communication from several threads. The message id range from WM_USER + 0x7BA0 (0x7FA0) to WM_USER + 0x7BAF (0x7FAF), please assure that the application does not conflict with the above message Id's.
Supported properties
The table below lists all supported Properties.
Name | Default | Range | Description |
---|---|---|---|
"BackgroundColor" | 0xFFFFFF | SPINT32 | Background color, format 0xrrggbb, rr: red, gg: green, bb: blue |
"RectangleColor" | 0x000000 | SPINT32 | Frame color, format 0xrrggbb, rr: red, gg: green, bb: blue |
"ScrBorder" | 5 | 0 ... 255 | Size of the border in pixel |
"WindowBorder" | false | SPBOOL | Draw a border around the window |
"EraseBackground" | false | SPBOOL | Erase the background of the window |
"Layout" | SPGUICONTAINER_TILED_VERT | SPINT32 | Define the layout |
"JavaDrawInPanel" | false | SPBOOL | only Java: the application also paints in the panel which hosts the SPGuiContainer object |
Defines | |
#define | SPGUICONTAINER_GUIACQU 1 |
#define | SPGUICONTAINER_GUIDISP 2 |
#define | SPGUICONTAINER_GUIDYN 3 |
#define | SPGUICONTAINER_STACKED 3 |
#define | SPGUICONTAINER_TILED_HORZ 1 |
#define | SPGUICONTAINER_TILED_VERT 2 |
Typedefs | |
typedef int(_cdecl * | pSPGUICONTAINERBUTTONLISTENER_T )(pSPGUICONTAINER_T spContainer, SPINT32 iIndex, SPINT32 iButtonId, SPINT32 iPress) |
Callback function that is called when a hardware button is pressed on the tablet. | |
typedef int(_cdecl * | pSPGUICONTAINERLINETOLISTENER_T )(pSPGUICONTAINER_T pSpGuiContainer, SPINT32 iIndex, SPINT32 iX, SPINT32 iY, SPINT32 iPress, SPINT32 iTime) |
Callback function that is called for each vector. | |
typedef int(_cdecl * | pSPGUICONTAINEROBJRECTLISTENER_T )(pSPGUICONTAINER_T spContainer, SPINT32 iIndex, SPUINT32 uDocumentId, SPUINT32 uRectId) |
Callback function that is called when a virtual button (registered rectangle) is 'clicked' which is assignedto a ocument. | |
typedef int(_cdecl * | pSPGUICONTAINERRECTLISTENER_T )(pSPGUICONTAINER_T spContainer, SPINT32 iIndex, SPUINT32 uId) |
Callback function that is called when a virtual button (registered rectangle) is 'clicked'. | |
typedef int(_cdecl * | pSPGUICONTAINERSTATUSLISTENER_T )(pSPGUICONTAINER_T spContainer, SPINT32 iIndex, int iMajor, int iDetail) |
Callback function that is called when the tablet hardware status changes, please read tablet status change notifications for more details. | |
typedef int(_cdecl * | pSPGUICONTAINERTIMEOUTLISTENER_T )(pSPGUICONTAINER_T spContainer, int iIndex) |
Callback function that is called when a timeout occurs. | |
Functions | |
SPINT32 __cdecl | SPGuiContainerAddObject (pSPGUICONTAINER_T pSPGuiContainer, SPINT32 iObjectType) |
Create an SPGui object in the SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerCreate (pSPGUICONTAINER_T *ppSPGuiContainer) |
Create an SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerCreateObject (pSPGUICONTAINER_T pSPGuiContainer, SPINT32 iIndex, SPINT32 iObjectType) |
Create an SPGui object in the SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerFree (pSPGUICONTAINER_T *ppSPGuiContainer) |
Free an SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerFreeObject (pSPGUICONTAINER_T pSPGuiContainer, SPINT32 iIndex) |
Free an SPGui object in the SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerGetBoolProperty (pSPGUICONTAINER_T pSPGuiContainer, const SPCHAR *pszName, SPBOOL *pbValue) |
Query a property. | |
SPINT32 __cdecl | SPGuiContainerGetHwnd (pSPGUICONTAINER_T pSPGuiContainer, SPHWND *pHwnd) |
Get the window handle of the window associated with an SPGuiContainer object. | |
SPINT32 __cdecl | SPGuiContainerGetIntProperty (pSPGUICONTAINER_T pSPGuiContainer, const SPCHAR *pszName, SPINT32 *piValue) |
Query a property. | |
SPINT32 __cdecl | SPGuiContainerGetNumberObjects (pSPGUICONTAINER_T pSPGuiContainer, SPINT32 *piNumberObjects) |
Query the number of objects in this container. | |
SPINT32 __cdecl | SPGuiContainerGetObject (pSPGUICONTAINER_T pSPGuiContainer, SPINT32 iIndex, SPVPTR *ppObject, SPINT32 *piObjectType) |
Query an SPGui object in the SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerGetUserLong (pSPGUICONTAINER_T pSPGuiContainer, SPVPTR *pUser) |
Get a long variable in SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerObjectGetHwnd (pSPGUICONTAINER_T pSPGuiContainer, SPINT32 iIndex, SPHWND *pHwnd) |
Query the native window handle of an object embedded in SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerObjectGetType (pSPGUICONTAINER_T pSPGuiContainer, SPINT32 iIndex, SPINT32 *piType) |
Query the type of an object embedded in SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerSetActive (pSPGUICONTAINER_T pSPGuiContainer, SPINT32 iIndex) |
Set the active object embedded in SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerSetBoolProperty (pSPGUICONTAINER_T pSPGuiContainer, const SPCHAR *pszName, SPBOOL bValue) |
Set a property. | |
SPINT32 __cdecl | SPGuiContainerSetClient (pSPGUICONTAINER_T pSPGuiContainer, SPHWND hChild, SPHWND hParent) |
Create the visible components of a SPGuiContainer object. | |
SPINT32 __cdecl | SPGuiContainerSetDocumentListener (pSPGUICONTAINER_T pSpGuiContainer, pSPGUICONTAINEROBJRECTLISTENER_T pDocumentCallback) |
Set a vector listener in this object. | |
SPINT32 __cdecl | SPGuiContainerSetIntProperty (pSPGUICONTAINER_T pSPGuiContainer, const SPCHAR *pszName, SPINT32 iValue) |
Set a property. | |
SPINT32 __cdecl | SPGuiContainerSetListener (pSPGUICONTAINER_T pSPGuiContainer, pSPGUICONTAINERTIMEOUTLISTENER_T aTimeoutCallback, pSPGUICONTAINERSTATUSLISTENER_T aStatusCallback, pSPGUICONTAINERRECTLISTENER_T aRectCallback, pSPGUICONTAINERBUTTONLISTENER_T aButtonCallback) |
Register event listeners in this container. | |
SPINT32 __cdecl | SPGuiContainerSetUserLong (pSPGUICONTAINER_T pSPGuiContainer, SPVPTR pUser) |
Set a long variable in SPGuiContainer. | |
SPINT32 __cdecl | SPGuiContainerSetVectorListener (pSPGUICONTAINER_T pSpGuiContainer, pSPGUICONTAINERLINETOLISTENER_T pVectorCallback) |
Set a vector listener in this object. |
Define Documentation
|
Type identifyer for a SPGuiAcqu object (pSPGUIACQU_T) |
|
Type identifyer for a SPGuiDisp object (pSPGUIDISP_T) |
|
Type identifyer for a SPGuiDyn object (pSPGUIDYN_T) |
|
Type identifyer for stacked layout |
|
Type identifyer for horizontally tiled layout |
|
Type identifyer for vertically tiled layout |
Typedef Documentation
|
Callback function that is called when a hardware button is pressed on the tablet. A pointer to a function that is called to notify the application about a hardware tablet button being pressed during acquiry mode.
|
|
Callback function that is called for each vector. A pointer to a function that is called for every significant vector (sample) received from the tablet in acquiry mode.
|
|
Callback function that is called when a virtual button (registered rectangle) is 'clicked' which is assignedto a ocument.
|
|
Callback function that is called when a virtual button (registered rectangle) is 'clicked'.
|
|
Callback function that is called when the tablet hardware status changes, please read tablet status change notifications for more details. A pointer to a function that is called to notify the application about tablet hardware status changes.
|
|
Callback function that is called when a timeout occurs. A pointer to a function that is called to notify the application about a timeout condition during acquiry mode.
|
Function Documentation
|
Create an SPGui object in the SPGuiContainer. Create a Signware GUI object and insert it at the last position of the containers object list.
|
|
Create an SPGuiContainer. SPGuiContainerCreate creates the native object without visual components. Call SPGuiContainerSetClient to create the visual components.
|
|
Create an SPGui object in the SPGuiContainer. Create a Signware GUI object at the specified zero based index in the containers object list.
|
|
Free an SPGuiContainer. Close the native window and free all associated resources.
|
|
Free an SPGui object in the SPGuiContainer. Destroy and release a Signware GUI object at the specified zero based index in the containers object list.
|
|
Query a property.
|
|
Get the window handle of the window associated with an SPGuiContainer object. For an SPGuiContainer object created with SPGuiContainerSetClient, this function returns the handle of the client window.
|
|
Query a property.
|
|
Query the number of objects in this container.
|
|
Query an SPGui object in the SPGuiContainer. Query a Signware GUI object at the specified zero based index in the containers object list.
|
|
Get a long variable in SPGuiContainer.
|
|
Query the native window handle of an object embedded in SPGuiContainer.
|
|
Query the type of an object embedded in SPGuiContainer.
|
|
Set the active object embedded in SPGuiContainer.
|
|
Set a property.
|
|
Create the visible components of a SPGuiContainer object. If hChild is a valid window handle then SPGuiContainer subclasses the native window identified by hChild. It uses this window to draw the embedded objects. If hChild is a not valid window handle then SPGuiContainer creates a native window.
|
|
Set a vector listener in this object.
|
|
Set a property.
|
|
Register event listeners in this container.
|
|
Set a long variable in SPGuiContainer.
|
|
Set a vector listener in this object.
|