Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef CASMCONFIGPANEL_H
Toshihiro Shimizu 890ddd
#define CASMCONFIGPANEL_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tfilepath.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tw/tw.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 TTextField;
Toshihiro Shimizu 890ddd
class TButton;
Toshihiro Shimizu 890ddd
class TFilePath;
Toshihiro Shimizu 890ddd
class TCheckBox;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==============================================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define DDR_OUTPUTSCRIPT_FILENAME "D@D@R"
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class CasmTask {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  CasmTask();
Shinya Kitaoka 120a6e
  CasmTask(const string &s, const string &setupFilePath);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  string getCommandLine() const;
Shinya Kitaoka 120a6e
  void setCommandLine(const string &cmdLine);
Shinya Kitaoka 120a6e
  void setdefaultValue();
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  enum moveType { M_NONE = 0, M_BG_FRACMOVE, M_INTMOVE, M_FRACMOVE };
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  enum resType {
Shinya Kitaoka 120a6e
    RES_TYPE_NONE = 0,
Shinya Kitaoka 120a6e
    RES_TYPE_STANDARD,
Shinya Kitaoka 120a6e
    RES_TYPE_IMPROVED,
Shinya Kitaoka 120a6e
    RES_TYPE_HIGH
Shinya Kitaoka 120a6e
  };
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  int m_taskChunksize;
Shinya Kitaoka 120a6e
  int m_start;
Shinya Kitaoka 120a6e
  int m_end;
Shinya Kitaoka 120a6e
  int m_step;
Shinya Kitaoka 120a6e
  string m_casmFile;
Shinya Kitaoka 120a6e
  string m_outname;
Shinya Kitaoka 120a6e
  int m_firstFrame;
Shinya Kitaoka 120a6e
  int m_lastFrame;
Shinya Kitaoka 120a6e
  int m_reduction;
Shinya Kitaoka 120a6e
  moveType m_moveType;
Shinya Kitaoka 120a6e
  int m_prec;
Shinya Kitaoka 120a6e
  double m_renderTile;
Shinya Kitaoka 120a6e
  double m_memChunk;
Shinya Kitaoka 120a6e
  bool m_multimedia;
Shinya Kitaoka 120a6e
  bool m_logfile;
Shinya Kitaoka 120a6e
  bool m_cf;
Shinya Kitaoka 120a6e
  resType m_restype;
Shinya Kitaoka 120a6e
  bool m_noOverwrite;
Shinya Kitaoka 120a6e
  bool m_clap;
Shinya Kitaoka 120a6e
  bool m_mprocess;
Shinya Kitaoka 120a6e
  int m_numColumn;
Shinya Kitaoka 120a6e
  int m_lineart;
Shinya Kitaoka 120a6e
  int m_edgeAliasing;
Shinya Kitaoka 120a6e
  double m_gamma;
Shinya Kitaoka 120a6e
  string m_bcScript;
Shinya Kitaoka 120a6e
  string m_acScript;
Shinya Kitaoka 120a6e
  string m_outputScript;
Shinya Kitaoka 120a6e
  string m_outputScriptArgument;
Shinya Kitaoka 120a6e
  string m_setupFile;
Shinya Kitaoka 120a6e
  int xsize, ysize;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class CasmConfigPanel : public TWidget {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  CasmConfigPanel(TWidget *parent);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void configureNotify(const TDimension &d);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setTask(CasmTask *task);
Shinya Kitaoka 120a6e
  CasmTask *getTask() const;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void loadSetup(const TFilePath &fp);
Shinya Kitaoka 120a6e
  void onNumField(double v, int type);
Shinya Kitaoka 120a6e
  void onColumnField(std::wstring value);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  CasmTask *m_task;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TLabel *m_setupLabel;
Shinya Kitaoka 120a6e
  TTextField *m_setupTextField;
Shinya Kitaoka 120a6e
  TButton *m_setupBrowseBtn;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TLabel *m_chunkSizeLabel;
Shinya Kitaoka 120a6e
  TNumField *m_chunkSize;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TLabel *m_fromLabel;
Shinya Kitaoka 120a6e
  TLabel *m_toLabel;
Shinya Kitaoka 120a6e
  TLabel *m_stepLabel;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TNumField *m_from;
Shinya Kitaoka 120a6e
  TNumField *m_to;
Shinya Kitaoka 120a6e
  TNumField *m_step;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TLabel *m_shrinkLabel;
Shinya Kitaoka 120a6e
  TLabel *m_renderTileLabel;
Shinya Kitaoka 120a6e
  TLabel *m_memChunkLabel;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TNumField *m_shrink;
Shinya Kitaoka 120a6e
  TNumField *m_renderTile;
Shinya Kitaoka 120a6e
  TNumField *m_memChunk;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TLabel *m_subPixelMoveLabel;
Shinya Kitaoka 120a6e
  TOptionMenu *m_subPixelMove;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TLabel *m_processingLabel;
Shinya Kitaoka 120a6e
  TOptionMenu *m_processing;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TLabel *m_resampleQualityLabel;
Shinya Kitaoka 120a6e
  TOptionMenu *m_resampleQuality;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TCheckBox *m_focus;
Shinya Kitaoka 120a6e
  TCheckBox *m_noOverwrite;
Shinya Kitaoka 120a6e
  TCheckBox *m_multimedia;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TTextField *m_column;
Shinya Kitaoka 120a6e
  TCheckBox *m_lineart;
Shinya Kitaoka 120a6e
  TCheckBox *m_edgeAliasing;
Shinya Kitaoka 120a6e
  TNumField *m_thickness;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TCheckBox *m_gamma;
Shinya Kitaoka 120a6e
  TNumField *m_gammaValue;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TCheckBox *m_clap;
Shinya Kitaoka 120a6e
  TLabel *m_outputScriptLabel;
Shinya Kitaoka 120a6e
  TOptionMenu *m_outputScript;
Shinya Kitaoka 120a6e
  TLabel *m_entryPointLabel;
Shinya Kitaoka 120a6e
  TTextField *m_entryPoint;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  void browseSetupFiles();
Shinya Kitaoka 120a6e
  void onMultimedia(TCheckBox *box, bool on);
Shinya Kitaoka 120a6e
  void onLineart(TCheckBox *box, bool on);
Shinya Kitaoka 120a6e
  void onEdgeAliasing(TCheckBox *box, bool on);
Shinya Kitaoka 120a6e
  void onConstantFocus(TCheckBox *box, bool on);
Shinya Kitaoka 120a6e
  void onOverwrite(TCheckBox *box, bool on);
Shinya Kitaoka 120a6e
  void onGamma(TCheckBox *box, bool on);
Shinya Kitaoka 120a6e
  void onSubPixelMove(string move);
Shinya Kitaoka 120a6e
  void onProcessing(string bits);
Shinya Kitaoka 120a6e
  void onResampleQuality(string quality);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif