-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlainInsteadView.h
141 lines (129 loc) · 3.79 KB
/
PlainInsteadView.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// PlainInsteadView.h : èíòåðôåéñ êëàññà CPlainInsteadView
//
#pragma once
#include "afxwin.h"
#define ID_TIMER_1 100
#define ID_TIMER_2 101
#include <map>
#include "Wave.h"
class CPlainInsteadView : public CFormView
{
protected: // ñîçäàòü òîëüêî èç ñåðèàëèçàöèè
CPlainInsteadView();
DECLARE_DYNCREATE(CPlainInsteadView)
public:
enum{ IDD = IDD_PLAININSTEAD_FORM };
// Àòðèáóòû
public:
CPlainInsteadDoc* GetDocument() const;
// Îïåðàöèè
public:
static CPlainInsteadView* GetCurrentView();
void SetOutputText(CString newText, BOOL useHistory=TRUE);
void UpdateSettings();
void InitFocusLogic();
void UpdateFocusLogic();
// Ïåðåîïðåäåëåíèå
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // ïîääåðæêà DDX/DDV
virtual void OnInitialUpdate(); // âûçûâàåòñÿ â ïåðâûé ðàç ïîñëå êîíñòðóêòîðà
void ShowTextFromResource(LPCWSTR res_id); //Îòîáðàçèòü òåêñò èç ðåñóðñîâ
void UpdateFontSize();
CFindReplaceDialog *m_pFindDialog;
afx_msg LRESULT OnFindReplace(WPARAM wParam, LPARAM lParam);
bool FindStringInEdit(CString FindName, bool bMatchCase);
bool wasFind;
CString lastSearchStr;
bool lastMatchCase;
// Ðåàëèçàöèÿ
public:
virtual ~CPlainInsteadView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
static CPlainInsteadView* m_curView;
CString m_newText;
BOOL m_auto_say;
BOOL m_jump_to_out;
//BOOL m_BeepList;
// Ñîçäàííûå ôóíêöèè ñõåìû ñîîáùåíèé
protected:
DECLARE_MESSAGE_MAP()
public:
CEdit m_OutEdit;
//CEdit m_InputEdit;
CFont m_fontOut;
CFont m_fontIn;
int currInpHeight;
COLORREF outBackCol;
COLORREF outFontCol;
COLORREF inBackCol;
COLORREF inFontCol;
afx_msg void OnSize(UINT nType, int cx, int cy);
virtual BOOL PreTranslateMessage(MSG* pMsg);
afx_msg void OnEnSetfocusEditOut();
afx_msg void OnTimer(UINT); // ôóíêöèÿ ðåàêöèè íà òàéìåð
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnDestroy();
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
afx_msg void OnClose();
bool useClipboard;
afx_msg void OnFullHistory();
afx_msg void OnBackHist();
afx_msg void OnForwHist();
afx_msg void OnManualStarter();
afx_msg void OnManualCmdList();
afx_msg void OnManualHowPlay();
afx_msg void OnManualRuk1();
afx_msg void OnManualRuk2();
afx_msg void OnManualRuk3();
afx_msg void OnManualRuk4();
afx_msg void OnManualRuk5();
afx_msg void OnManualRuk6();
afx_msg void OnManualRuk7();
afx_msg void OnManualBigWrap();
afx_msg void OnFindText();
afx_msg void OnFindNext();
afx_msg void OnHistoryStop();
afx_msg void OnHistoryStart();
void TryInsteadCommand(CString textIn, CString cmdForLog = L""); //Îòïðàâêà êîìàíäû â èíòåðïðåòàòîð
void TurnOffLogging();
CListBox mListScene;
std::map<int,int> pos_id_scene;
std::map<int/*list_pos*/, CString/*code*/> act_on_scene;
CListBox mListWays;
std::map<int, int> pos_id_ways;
CListBox mListInv;
std::map<int, int> pos_id_inv;
CString inv_save; //Ñîõðàíåííûé ðåçóëüòàò èíâåíòàðÿ
afx_msg void OnUpdateOutView();
afx_msg void OnStnClickedStaticScene();
CStatic mStaticScene;
CStatic mStaticInv;
CStatic mStaticWays;
afx_msg void OnLbnSetfocusListScene();
afx_msg void OnLbnSetfocusListInv();
afx_msg void OnLbnSetfocusListWays();
afx_msg void OnGotoScene();
afx_msg void OnGotoInv();
afx_msg void OnGotoWays();
CString baseSoundDir;
Wave* wave_inv;
Wave* wave_scene;
Wave* wave_ways;
afx_msg void OnMenuLog();
bool isLogOn;
bool isStartComment;
CString logFileName;
CString savedSelInv;
afx_msg void OnMenuAddComment();
afx_msg void OnUpdateMenuAddComment(CCmdUI *pCmdUI);
};
#ifndef _DEBUG // îòëàäî÷íàÿ âåðñèÿ â PlainInsteadView.cpp
inline CPlainInsteadDoc* CPlainInsteadView::GetDocument() const
{ return reinterpret_cast<CPlainInsteadDoc*>(m_pDocument); }
#endif