#include <origin.h>
#include <GetNBox.h>
#include <xfutils.h>
//put additional include files here
#include <..\originlab\grobj_utils.h>

//put your own support static functions here
//bool add_polygon_cntrl(const GraphLayer& igl, LPCSTR lpcszName, const vector& vx, const & vy, LPCSTR lpcszLT, bool bKeepInside)



void axis_scroller(const GraphLayer& igl, const int& top, const double& xsize, const double& ysize)
{
	if(!igl)
		return;
	
	GraphObject go;
	vector vx = {-2, 2, 0}; vx*=xsize; vx += 100;
	vector vy = {-3, -3, 0}; vy*=ysize; vy += 99.5;
	
	if(top)
		vy -= 100;
	
	add_polygon_cntrl(igl, "XMax", vx, vy, "XScaleMax", false);
	vector vx1 = {-2, 2, 0}; vx1*=xsize;
	add_polygon_cntrl(igl, "XMin", vx1, vy, "XScaleMin", false);
	
	
	
}

//nGetNDialog = 0,1,2, corresponding to the XF GetN dropdown, 0 = dialog is not used
//you can change nRet to be one of XFEVT_PROCEED (defualt), XFEVT_ABORT, XFEVT_PROCEED_NO_DLG or XFEVT_PROCEED_WITH_DLG(when nGetNDialog = 0)
//nGetNDialog = -1 when Ok on GetN dialog to allow handler to preocess <auto> etc variables
//dwCntrl is combination of bits
//LTXF_FROM_GUI_MENU, LTXF_FROM_GUI_PROMPT, LTXF_FROM_AUTO_UPDATE, LTXF_FROM_FUNCTION, LTXF_THEME_USED, LTXF_CHANGE_PARAM
void axis_scroller_before_execute(TreeNode& trGetN, int nGetNDialog, int& nRet, int dwCntrl)
{

}
