Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef SCRIPTCONFIGPANEL_H
Toshihiro Shimizu 890ddd
#define SCRIPTCONFIGPANEL_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 TButton;
Toshihiro Shimizu 890ddd
class ScriptConfigPanel;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class PathFileField : public TTextField {
Shinya Kitaoka 120a6e
  ScriptConfigPanel *m_page;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  PathFileField(TWidget *parent, string name = "");
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onFocusChange(bool on);
Shinya Kitaoka 120a6e
  void close();
Shinya Kitaoka 120a6e
  void keyDown(int key, unsigned long flags, const TPoint &p);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class ScriptConfigPanel : public TaskConfigPanel {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ScriptConfigPanel(TWidget *parent);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void configureNotify(const TDimension &d);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void browseFiles();
Shinya Kitaoka 120a6e
  void setTask(SubmitPageTask *task);
Shinya Kitaoka 120a6e
  SubmitPageTask *getTask() const;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void loadScript(const TFilePath &fp);
Shinya Kitaoka 120a6e
  void onTextField(string value, int type);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  ScriptTask *m_task;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TLabel *m_fileLbl;
Shinya Kitaoka 120a6e
  PathFileField *m_file;
Shinya Kitaoka 120a6e
  TButton *m_browseBtn;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TLabel *m_arg2Lbl;
Shinya Kitaoka 120a6e
  TTextField *m_arg2;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TLabel *m_arg3Lbl;
Shinya Kitaoka 120a6e
  TTextField *m_arg3;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TLabel *m_arg4Lbl;
Shinya Kitaoka 120a6e
  TTextField *m_arg4;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TLabel *m_arg5Lbl;
Shinya Kitaoka 120a6e
  TTextField *m_arg5;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
#endif