コード例 #1
0
void parameter (int command)
{	xmin.set(window.xmin()); xmax.set(window.xmax());
	ymin.set(window.ymin()); ymax.set(window.ymax());
	iterations.set(window.iterations());
	d.carryout();	if (d.result()!=DID_OK) return;
	window.set(xmin,xmax,ymin,ymax,iterations);
	window.update();
	thread.start();
}
コード例 #2
0
{	char *p=save.select();
	if (!p) return;
	bitmap->save(p);
}

class ParamDialog : public Dialog
{	public :
	ParamDialog(Window &window, int id) : Dialog(window,id) {}
	virtual int handler (int command);
};
ParamDialog d(window,ID_Dialog);

DoubleItem
	xmin(ID_Xmin,d,window.xmin()),
	xmax(ID_Xmax,d,window.xmax()),
	ymin(ID_Ymin,d,window.ymin()),
	ymax(ID_Ymax,d,window.ymax());
SpinItem iterations(ID_Iterations,d,
	window.iterations(),10,10000);


int ParamDialog::handler (int command)
{	if (command==ID_All)
	{	xmin.reinit(XMIN); xmax.reinit(XMAX);
		ymin.reinit(YMIN); ymax.reinit(YMAX);
		iterations.reinit(ITERATIONS);
		return 0;	}
	return 1;
}

void parameter (int command)