-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpanel_wdr.cpp
More file actions
executable file
·243 lines (182 loc) · 8.59 KB
/
panel_wdr.cpp
File metadata and controls
executable file
·243 lines (182 loc) · 8.59 KB
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
//------------------------------------------------------------------------------
// Source code generated by wxDesigner from file: panel.wdr
// Do not modify this file, all changes will be lost!
//------------------------------------------------------------------------------
#ifdef __GNUG__
#pragma implementation "panel_wdr.h"
#endif
// For compilers that support precompilation
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// Include private header
#include "panel_wdr.h"
// Implement window functions
wxSizer *top_panel( wxWindow *parent, bool call_fit, bool set_sizer )
{
wxFlexGridSizer *item0 = new wxFlexGridSizer( 1, 0, 0 );
item0->AddGrowableCol( 0 );
item0->AddGrowableCol( 1 );
item0->AddGrowableCol( 2 );
item0->AddGrowableCol( 3 );
item0->AddGrowableCol( 4 );
item0->AddGrowableRow( 2 );
item0->AddGrowableRow( 3 );
item0->AddGrowableRow( 4 );
wxFlexGridSizer *item1 = new wxFlexGridSizer( 4, 0, 0 );
item1->AddGrowableCol( 1 );
wxStaticText *item2 = new wxStaticText( parent, ID_TEXT, wxT("Host/IP:"), wxDefaultPosition, wxDefaultSize, 0 );
item1->Add( item2, 0, wxADJUST_MINSIZE|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxTextCtrl *item3 = new wxTextCtrl( parent, TEXT_HOST, wxT("127.0.0.1"), wxDefaultPosition, wxSize(200,-1), 0 );
item1->Add( item3, 20, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxButton *item4 = new wxButton( parent, ID_START, wxT("Scan"), wxDefaultPosition, wxDefaultSize, 0 );
item1->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxButton *item5 = new wxButton( parent, ID_STOP, wxT("Stop"), wxDefaultPosition, wxDefaultSize, 0 );
item1->Add( item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
item0->Add( item1, 0, wxGROW|wxALL, 5 );
wxStaticLine *item6 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
item0->Add( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxGridSizer *item7 = new wxGridSizer( 1, 0, 0, 0 );
wxNotebook *item9 = new wxNotebook( parent, ID_NOTEBOOK, wxDefaultPosition, wxSize(200,160), 0 );
wxNotebookSizer *item8 = new wxNotebookSizer( item9 );
wxPanel *item10 = new wxPanel( item9, -1 );
scan_panel( item10, FALSE );
item9->AddPage( item10, wxT("Scan") );
wxPanel *item11 = new wxPanel( item9, -1 );
options_panel( item11, FALSE );
item9->AddPage( item11, wxT("Options") );
item7->Add( item8, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
item0->Add( item7, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
wxListCtrl *item12 = new wxListCtrl( parent, PORT_LIST, wxDefaultPosition, wxSize(160,130), wxLC_REPORT|wxSUNKEN_BORDER );
item0->Add( item12, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
if (set_sizer)
{
parent->SetAutoLayout( TRUE );
parent->SetSizer( item0 );
if (call_fit)
{
item0->Fit( parent );
item0->SetSizeHints( parent );
}
}
return item0;
}
wxSizer *scan_panel( wxWindow *parent, bool call_fit, bool set_sizer )
{
wxFlexGridSizer *item0 = new wxFlexGridSizer( 2, 0, 0 );
item0->AddGrowableCol( 0 );
item0->AddGrowableCol( 1 );
item0->AddGrowableCol( 2 );
item0->AddGrowableRow( 0 );
item0->AddGrowableRow( 1 );
item0->AddGrowableRow( 2 );
wxStaticBox *item2 = new wxStaticBox( parent, -1, wxT("Scan Type:") );
wxStaticBoxSizer *item1 = new wxStaticBoxSizer( item2, wxVERTICAL );
wxString strs3[] =
{
wxT("Connect"),
wxT("UDP"),
wxT("SYN"),
wxT("FIN"),
wxT("XMAS"),
wxT("NULL")
};
wxChoice *item3 = new wxChoice( parent, SCAN_CHOICE, wxDefaultPosition, wxSize(100,-1), 6, strs3, 0 );
item1->Add( item3, 0, wxGROW|wxALL, 5 );
item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxStaticBox *item5 = new wxStaticBox( parent, -1, wxT("Ports to Scan") );
wxStaticBoxSizer *item4 = new wxStaticBoxSizer( item5, wxVERTICAL );
wxString strs6[] =
{
wxT("Default"),
wxT("Custom")
};
wxChoice *item6 = new wxChoice( parent, PORT_CHOICE, wxDefaultPosition, wxSize(100,-1), 2, strs6, 0 );
item4->Add( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxFlexGridSizer *item7 = new wxFlexGridSizer( 1, 0, 0, 0 );
item7->AddGrowableCol( 0 );
item7->AddGrowableCol( 1 );
item7->AddGrowableCol( 2 );
item7->AddGrowableCol( 3 );
item7->AddGrowableCol( 4 );
item7->AddGrowableRow( 0 );
item7->AddGrowableRow( 1 );
item7->AddGrowableRow( 2 );
wxStaticText *item8 = new wxStaticText( parent, ID_TEXT, wxT("From:"), wxDefaultPosition, wxDefaultSize, 0 );
item7->Add( item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxTextCtrl *item9 = new wxTextCtrl( parent, START_PORT, wxT("1"), wxDefaultPosition, wxSize(50,-1), 0 );
item9->Enable( FALSE );
item7->Add( item9, 0, wxALIGN_CENTRE|wxALL, 5 );
wxStaticText *item10 = new wxStaticText( parent, ID_TEXT, wxT("To:"), wxDefaultPosition, wxDefaultSize, 0 );
item7->Add( item10, 0, wxALIGN_CENTRE|wxALL, 5 );
wxTextCtrl *item11 = new wxTextCtrl( parent, END_PORT, wxT("65535"), wxDefaultPosition, wxSize(50,-1), 0 );
item11->Enable( FALSE );
item7->Add( item11, 0, wxALIGN_CENTRE|wxALL, 5 );
item4->Add( item7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
item0->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
if (set_sizer)
{
parent->SetAutoLayout( TRUE );
parent->SetSizer( item0 );
if (call_fit)
{
item0->Fit( parent );
item0->SetSizeHints( parent );
}
}
return item0;
}
wxSizer *options_panel( wxWindow *parent, bool call_fit, bool set_sizer )
{
wxFlexGridSizer *item0 = new wxFlexGridSizer( 2, 0, 0 );
item0->AddGrowableCol( 0 );
item0->AddGrowableCol( 1 );
item0->AddGrowableCol( 2 );
item0->AddGrowableCol( 3 );
item0->AddGrowableRow( 0 );
item0->AddGrowableRow( 1 );
item0->AddGrowableRow( 2 );
item0->AddGrowableRow( 3 );
wxStaticBox *item2 = new wxStaticBox( parent, -1, wxT("Time-Out (Connect() only)") );
wxStaticBoxSizer *item1 = new wxStaticBoxSizer( item2, wxVERTICAL );
wxFlexGridSizer *item3 = new wxFlexGridSizer( 2, 0, 0 );
wxStaticText *item4 = new wxStaticText( parent, ID_TEXT, wxT("Sec:"), wxDefaultPosition, wxDefaultSize, 0 );
item3->Add( item4, 0, wxALIGN_CENTRE|wxALL, 5 );
wxSpinCtrl *item5 = new wxSpinCtrl( parent, SEC_TEXT, wxT("1"), wxDefaultPosition, wxSize(100,-1), 0, 0, 100, 1 );
item3->Add( item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxStaticText *item6 = new wxStaticText( parent, ID_TEXT, wxT("uSec:"), wxDefaultPosition, wxDefaultSize, 0 );
item3->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 );
wxSpinCtrl *item7 = new wxSpinCtrl( parent, USEC_TEXT, wxT("0"), wxDefaultPosition, wxSize(100,-1), 0, 1, 10000, 0 );
item3->Add( item7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
item1->Add( item3, 0, wxALIGN_CENTRE|wxALL, 0 );
item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxStaticBox *item9 = new wxStaticBox( parent, -1, wxT("Threads") );
wxStaticBoxSizer *item8 = new wxStaticBoxSizer( item9, wxVERTICAL );
wxStaticText *item10 = new wxStaticText( parent, ID_TEXT, wxT("Max Threads:"), wxDefaultPosition, wxDefaultSize, 0 );
item8->Add( item10, 0, wxALIGN_CENTRE|wxALL, 5 );
wxSpinCtrl *item11 = new wxSpinCtrl( parent, THREAD_TEXT, wxT("200"), wxDefaultPosition, wxSize(100,-1), 0, 1, 500, 100 );
item8->Add( item11, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxCheckBox *item12 = new wxCheckBox( parent, CHECK_THREADS, wxT("Disable Threads"), wxDefaultPosition, wxDefaultSize, 0 );
item8->Add( item12, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
item0->Add( item8, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxStaticText *item13 = new wxStaticText( parent, ID_TEXT, wxT("Raw packet delay (ms):"), wxDefaultPosition, wxDefaultSize, 0 );
item0->Add( item13, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxSpinCtrl *item14 = new wxSpinCtrl( parent, DELAY_TEXT, wxT("25"), wxDefaultPosition, wxSize(100,-1), 0, 1, 1000000, 25 );
item0->Add( item14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
if (set_sizer)
{
parent->SetAutoLayout( TRUE );
parent->SetSizer( item0 );
if (call_fit)
{
item0->Fit( parent );
item0->SetSizeHints( parent );
}
}
return item0;
}
// Implement menubar functions
// Implement toolbar functions
// Implement bitmap functions
// End of generated file