-
Notifications
You must be signed in to change notification settings - Fork 0
/
DictionaryTool.h
144 lines (133 loc) · 4.7 KB
/
DictionaryTool.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
141
142
143
144
#pragma once
#include "afxcmn.h"
#include "WorkQueue.h"
#include "afxwin.h"
#include "ReportCtrl.h"
enum WORD_RESTRICTION_TYPE {
WORD_RESTRICTION_CONTAINS = 0,
WORD_RESTRICTION_STARTS_WITH,
WORD_RESTRICTION_ENDS_WITH,
WORD_RESTRICTION_EQUALS
};
// CDictionaryTool dialog
class CDictionaryTool : public CXTResizeDialog
{
DECLARE_DYNAMIC(CDictionaryTool)
public:
CDictionaryTool(CWnd* pParent = NULL); // standard constructor
virtual ~CDictionaryTool();
static unsigned long __stdcall ThreadFuncDestroy( void* pParam );
CWorkQueue m_WorkQueue;
// Dialog Data
enum { IDD = IDD_DICTIONARY_TOOL };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
afx_msg LRESULT OnAddWord(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUpdateCountDisplay(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedAttributes();
afx_msg void OnBnClickedSearch();
CList <int, int> m_intNewWords;
CListCtrl m_listCtrlWords;
void FillDictionaryList(CONCEPT *startConcept, int level, int &count);
virtual BOOL OnInitDialog();
CString m_strCount;
WORD_RESTRICTION_TYPE m_wordRestrictionType;
int m_intDictSelection;
CBitmap m_bitmapButtonUp;
CString m_strLetter;
CString m_strLetterGroup;
int m_intScanCount;
int m_intCount;
int m_intAppendCount;
CONCEPT *m_conceptSelected;
CONCEPT *m_conPOS;
CONCEPT *m_conA;
int m_intAttrSelected;
bool m_boolOrphans;
bool m_boolUpArrow;
bool m_boolStopThreads;
bool m_boolThreadFilling;
bool m_boolOpeningKB;
void FillDictionaryList(BOOL bDoSetRedraw);
void SetCountDisplay();
void GotoConceptPath(CString conceptPathStr);
void GotoWordConcept(CONCEPT *concept);
void SelectItem(int itemNum, bool runFlag=false);
void AddPOS(CString posStr);
void AddInflection(CString wordStr, CString attrStr, CString valueStr, bool isConcept=false);
void SetTextEditText(UINT id, CString textStr);
void FillPOS();
void AddWord(CString wordStr, CONCEPT *concept, bool forceAdd=false);
bool POSMatch(CStringList &posStringList);
bool AttrMatch(CString wordStr, CStringList &attrStringList, CStringList &valueStringList);
void AddAttribute(CONCEPT *concept, CString attrStr, CString valueStr, bool replaceFlag=false);
CString GetValueString(CString valueStr);
void SetEnable(UINT id, bool value);
bool RenamePOS(CONCEPT *startConcept, int level, int &count, CString posStr, CString oldValStr, CString newValStr);
void SaveAttributes(bool replaceFlag=false);
CString WordDisplay(CONCEPT *concept, CStringList &POSStringList,
CStringList &attrStringList, CStringList &valueStringList);
void RefreshWordsDisplay();
void RefreshWordDisplay(CONCEPT *concept, int index);
void RefreshWordDisplay(CString wordStr);
void OpenKb(CONCEPT *concept);
void LoadConcept(CONCEPT *concept);
void DeleteNewWordIndex(int index);
CReportCtrl m_listCtrlInflections;
CComboBox m_comboBoxWordRestriction;
CString m_strWordRestriction;
CString m_strWordSearch;
virtual BOOL PreTranslateMessage(MSG* pMsg);
CListBox m_listBoxPOS;
CONCEPT *m_conceptValue;
bool m_boolIsConcept;
int m_intWordSelected;
afx_msg void OnDestroy();
afx_msg void OnNMDblclkWords(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnNMClickWords(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnBnClickedStop();
afx_msg void OnCbnSelchangeWordRestriction();
afx_msg void OnBnClickedGotoRoot();
afx_msg void OnNMDblclkInflections(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnBnClickedEnglish();
CString m_strWord;
afx_msg void OnBnClickedGotoWord();
CString m_strAttr;
CString m_strValue;
afx_msg void OnNMClickInflections(NMHDR *pNMHDR, LRESULT *pResult);
CComboBox m_comboBoxPOS;
afx_msg void OnBnClickedClear();
afx_msg void OnBnClickedAddPos();
CString m_strPOS;
afx_msg void OnBnClickedDeletePos();
afx_msg void OnBnClickedRun();
CComboBox m_comboBoxPOSMatchSpecs;
CString m_strPOSMatchSpec;
afx_msg void OnBnClickedSave();
CString m_strAttrWord;
afx_msg void OnBnClickedChangeInflection();
afx_msg void OnBnClickedClearWords();
afx_msg void OnBnClickedSameRoots();
CString m_strAttrMatch;
CComboBox m_comboBoxAttrMatch;
afx_msg void OnCbnSelchangeAttrMatch();
afx_msg void OnBnClickedAddInflection();
afx_msg void OnBnClickedAddConcept();
afx_msg void OnBnClickedDeleteWord();
BOOL m_boolAppend;
BOOL m_boolBrowse;
afx_msg void OnBnClickedRenamePos();
afx_msg void OnBnClickedAddAttrAll();
afx_msg void OnBnClickedAddList();
afx_msg void OnBnClickedReplace();
afx_msg void OnBnClickedDeleteInflection();
afx_msg void OnNMCustomdrawWords(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnBnClickedRefresh();
afx_msg void OnBnClickedKb();
//CBitmapButton m_buttonKB;
afx_msg void OnBnClickedRemove();
BOOL m_boolMultiSelect;
afx_msg void OnBnClickedMultiSelect();
};