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

#include <Windows.h>
#include <tchar.h>
#include "myOpenCV.h"
#include <vector>
#include "BaseProcess.h"

class ECTrainerGUI : public BaseProcess
{
private:
	const cv::String WIN_DISP = "ECTrainer Display";
	const cv::String WIN_MAIN = "Eye Contact Trainer";
	//const cv::Size MAIN_FRAME_SIZE = cv::Size(640, 400);
	//const cv::Size SCENE_BUFFER_SIZE = cv::Size(320, 180);
	const cv::Size MAIN_FRAME_SIZE = cv::Size(1000, 650);
	const cv::Size SCENE_BUFFER_SIZE = cv::Size(640, 480);
	const int KEY_ESC = 27;

	std::vector<RECT> _Displays;
	cv::Mat _MainFrame;		// メインウインドウフレーム
	cv::Mat _DispBuffer;	// 刺激画像
	cv::Mat _SceneBuffer;	// 視野画像
	cv::Mat _Logo;			// ロゴ

	void GetDisplayInfo();
	static BOOL CALLBACK MonitorEnumProc(HMONITOR hMon, HDC hdcMon, LPRECT lpMon, LPARAM dwDate);

public:
	ECTrainerGUI(ECTrainer* pEct);
	bool Init();
	bool MainLoop();
	void SetSceneBuffer(cv::Mat &img);
	void SetDispBuffer(cv::Mat& img);
};