Newer
Older
PrismSoftware / ECTrainer2 / ECTrainerGUI.h
#pragma once

#include "BaseProcess.h"
#include "nkcOpenCV.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/Header.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;			// ブランク
	HWND _hWndMain;			// メインウインドウのハンドル

	// 基本処理
	bool Routine();
	// イベント処理
	bool EventProc(MSG& msg);
	// 全画面表示バッファの生成
	void MakeFullDispBuffer(cv::Mat img);

	std::string ClassName() { return "GUI"; }	// FPS表示

public:
	// コンストラクタ
	ECTrainerGUI(ECTrainer* pEct);
	// 初期化
	bool Init();
	// メイン画面のウインドウハンドルを返す
	HWND GetMainHWnd() { return _hWndMain; }
};