#pragma once
#include "BaseProcess.h"
#include "GOpenCV.h"
#include <vector>
class ECTrainer;
#define FORCE_SINGLE_MONITOR 0
class ECTrainerGUI : public BaseProcess
{
private:
const cv::String WIN_DISP = "ECTrainer Display";
const cv::String WIN_MAIN = "Eye Contact Trainer";
const cv::String HEADER_FILE = "../images/Header1480.png";
const cv::String SNAPSHOT_FILE = "snapshot.jpg";
const cv::Size MAIN_FRAME_SIZE = cv::Size(1480, 620); // メインウインドウのサイズ
const cv::Point SCENE_BUFFER_POS = cv::Point(170, 120); // 視野画像表示位置
const cv::Point DISP_IMAGE_POS = cv::Point(820, 120); // 刺激画像表示意思
const int IMAGE_WIDTH = 640; // メインウインドウに表示する画像幅
const cv::Size DISP_SIZE = cv::Size(IMAGE_WIDTH, 480); // メインウインドウに表示する画像サイズ
cv::Mat _MainFrame; // メインウインドウフレーム
cv::Mat _FullDispBuf; // 刺激画面(被験者用)
cv::Mat _Logo; // ロゴ
cv::Mat _blank; // ブランク
int _SceneBufferHeight;
float _SceneBufferScale;
int _DispImageHeight;
HWND _hWndMain; // メインウインドウのハンドル
BOOL _Booting;
// 基本処理
bool Routine();
// イベント処理
bool EventProc(MSG& msg);
// 全画面表示バッファの生成
void MakeFullDispBuffer(cv::Mat& img);
public:
// コンストラクタ
ECTrainerGUI(ECTrainer* pEct);
// 初期化
bool Init();
// メイン画面のウインドウハンドルを返す
HWND GetMainHWnd() { return _hWndMain; }
};