SPBackgroundObjects.h File Reference
Detailed Description
SignWare Dynamic Development toolkit, background descriptor container.
- Author:
- uko
SPBackgroundObjects hold background descriptors for different tablets, the methods SPAcquireSetBackgroundObjects and SPGuiAcquSetBackgroundObjects will select and copy the descriptor that matches the active tablet.
The matching algorithm differs between tablets with (external) LCD and tablets without LCD:
- Tablets with external LCD
- Search tabletname_(LcdWidth)x(LcdHeight) equals descriptorname
- Search tabletname equals descriptorname
- Search 'LCD' equals descriptorname
- Search 'Default' equals descriptorname
- Tablets without external LCD
- Search tabletname equals descriptorname
- Search 'NonLCD' equals descriptorname
- Search 'Default' equals descriptorname
Please see SPSignware XML Document Type Description for a full description of all background elements
Example: typical BackgroundObjects-File
<?xml version="1.0" encoding="UTF-8"?> <SPSWDeviceFields> <!-- Description for Wacom Signpad STU-520 --> <SPSWDevice Device="Wacom SIGNPAD_800x480"> <SPSWObjects> <!-- text line: sign here --> <SPSWTextFields> <SPSWText ALignment="0" DrawFlags="3" Group="TGN" Format="2" Caption="Sign here" Foreground="0x800000"> <SPSWCoordinate Origin="Tablet" Left="150" Right="300" Top="780" Bottom="860"/> <SPSWFont Face="Helvetica" Size="0" Flags="1"/> </SPSWText> </SPSWTextFields> <!-- pass the background image --> <SPSWImageFields> <SPSWImage DrawFlags="3" Format="1"> eink_800x480.bmp <SPSWCoordinate Origin="tablet" Left="0" Top="0" Right="1000" Bottom="1000" /> </SPSWImage> </SPSWImageFields> <!-- Overwrite OK button --> <SPSWVirtualButtonFields> <SPSWVirtualButton DrawFlags="3" Background="0xff00" id="1"> <SPSWCoordinate Origin="tablet" Left="25" Top="900" Right="325" Bottom="980" /> <SPSWText Caption="OK" DrawFlags="3" Group="ButtonGroup"> <SPSWFont Face="Helvetica" Size="0" /> </SPSWText> </SPSWVirtualButton> <!-- Overwrite Erase button --> <SPSWVirtualButton DrawFlags="3" Background="0x808080" id="2"> <SPSWCoordinate Origin="tablet" Left="350" Top="900" Right="650" Bottom="980" /> <SPSWText Caption="Erase" DrawFlags="3" Group="ButtonGroup"> <SPSWFont Face="Helvetica" Size="0" /> </SPSWText> </SPSWVirtualButton> <!-- Overwrite Cancel button --> <SPSWVirtualButton DrawFlags="3" Background="0xff0000" id="3"> <SPSWCoordinate Origin="tablet" Left="675" Top="900" Right="975" Bottom="980" /> <SPSWText Caption="Cancel" DrawFlags="3" Group="ButtonGroup"> <SPSWFont Face="Helvetica" Size="0" /> </SPSWText> </SPSWVirtualButton> </SPSWVirtualButtonFields> <!-- Tablet options, STU-520 supports penwidth --> <SPSWTabletOption Screen="off" Tablet="on" Image="optimized" PenWidth="170"> <SPSWCoordinate origin="Tablet" left="0" right="1000" top="0" bottom="890" /> </SPSWTabletOption> </SPSWObjects> </SPSWDevice> <!-- Description for Wacom Signpad STU-500 --> <SPSWDevice Device="Wacom SIGNPAD_640x480"> <SPSWObjects> <!-- Text line: sign here --> <SPSWTextFields> <SPSWText ALignment="0" DrawFlags="3" Group="TGN" Format="2" Caption="Sign here" > <SPSWCoordinate Origin="Tablet" Left="150" Right="300" Top="780" Bottom="860"/> <SPSWFont Face="Helvetica" Size="0" Flags="1"/> </SPSWText> </SPSWTextFields> <!-- pass the background image --> <SPSWImageFields> <SPSWImage DrawFlags="3" Format="1"> eink_640x480.bmp <SPSWCoordinate Origin="tablet" Left="0" Top="0" Right="1000" Bottom="1000" /> </SPSWImage> </SPSWImageFields> <!-- Overwrite OK button --> <SPSWVirtualButtonFields> <SPSWVirtualButton DrawFlags="3" id="1"> <SPSWCoordinate Origin="tablet" Left="25" Top="900" Right="325" Bottom="980" /> <SPSWText Caption="OK" DrawFlags="3" Group="ButtonGroup"> <SPSWFont Face="Helvetica" Size="0" /> </SPSWText> </SPSWVirtualButton> <!-- Overwrite Erase button --> <SPSWVirtualButton DrawFlags="3" id="2"> <SPSWCoordinate Origin="tablet" Left="350" Top="900" Right="650" Bottom="980" /> <SPSWText Caption="Erase" DrawFlags="3" Group="ButtonGroup"> <SPSWFont Face="Helvetica" Size="0" /> </SPSWText> </SPSWVirtualButton> <!-- Overwrite Cancel button --> <SPSWVirtualButton DrawFlags="3" id="3"> <SPSWCoordinate Origin="tablet" Left="675" Top="900" Right="975" Bottom="980" /> <SPSWText Caption="Cancel" DrawFlags="3" Group="ButtonGroup"> <SPSWFont Face="Helvetica" Size="0" /> </SPSWText> </SPSWVirtualButton> </SPSWVirtualButtonFields> </SPSWObjects> </SPSWDevice> </SPSWDeviceFields>
Functions | |
SPINT32 __cdecl | SPBackgroundObjectsCreateFromFile (pSPBACKGROUNDOBJECTS_T *ppBackgroundObjects, const SPCHAR *pszFile, const SPCHAR *pszLanguage) |
Create a background descriptor container from a file. | |
SPINT32 __cdecl | SPBackgroundObjectsCreateFromXML (pSPBACKGROUNDOBJECTS_T *ppBackgroundObjects, const SPCHAR *pszXML) |
Create a background descriptor container from a xml-string. | |
SPINT32 __cdecl | SPBackgroundObjectsFree (pSPBACKGROUNDOBJECTS_T *ppBackgroundObjects) |
Free the resources used by the container. |
Function Documentation
|
Create a background descriptor container from a file.
|
|
Create a background descriptor container from a xml-string.
|
|
Free the resources used by the container.
|