#pragma once
#include "BaseProcess.h"
#include "myOpenCV.h"
#include <vector>
class DShowMovie;
class ECTrainer;
class ECTrainerGUI : public BaseProcess
{
private:
const cv::String WIN_DISP = "ECTrainer Display";
const cv::String WIN_MAIN = "Eye Contact Trainer";
const cv::String SNAPSHOT_FILE = "snapshot.jpg";
const cv::Size MAIN_FRAME_SIZE = cv::Size(1480, 620);
const int IMAGE_WIDTH = 640;
const cv::Size DISP_SIZE = cv::Size(640, 480);
const cv::Point SCENE_BUFFER_POS = cv::Point(170, 120);
const cv::Point DISP_IMAGE_POS = cv::Point(820, 120);
const int KEY_ESC = 27;
DShowMovie* _dsm;
cv::Mat _MainFrame; // メインウインドウフレーム
cv::Mat _DispImage; // 刺激画像(操作者用)
cv::Mat _DispBuffer; // 刺激画面(被験者用)
cv::Mat _Logo; // ロゴ
cv::Mat _blank; // ブランク
int _SceneBufferHeight;
float _SceneBufferScale;
int _DispImageHeight;
HWND _hWndMain;
bool _AppRunning; // 実行中フラグ
bool Routine();
bool MainLoop();
public:
ECTrainerGUI(ECTrainer* pEct);
bool Init();
bool Tell(ECTMSG msg, WPARAM wp = 0, LPARAM lp = 0);
HWND GetMainHWnd() { return _hWndMain; }
void SetDispBuffer(cv::Mat& img);
};