-
Notifications
You must be signed in to change notification settings - Fork 0
/
CandidateDialog.hpp
48 lines (46 loc) · 1.37 KB
/
CandidateDialog.hpp
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
#ifndef _MY_CANDIDATE_DIALOG_HPP_
#define _MY_CANDIDATE_DIALOG_HPP_
#include <wx/dialog.h>
class MyFrame;
class wxGrid;
class wxGridEvent;
class MyResultDialog;
class MyCandidate{
public:
wxString mId;
wxString mName;
wxString mDepart;
};
class MyCandidateDialog: public wxDialog
{
public:
MyCandidateDialog(MyFrame *pFrame);
~MyCandidateDialog();
void SetResultDialog(MyResultDialog *pResult){mpResultDialog = pResult;}
void OnCellRightClick(wxGridEvent &evt);
void OnLabelRightClick(wxGridEvent &evt);
void OnSelectCell(wxGridEvent &evt);
void OnRightUp(wxMouseEvent &evt);
void OnInsert(wxCommandEvent &evt);
void OnAppend(wxCommandEvent &evt);
void OnDelete(wxCommandEvent &evt);
void OnDeleteAll(wxCommandEvent &evt);
void OnApply(wxCommandEvent &evt);
void OnImport(wxCommandEvent &evt);
void OnExport(wxCommandEvent &evt);
void OnSelect(wxCommandEvent &evt);
int GetCandidateCount(const wxString &strPool, bool bIncludeAll);
void GetCandidateList(const wxString &strPool, std::vector<MyCandidate *> &candidateList, bool bIncludeAll);
protected:
void LoadFromFile(const wxString &strFileName);
void SaveToFile(const wxString &strFileName);
void UpdateRow(int iIndex);
int GetCurrentLine();
private:
MyResultDialog *mpResultDialog;
wxGrid *mpGrid;
MyFrame *mpFrame;
int mCurrentLine;
wxDECLARE_EVENT_TABLE();
};
#endif