Custom Gadgets
Previous  Top  Next

PureVision allows up to 6 Custom Gadgets to be included and used in the Main Interface.
Each Custom Gadget has an image file (Custom1.png - Custom6.png) and a code file (Custom1.xml - Custom6.xml) which tells PureVision how to export the appropriate code.

clip0098

An include file containing the Custom Gadget Code/Module can also be specified and injected into the exported file.



PureVision provides a number of keywords (Tokens) which are replaced with PureVision data from the Properties Form when the project is Exported:

#CURRENTWINDOW#
Replaced with current Window Name
#CURRENTGADGET#
Replaced with current Gadget ID Name
#X#
Replaced with Gadget X position
#Y#
Replaced with Gadget Y position
#W#
Replaced with Gadget Width
#H#
Replaced with Gadget Height
#TEXT# / @TEXT@
Replaced with Display Text and adds Quotes / Replaced with Display Text no added Quotes
#FLAG#
Replaced with any selected Flags
#LANG#
Replaced with Display Text which can be modified with Language Translations
#BGCOLOR#
Replaced with selected Back Color
#FGCOLOR#
Replaced with selected Front Color
#LIMIT#
Replaced with specified Limit value
#MINLIMIT#
Replaced with specified Min value
#MAXLIMIT#
Replaced with specified Max value
#FONTNAME#
Replaced with font Name
#FONTFLAG#
Replaced with font Flags
#FONTSIZE#
Replaced with font Size




The default Custom.xml template file looks like this:
 
<gadgetdata>
<type>Custom1Gadget</type>  
<customname>GadgetName</customname>  
<customcode>#X#, #Y#, #W#, #H#, #TEXT#, #FLAG#</customcode>  
<customcodelang>#X#, #Y#, #W#, #H#, #LANG#, #FLAG#</customcodelang>  
<customcodetext></customcodetext>  
<customcodefont></customcodefont>  
<customcodetooltip></customcodetooltip>  
<customcodebg></customcodebg>  
<customcodefg></customcodefg>  
<customcodelimit></customcodelimit>  
<customcodemin></customcodemin>  
<customcodemax></customcodemax>  
<general>100000000001</general>  
<inject>000000011</inject>  
<x>10</x>  
<y>10</y>  
<w>120</w>  
<h>20</h>  
<text></text>  
<bgcolor></bgcolor>  
<fgcolor></fgcolor>  
<limit></limit>  
<minlimit></minlimit>  
<maxlimit></maxlimit>  
<flags>  
<element>  
<flag></flag>  
<pbflag></pbflag>  
<flagnum></flagnum>  
</element>  
</flags>  
</gadgetdata>





Properties Window (Enable/Disable Options)

General Flags / 12 Slots (0=Disable / 1=Enable)

ID Name
AutoSize
Text
Font
Flags
ToolTip
BGColor
FGColor
Limit
Min
Max
Hide
0
0
0
0
0
0
0
0
0
0
0
0


<general>100011000000</general>

This line would enable changing the ID Name, modifying Flags and entering a ToolTip.

clip0099



<general>101000110001</general>

This line would enable changing the ID Name, enable adding Text to the Gadget, modifying the Background Color, modifying the Forground Color and allowing the Gadget to be Hidden.

clip0101






Code Inject Flags / 9 Slots (0=Disable / 1=Enable)

Left
Click
Left
Double
Click
Right
Click
Right
Double
Click
Change
Focus
Lost
Focus
Outer
Loop
Inner
Loop
0
0
0
0
0
0
0
0
0


<inject>100000011</inject>
This line would enable LeftClick, OuterLoop and InnerLoop in the Properties/Code Inject options and allow code to be injected into them.
It would also Export Code for a LeftClick Gadget Event.


<inject>000011111</inject>

This would enable Change, Focus, LostFocus, OuterLoop & InnerLoop code inject options and export Gadget Events for Change, Focus and LostFocus.

clip0100