Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef CASMCONFIGPANEL2_H
Toshihiro Shimizu 890ddd
#define CASMCONFIGPANEL2_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "submitpage.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tw/tw.h"
Toshihiro Shimizu 890ddd
#include "tw/textfield.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// forward declarations
Toshihiro Shimizu 890ddd
class TLabel;
Toshihiro Shimizu 890ddd
class TNumField;
Toshihiro Shimizu 890ddd
class TOptionMenu;
Toshihiro Shimizu 890ddd
class TButton;
Toshihiro Shimizu 890ddd
class TFilePath;
Toshihiro Shimizu 890ddd
class TCheckBox;
Toshihiro Shimizu 890ddd
class CasmTask2;
Toshihiro Shimizu 890ddd
class CasmConfigPanel2;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==============================================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class FilePathField : public TTextField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	CasmConfigPanel2 *m_page;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	FilePathField(TWidget *parent, string name = "");
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onFocusChange(bool on);
Toshihiro Shimizu 890ddd
	void close();
Toshihiro Shimizu 890ddd
	void keyDown(int key, unsigned long flags, const TPoint &p);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==============================================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class CasmConfigPanel2 : public TaskConfigPanel
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	CasmConfigPanel2(TWidget *parent);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void configureNotify(const TDimension &d);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setTask(SubmitPageTask *task);
Toshihiro Shimizu 890ddd
	SubmitPageTask *getTask() const;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void loadSetup(const TFilePath &fp);
Toshihiro Shimizu 890ddd
	void onNumField(double v, int type);
Toshihiro Shimizu 890ddd
	void onColumnField(string value, int type);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Toshihiro Shimizu 890ddd
	CasmTask2 *m_task;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TLabel *m_setupLabel;
Toshihiro Shimizu 890ddd
	FilePathField *m_setupTextField;
Toshihiro Shimizu 890ddd
	TButton *m_setupBrowseBtn;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TLabel *m_chunkSizeLabel;
Toshihiro Shimizu 890ddd
	TNumField *m_chunkSize;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TLabel *m_fromLabel;
Toshihiro Shimizu 890ddd
	TLabel *m_toLabel;
Toshihiro Shimizu 890ddd
	TLabel *m_stepLabel;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TNumField *m_from;
Toshihiro Shimizu 890ddd
	TNumField *m_to;
Toshihiro Shimizu 890ddd
	TNumField *m_step;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TLabel *m_shrinkLabel;
Toshihiro Shimizu 890ddd
	TLabel *m_renderTileLabel;
Toshihiro Shimizu 890ddd
	TLabel *m_memChunkLabel;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TNumField *m_shrink;
Toshihiro Shimizu 890ddd
	TNumField *m_renderTile;
Toshihiro Shimizu 890ddd
	TNumField *m_memChunk;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TLabel *m_subPixelMoveLabel;
Toshihiro Shimizu 890ddd
	TOptionMenu *m_subPixelMove;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TLabel *m_processingLabel;
Toshihiro Shimizu 890ddd
	TOptionMenu *m_processing;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TLabel *m_resampleQualityLabel;
Toshihiro Shimizu 890ddd
	TOptionMenu *m_resampleQuality;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TCheckBox *m_focus;
Toshihiro Shimizu 890ddd
	TCheckBox *m_noOverwrite;
Toshihiro Shimizu 890ddd
	TCheckBox *m_multimedia;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TTextField *m_column;
Toshihiro Shimizu 890ddd
	TCheckBox *m_lineart;
Toshihiro Shimizu 890ddd
	TCheckBox *m_edgeAliasing;
Toshihiro Shimizu 890ddd
	TNumField *m_thickness;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TCheckBox *m_gamma;
Toshihiro Shimizu 890ddd
	TNumField *m_gammaValue;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TCheckBox *m_clap;
Toshihiro Shimizu 890ddd
	TLabel *m_outputScriptLabel;
Toshihiro Shimizu 890ddd
	TOptionMenu *m_outputScript;
Toshihiro Shimizu 890ddd
	TLabel *m_entryPointLabel;
Toshihiro Shimizu 890ddd
	TTextField *m_entryPoint;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void browseSetupFiles();
Toshihiro Shimizu 890ddd
	void onMultimedia(TCheckBox *box, bool on);
Toshihiro Shimizu 890ddd
	void onLineart(TCheckBox *box, bool on);
Toshihiro Shimizu 890ddd
	void onEdgeAliasing(TCheckBox *box, bool on);
Toshihiro Shimizu 890ddd
	void onConstantFocus(TCheckBox *box, bool on);
Toshihiro Shimizu 890ddd
	void onOverwrite(TCheckBox *box, bool on);
Toshihiro Shimizu 890ddd
	void onGamma(TCheckBox *box, bool on);
Toshihiro Shimizu 890ddd
	void onSubPixelMove(string move);
Toshihiro Shimizu 890ddd
	void onProcessing(string bits);
Toshihiro Shimizu 890ddd
	void onResampleQuality(string quality);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif