-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathStimServerDoc.h
83 lines (71 loc) · 2.22 KB
/
StimServerDoc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// StimServerDoc.h : interface of the CStimServerDoc class
//
#pragma once
#include "afxcoll.h"
//#include "Stimulus.h"
#include "GeometryStimuli.h"
#include "StimulusPixel.h"
#include "Anim.h"
#include "OutputWnd.h"
#include <map>
using namespace std;
class CStimServerDoc : public CDocument
{
protected: // create from serialization only
CStimServerDoc();
DECLARE_DYNCREATE(CStimServerDoc)
// Attributes
public:
// Operations
public:
// Overrides
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
#ifdef SHARED_HANDLERS
virtual void InitializeSearchContent();
virtual void OnDrawThumbnail(CDC& dc, LPRECT lprcBounds);
#endif // SHARED_HANDLERS
// Implementation
public:
virtual ~CStimServerDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
DECLARE_MESSAGE_MAP()
#ifdef SHARED_HANDLERS
// Helper function that sets search content for a Search Handler
void SetSearchContent(const CString& value);
#endif // SHARED_HANDLERS
private:
map<WORD, CStimulus*> m_stimuli;
CMapWordToOb m_animations;
virtual short AddStimulusObject(CStimulus* pObject);
virtual short AddStimulusObject(CLoadedStimulus* pObject, unsigned char filename[]);
virtual short ReplaceStimulusObject(CLoadedStimulus* pObject, unsigned char filename[]);
virtual short AddAnimationObject(CAnim* pObject);
virtual short AddAnimationObject(CLoadedAnim* pObject, unsigned char filename[]);
D2D1_COLOR_F m_backgroundColor = D2D1::ColorF(.5f, .5f, .5f, 1.f);
bool m_photoDiodeEnabledCopy;
D2D1_COLOR_F m_backgroundColorCopy = D2D1::ColorF(.5f, .5f, .5f, 1.f);
PDCSR m_PDCSRcopy = { 0,0 };
bool m_deferredUpdate;
HANDLE m_hDeferredUpdateDone;
HANDLE m_hEndDeferredMode;
void UnprotectAllStimuli(void);
void RemoveAllStimuli(void);
public:
// bool Draw();
void Draw();
short Command(WORD key, unsigned char message[], DWORD messageLength);
virtual short ReplaceStimulusObject(CStimulus* pObject, WORD* pKey);
virtual void OnCloseDocument();
HANDLE m_hCloseDocument;
afx_msg void OnAppsBeamertest();
void EndDeferredMode(void);
static bool m_valid;
};