//ZPlugin interface example
//***********************************************************************************************

[IShowActions,0]//hides interface actions from user

/*Note on button width/height values: this zscript demonstrates the use of proportional values of 
palette dimensions (0.5 = half palette, 1 = whole palette). This means that the plugin interface 
scales appropriately for different settings of the Preferences>Interface>Buttons Size slider.*/

//create new subpalette in Document palette:
[ISubPalette,"Document:MaxResize"]

//create buttons, sliders & switches:
[ISlider,"Document:MaxResize:DocSz",640,1,200,8000
,"Set Resize Document Longest Dimension.",
/*commands here*/	
,,.5]

[IButton,"Document:MaxResize:Export","Export/Save Resized Canvas",
/*commands here*/		
,,.4]//end button

[ISwitch,"Document:MaxResize:D"
,0,"Press to Save Document Only. UnPress to Export Image Only.",
/*commands here*/	
,
/*commands here*/		
,,.1]


[IButton,"Document:MaxResize:Shadows","Export Shadow Pass",
/*commands here*/		
,,.4]//end button

[IButton,"Document:MaxResize:Lights","Export Lights Pass",
/*commands here*/	
,,.3]//end button


[IButton,"Document:MaxResize:Select","Export Selected at set size.",
/*commands here*/
	,,.3]//end button


//*************second subpalette**************

//create subpalette of MaxResize:
[ISubPalette,"Document:MaxResize:Print Resolution"]

//create sliders & switches:

[ISlider,"Document:MaxResize:Print Resolution:Width",	
640/300,.01,.01,1100,"Width at Print Resolution.",
/*commands here*/
,,.5]

[ISlider,"Document:MaxResize:Print Resolution:Height",
480/300,.01,.01,1100,"Height at Print Resolution.",
/*commands here*/
,,.5]

[ISlider,"Document:MaxResize:Print Resolution:dpi"
,300,1,30,600,"Print Resolution in pixels/inch.",
/*commands here*/
,,.5]

//These switches switch the other on when switched off:
[ISwitch,"Document:MaxResize:Print Resolution:in"
,1,"Width & Height in Inches.",
/*commands here*/	
[IUnPress,"Document:MaxResize:Print Resolution:cm"]
,
/*commands here*/
[IPress,"Document:MaxResize:Print Resolution:cm"]
,0,.25]


[ISwitch,"Document:MaxResize:Print Resolution:cm"
,0,"Width & Height in Centimetres.",
/*commands here*/	
[IUnPress,"Document:MaxResize:Print Resolution:in"]
,
/*commands here*/
[IPress,"Document:MaxResize:Print Resolution:in"]
,1,.25]

//Switches need to be enabled like this otherwise they will work once only:
[IEnable,"Document:MaxResize:D"]
[IEnable,"Document:MaxResize:Print Resolution:cm"]
[IEnable,"Document:MaxResize:Print Resolution:in"]
