-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
executable file
·71 lines (44 loc) · 1.38 KB
/
main.cpp
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
#include <wx/wx.h>
#include <wx/notebook.h>
#include "ids.h"
#include "main.h"
#include "vigenere.h"
#include "affine.h"
#include "frequency.h"
#include "contact.h"
#include "subst.h"
IMPLEMENT_APP(WINAPP);
WA_Frame * window = NULL;
bool WINAPP::OnInit(){
window = new WA_Frame();
window->Show(true);
SetTopWindow(window);
return true;
}
BEGIN_EVENT_TABLE(WA_Frame, wxFrame)
END_EVENT_TABLE()
WA_Frame::WA_Frame() : wxFrame((wxFrame *)NULL, wxID_ANY, wxT("Basic CryptAnalysis GUI")){
notebook = new wxNotebook(this, wxID_ANY);
WA_Frequency * frequency = new WA_Frequency(notebook);
frequency->Show(true);
notebook->AddPage(frequency, wxT("Frequency"));
WA_Contact * contact = new WA_Contact(notebook);
contact->Show(true);
notebook->AddPage(contact, wxT("Contact"));
WA_Vigenere * vigenere = new WA_Vigenere(notebook);
vigenere->Show(true);
notebook->AddPage(vigenere, wxT("Vigenere"));
WA_Affine * affine = new WA_Affine(notebook);
affine->Show(true);
notebook->AddPage(affine, wxT("Affine"));
WA_Subst * subst = new WA_Subst(notebook);
subst->Show(true);
notebook->AddPage(subst, wxT("Substitution"));
main_sizer = new wxBoxSizer(wxHORIZONTAL);
main_sizer->Add(notebook, 1, wxEXPAND);
SetSizer(main_sizer);
main_sizer->SetSizeHints(this);
SetSize(wxSize(800,600));
}
WA_Frame::~WA_Frame(){
}