forked from eranif/codelite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWebToolsBase.cpp
609 lines (461 loc) · 29 KB
/
WebToolsBase.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
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: WebToolsBase.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#include "WebToolsBase.h"
// Declare the bitmap loading function
extern void wxCD9C6InitBitmapResources();
static bool bBitmapLoaded = false;
WebToolsSettingsBase::WebToolsSettingsBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxDialog(parent, id, title, pos, size, style)
{
if ( !bBitmapLoaded ) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxCD9C6InitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(boxSizer2);
m_notebook10 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT);
m_notebook10->SetName(wxT("m_notebook10"));
boxSizer2->Add(m_notebook10, 1, wxALL|wxEXPAND, 5);
m_panel56 = new wxPanel(m_notebook10, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_notebook10->AddPage(m_panel56, _("Code Completion"), false);
wxBoxSizer* boxSizer58 = new wxBoxSizer(wxVERTICAL);
m_panel56->SetSizer(boxSizer58);
m_checkBoxEnableJsCC = new wxCheckBox(m_panel56, wxID_ANY, _("Enable JavaScript code completion"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxEnableJsCC->SetValue(true);
m_checkBoxEnableJsCC->SetToolTip(_("Enable JavaScript code completion"));
boxSizer58->Add(m_checkBoxEnableJsCC, 0, wxALL, 5);
m_checkBoxEnableXmlCC = new wxCheckBox(m_panel56, wxID_ANY, _("Enable XML code completion"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxEnableXmlCC->SetValue(true);
m_checkBoxEnableXmlCC->SetToolTip(_("Enable XML code completion"));
boxSizer58->Add(m_checkBoxEnableXmlCC, 0, wxALL, 5);
m_checkBoxEnableHtmlCC = new wxCheckBox(m_panel56, wxID_ANY, _("Enable HTML code completion"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxEnableHtmlCC->SetValue(true);
m_checkBoxEnableHtmlCC->SetToolTip(_("Enable HTML code completion"));
boxSizer58->Add(m_checkBoxEnableHtmlCC, 0, wxALL, 5);
m_panel12 = new wxPanel(m_notebook10, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_notebook10->AddPage(m_panel12, _("JavaScript"), false);
wxBoxSizer* boxSizer22 = new wxBoxSizer(wxVERTICAL);
m_panel12->SetSizer(boxSizer22);
wxArrayString m_pgMgrArr;
wxUnusedVar(m_pgMgrArr);
wxArrayInt m_pgMgrIntArr;
wxUnusedVar(m_pgMgrIntArr);
m_pgMgr = new wxPropertyGridManager(m_panel12, wxID_ANY, wxDefaultPosition, wxSize(300,400), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
boxSizer22->Add(m_pgMgr, 1, wxALL|wxEXPAND, 5);
m_pgProp26 = m_pgMgr->Append( new wxPropertyCategory( _("General") ) );
m_pgProp26->SetHelpString(wxT(""));
m_pgPropLogging = m_pgMgr->AppendIn( m_pgProp26, new wxBoolProperty( _("Verbose Logging"), wxPG_LABEL, 1) );
m_pgPropLogging->SetHelpString(_("The JavaScript code completion uses the \"tern\" engine.\nCheck this option to start tern in verbose mode"));
m_pgProp32 = m_pgMgr->Append( new wxPropertyCategory( _("Libraries") ) );
m_pgProp32->SetHelpString(_("Enable Code Completion for the selected libraries"));
m_pgPropEcma5 = m_pgMgr->AppendIn( m_pgProp32, new wxBoolProperty( _("Ecma5"), wxPG_LABEL, 1) );
m_pgPropEcma5->SetHelpString(wxT(""));
m_pgPropEcma6 = m_pgMgr->AppendIn( m_pgProp32, new wxBoolProperty( _("Ecma6"), wxPG_LABEL, 1) );
m_pgPropEcma6->SetHelpString(wxT(""));
m_pgPropJQuery = m_pgMgr->AppendIn( m_pgProp32, new wxBoolProperty( _("jQuery"), wxPG_LABEL, 1) );
m_pgPropJQuery->SetHelpString(_("Support Code Completion for jQuery framework"));
m_pgPropUnderscore = m_pgMgr->AppendIn( m_pgProp32, new wxBoolProperty( _("Underscore"), wxPG_LABEL, 1) );
m_pgPropUnderscore->SetHelpString(_("Enable code completion for the Underscore library"));
m_pgPropBrowser = m_pgMgr->AppendIn( m_pgProp32, new wxBoolProperty( _("Browser"), wxPG_LABEL, 1) );
m_pgPropBrowser->SetHelpString(_("Enable code completion for browser mode (DOM, document, window etc)"));
m_pgPropChai = m_pgMgr->AppendIn( m_pgProp32, new wxBoolProperty( _("Chai"), wxPG_LABEL, 1) );
m_pgPropChai->SetHelpString(_("Enable code completion for the chain assertion library"));
m_pgPropQML = m_pgMgr->AppendIn( m_pgProp32, new wxBoolProperty( _("QML"), wxPG_LABEL, 1) );
m_pgPropQML->SetHelpString(_("Support for Qt's QML extension for JavaScript"));
m_pgProp46 = m_pgMgr->Append( new wxPropertyCategory( _("Plugins") ) );
m_pgProp46->SetHelpString(wxT(""));
m_pgPropAngular = m_pgMgr->AppendIn( m_pgProp46, new wxBoolProperty( _("Angular"), wxPG_LABEL, 1) );
m_pgPropAngular->SetHelpString(_("Adds the angular object to the top-level environment, and tries to wire up some of the bizarre dependency management scheme from this library, so that dependency injections get the right types"));
m_pgPropStrings = m_pgMgr->AppendIn( m_pgProp46, new wxBoolProperty( _("Strings"), wxPG_LABEL, 1) );
m_pgPropStrings->SetHelpString(_("When enabled, this plugin will gather (short) strings in your code, and completing when inside a string will try to complete to previously seen strings"));
m_pgPropNode = m_pgMgr->AppendIn( m_pgProp46, new wxBoolProperty( _("Node.js"), wxPG_LABEL, 1) );
m_pgPropNode->SetHelpString(_("Provides variables that are part of the node environment, such as process and require, and hooks up require to try and find the dependencies that are being loaded, and assign them the correct types. It also includes types for the built-in modules that node.js provides (\"fs\", \"http\", etc)"));
m_pgPropRequireJS = m_pgMgr->AppendIn( m_pgProp46, new wxBoolProperty( _("RequireJS"), wxPG_LABEL, 1) );
m_pgPropRequireJS->SetHelpString(_("This plugin (\"requirejs\") teaches the server to understand RequireJS-style dependency management. It defines the global functions define and requirejs, and will do its best to resolve dependencies and give them their proper types"));
m_stdBtnSizer4 = new wxStdDialogButtonSizer();
boxSizer2->Add(m_stdBtnSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_stdBtnSizer4->AddButton(m_buttonCancel);
m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_buttonOK->SetDefault();
m_stdBtnSizer4->AddButton(m_buttonOK);
m_stdBtnSizer4->Realize();
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(m_notebook10)){
wxPersistenceManager::Get().RegisterAndRestore(m_notebook10);
} else {
wxPersistenceManager::Get().Restore(m_notebook10);
}
#endif
SetName(wxT("WebToolsSettingsBase"));
SetSize(-1,-1);
if (GetSizer()) {
GetSizer()->Fit(this);
}
if(GetParent()) {
CentreOnParent(wxBOTH);
} else {
CentreOnScreen(wxBOTH);
}
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(this)) {
wxPersistenceManager::Get().RegisterAndRestore(this);
} else {
wxPersistenceManager::Get().Restore(this);
}
#endif
// Connect events
m_checkBoxEnableJsCC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this);
m_checkBoxEnableXmlCC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this);
m_checkBoxEnableHtmlCC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this);
m_pgMgr->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(WebToolsSettingsBase::OnJSValueChanged), NULL, this);
m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(WebToolsSettingsBase::OnOKUI), NULL, this);
m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnOK), NULL, this);
}
WebToolsSettingsBase::~WebToolsSettingsBase()
{
m_checkBoxEnableJsCC->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this);
m_checkBoxEnableXmlCC->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this);
m_checkBoxEnableHtmlCC->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this);
m_pgMgr->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(WebToolsSettingsBase::OnJSValueChanged), NULL, this);
m_buttonOK->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(WebToolsSettingsBase::OnOKUI), NULL, this);
m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnOK), NULL, this);
}
NodeJSDebuggerDlgBase::NodeJSDebuggerDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxDialog(parent, id, title, pos, size, style)
{
if ( !bBitmapLoaded ) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxCD9C6InitBitmapResources();
bBitmapLoaded = true;
}
// Set icon(s) to the application/dialog
wxIconBundle app_icons;
{
wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("nodejs"));
wxIcon icn;
icn.CopyFromBitmap(iconBmp);
app_icons.AddIcon( icn );
}
{
wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("nodejs-32"));
wxIcon icn;
icn.CopyFromBitmap(iconBmp);
app_icons.AddIcon( icn );
}
SetIcons( app_icons );
wxBoxSizer* boxSizer68 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(boxSizer68);
wxFlexGridSizer* flexGridSizer76 = new wxFlexGridSizer(0, 2, 0, 0);
flexGridSizer76->SetFlexibleDirection( wxBOTH );
flexGridSizer76->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
flexGridSizer76->AddGrowableCol(1);
boxSizer68->Add(flexGridSizer76, 0, wxALL|wxEXPAND, 5);
m_staticText78 = new wxStaticText(this, wxID_ANY, _("Node.js executable:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer76->Add(m_staticText78, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
m_filePickerNodeJS = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1,-1), wxFLP_DEFAULT_STYLE|wxFLP_USE_TEXTCTRL|wxFLP_SMALL);
m_filePickerNodeJS->SetToolTip(_("Select Node.js executable"));
m_filePickerNodeJS->SetFocus();
flexGridSizer76->Add(m_filePickerNodeJS, 0, wxALL|wxEXPAND, 5);
m_staticTextScript = new wxStaticText(this, wxID_ANY, _("Script to debug:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer76->Add(m_staticTextScript, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
m_filePickerScript = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1,-1), wxFLP_DEFAULT_STYLE|wxFLP_USE_TEXTCTRL|wxFLP_SMALL);
m_filePickerScript->SetToolTip(_("Select the script to execute"));
flexGridSizer76->Add(m_filePickerScript, 0, wxALL|wxEXPAND, 5);
m_staticTextDebuggerPort = new wxStaticText(this, wxID_ANY, _("Debugger port:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer76->Add(m_staticTextDebuggerPort, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
m_textCtrlPort = new wxTextCtrl(this, wxID_ANY, wxT("5858"), wxDefaultPosition, wxSize(-1,-1), 0);
#if wxVERSION_NUMBER >= 3000
m_textCtrlPort->SetHint(wxT(""));
#endif
flexGridSizer76->Add(m_textCtrlPort, 0, wxALL|wxEXPAND, 5);
m_staticText132 = new wxStaticText(this, wxID_ANY, _("Command line arguments:"), wxDefaultPosition, wxSize(-1,-1), 0);
boxSizer68->Add(m_staticText132, 0, wxALL, 5);
m_stcCommandLineArguments = new wxStyledTextCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
m_stcCommandLineArguments->SetToolTip(_("Pass command line arguments to Node.js\nPlace each argument on its own line"));
// Configure the fold margin
m_stcCommandLineArguments->SetMarginType (4, wxSTC_MARGIN_SYMBOL);
m_stcCommandLineArguments->SetMarginMask (4, wxSTC_MASK_FOLDERS);
m_stcCommandLineArguments->SetMarginSensitive(4, true);
m_stcCommandLineArguments->SetMarginWidth (4, 0);
// Configure the tracker margin
m_stcCommandLineArguments->SetMarginWidth(1, 0);
// Configure the symbol margin
m_stcCommandLineArguments->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
m_stcCommandLineArguments->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
m_stcCommandLineArguments->SetMarginWidth(2, 0);
m_stcCommandLineArguments->SetMarginSensitive(2, true);
// Configure the line numbers margin
m_stcCommandLineArguments->SetMarginType(0, wxSTC_MARGIN_NUMBER);
m_stcCommandLineArguments->SetMarginWidth(0,0);
// Configure the line symbol margin
m_stcCommandLineArguments->SetMarginType(3, wxSTC_MARGIN_FORE);
m_stcCommandLineArguments->SetMarginMask(3, 0);
m_stcCommandLineArguments->SetMarginWidth(3,0);
// Select the lexer
m_stcCommandLineArguments->SetLexer(wxSTC_LEX_NULL);
// Set default font / styles
m_stcCommandLineArguments->StyleClearAll();
m_stcCommandLineArguments->SetWrapMode(0);
m_stcCommandLineArguments->SetIndentationGuides(0);
m_stcCommandLineArguments->SetKeyWords(0, wxT(""));
m_stcCommandLineArguments->SetKeyWords(1, wxT(""));
m_stcCommandLineArguments->SetKeyWords(2, wxT(""));
m_stcCommandLineArguments->SetKeyWords(3, wxT(""));
m_stcCommandLineArguments->SetKeyWords(4, wxT(""));
boxSizer68->Add(m_stcCommandLineArguments, 1, wxALL|wxEXPAND, 5);
m_stdBtnSizer70 = new wxStdDialogButtonSizer();
boxSizer68->Add(m_stdBtnSizer70, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_buttonOK->SetDefault();
m_stdBtnSizer70->AddButton(m_buttonOK);
m_button74 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_stdBtnSizer70->AddButton(m_button74);
m_stdBtnSizer70->Realize();
SetName(wxT("NodeJSDebuggerDlgBase"));
SetSize(-1,-1);
if (GetSizer()) {
GetSizer()->Fit(this);
}
if(GetParent()) {
CentreOnParent(wxBOTH);
} else {
CentreOnScreen(wxBOTH);
}
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(this)) {
wxPersistenceManager::Get().RegisterAndRestore(this);
} else {
wxPersistenceManager::Get().Restore(this);
}
#endif
// Connect events
m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NodeJSDebuggerDlgBase::OnOKUI), NULL, this);
}
NodeJSDebuggerDlgBase::~NodeJSDebuggerDlgBase()
{
m_buttonOK->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NodeJSDebuggerDlgBase::OnOKUI), NULL, this);
}
NodeJSDebuggerPaneBase::NodeJSDebuggerPaneBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
: wxPanel(parent, id, pos, size, style)
{
if ( !bBitmapLoaded ) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxCD9C6InitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* boxSizer88 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(boxSizer88);
m_splitter104 = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE);
m_splitter104->SetSashGravity(0.33);
m_splitter104->SetMinimumPaneSize(10);
boxSizer88->Add(m_splitter104, 1, wxALL|wxEXPAND, 0);
m_splitterPage112 = new wxPanel(m_splitter104, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
wxBoxSizer* boxSizer120 = new wxBoxSizer(wxVERTICAL);
m_splitterPage112->SetSizer(boxSizer120);
m_dataviewLocals = new wxDataViewCtrl(m_splitterPage112, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_VERT_RULES|wxDV_HORIZ_RULES|wxDV_ROW_LINES|wxDV_SINGLE|wxBORDER_SIMPLE);
m_dataviewLocalsModel = new m_dataview126Model;
m_dataviewLocalsModel->SetColCount( 3 );
m_dataviewLocals->AssociateModel(m_dataviewLocalsModel.get() );
boxSizer120->Add(m_dataviewLocals, 1, wxALL|wxEXPAND, 2);
m_dataviewLocals->AppendTextColumn(_("Name"), m_dataviewLocals->GetColumnCount(), wxDATAVIEW_CELL_INERT, 200, wxALIGN_LEFT);
m_dataviewLocals->AppendTextColumn(_("Type"), m_dataviewLocals->GetColumnCount(), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT);
m_dataviewLocals->AppendTextColumn(_("Value"), m_dataviewLocals->GetColumnCount(), wxDATAVIEW_CELL_INERT, 500, wxALIGN_LEFT);
m_splitterPage108 = new wxPanel(m_splitter104, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_splitter104->SplitVertically(m_splitterPage112, m_splitterPage108, 0);
wxBoxSizer* boxSizer118 = new wxBoxSizer(wxVERTICAL);
m_splitterPage108->SetSizer(boxSizer118);
m_splitter168 = new wxSplitterWindow(m_splitterPage108, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE);
m_splitter168->SetSashGravity(0.5);
m_splitter168->SetMinimumPaneSize(10);
boxSizer118->Add(m_splitter168, 1, wxEXPAND, 5);
m_splitterPage172 = new wxPanel(m_splitter168, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
wxBoxSizer* boxSizer178 = new wxBoxSizer(wxVERTICAL);
m_splitterPage172->SetSizer(boxSizer178);
m_dvListCtrlCallstack = new wxDataViewListCtrl(m_splitterPage172, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_VERT_RULES|wxDV_HORIZ_RULES|wxDV_ROW_LINES|wxDV_SINGLE|wxBORDER_SIMPLE);
boxSizer178->Add(m_dvListCtrlCallstack, 1, wxALL|wxEXPAND, 2);
m_dvListCtrlCallstack->AppendTextColumn(_("#"), wxDATAVIEW_CELL_INERT, 40, wxALIGN_LEFT);
m_dvListCtrlCallstack->AppendTextColumn(_("Function"), wxDATAVIEW_CELL_INERT, 200, wxALIGN_LEFT);
m_dvListCtrlCallstack->AppendTextColumn(_("File"), wxDATAVIEW_CELL_INERT, 300, wxALIGN_LEFT);
m_dvListCtrlCallstack->AppendTextColumn(_("Line"), wxDATAVIEW_CELL_INERT, 50, wxALIGN_LEFT);
m_splitterPage176 = new wxPanel(m_splitter168, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_splitter168->SplitVertically(m_splitterPage172, m_splitterPage176, 0);
wxBoxSizer* boxSizer180 = new wxBoxSizer(wxVERTICAL);
m_splitterPage176->SetSizer(boxSizer180);
m_notebook = new Notebook(m_splitterPage176, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT);
m_notebook->SetName(wxT("m_notebook"));
boxSizer180->Add(m_notebook, 1, wxALL|wxEXPAND, 2);
m_panelConsoleLog = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_notebook->AddPage(m_panelConsoleLog, _("Console"), true);
wxBoxSizer* boxSizer188 = new wxBoxSizer(wxVERTICAL);
m_panelConsoleLog->SetSizer(boxSizer188);
m_consoleLog = new wxStyledTextCtrl(m_panelConsoleLog, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
// Configure the fold margin
m_consoleLog->SetMarginType (4, wxSTC_MARGIN_SYMBOL);
m_consoleLog->SetMarginMask (4, wxSTC_MASK_FOLDERS);
m_consoleLog->SetMarginSensitive(4, true);
m_consoleLog->SetMarginWidth (4, 0);
// Configure the tracker margin
m_consoleLog->SetMarginWidth(1, 0);
// Configure the symbol margin
m_consoleLog->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
m_consoleLog->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
m_consoleLog->SetMarginWidth(2, 0);
m_consoleLog->SetMarginSensitive(2, true);
// Configure the line numbers margin
m_consoleLog->SetMarginType(0, wxSTC_MARGIN_NUMBER);
m_consoleLog->SetMarginWidth(0,0);
// Configure the line symbol margin
m_consoleLog->SetMarginType(3, wxSTC_MARGIN_FORE);
m_consoleLog->SetMarginMask(3, 0);
m_consoleLog->SetMarginWidth(3,0);
// Select the lexer
m_consoleLog->SetLexer(wxSTC_LEX_NULL);
// Set default font / styles
m_consoleLog->StyleClearAll();
m_consoleLog->SetWrapMode(0);
m_consoleLog->SetIndentationGuides(0);
m_consoleLog->SetKeyWords(0, wxT(""));
m_consoleLog->SetKeyWords(1, wxT(""));
m_consoleLog->SetKeyWords(2, wxT(""));
m_consoleLog->SetKeyWords(3, wxT(""));
m_consoleLog->SetKeyWords(4, wxT(""));
boxSizer188->Add(m_consoleLog, 1, wxALL|wxEXPAND, 2);
m_textCtrlExpression = new wxTextCtrl(m_panelConsoleLog, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_PROCESS_ENTER);
m_textCtrlExpression->SetFocus();
#if wxVERSION_NUMBER >= 3000
m_textCtrlExpression->SetHint(_("Evaluate expression"));
#endif
boxSizer188->Add(m_textCtrlExpression, 0, wxALL|wxEXPAND, 2);
m_panelBreakpoints = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_notebook->AddPage(m_panelBreakpoints, _("Breakpoints"), false);
wxBoxSizer* boxSizer190 = new wxBoxSizer(wxVERTICAL);
m_panelBreakpoints->SetSizer(boxSizer190);
m_dvListCtrlBreakpoints = new wxDataViewListCtrl(m_panelBreakpoints, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_VERT_RULES|wxDV_HORIZ_RULES|wxDV_ROW_LINES|wxDV_SINGLE);
boxSizer190->Add(m_dvListCtrlBreakpoints, 1, wxALL|wxEXPAND, 2);
m_dvListCtrlBreakpoints->AppendTextColumn(_("ID"), wxDATAVIEW_CELL_INERT, 40, wxALIGN_LEFT);
m_dvListCtrlBreakpoints->AppendTextColumn(_("Line"), wxDATAVIEW_CELL_INERT, 50, wxALIGN_LEFT);
m_dvListCtrlBreakpoints->AppendTextColumn(_("File"), wxDATAVIEW_CELL_INERT, 250, wxALIGN_LEFT);
SetName(wxT("NodeJSDebuggerPaneBase"));
SetSize(500,250);
if (GetSizer()) {
GetSizer()->Fit(this);
}
// Connect events
m_dataviewLocals->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEventHandler(NodeJSDebuggerPaneBase::OnLocalExpanding), NULL, this);
m_dvListCtrlCallstack->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(NodeJSDebuggerPaneBase::OnItemActivated), NULL, this);
m_dvListCtrlCallstack->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(NodeJSDebuggerPaneBase::OnItemActivated), NULL, this);
m_textCtrlExpression->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(NodeJSDebuggerPaneBase::OnEvaluateExpression), NULL, this);
m_dvListCtrlBreakpoints->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(NodeJSDebuggerPaneBase::OnBreakpointSelected), NULL, this);
m_dvListCtrlBreakpoints->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(NodeJSDebuggerPaneBase::OnBreakpointSelected), NULL, this);
}
NodeJSDebuggerPaneBase::~NodeJSDebuggerPaneBase()
{
m_dataviewLocals->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEventHandler(NodeJSDebuggerPaneBase::OnLocalExpanding), NULL, this);
m_dvListCtrlCallstack->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(NodeJSDebuggerPaneBase::OnItemActivated), NULL, this);
m_dvListCtrlCallstack->Disconnect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(NodeJSDebuggerPaneBase::OnItemActivated), NULL, this);
m_textCtrlExpression->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(NodeJSDebuggerPaneBase::OnEvaluateExpression), NULL, this);
m_dvListCtrlBreakpoints->Disconnect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(NodeJSDebuggerPaneBase::OnBreakpointSelected), NULL, this);
m_dvListCtrlBreakpoints->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(NodeJSDebuggerPaneBase::OnBreakpointSelected), NULL, this);
}
NodeJSNewWorkspaceDlgBase::NodeJSNewWorkspaceDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxDialog(parent, id, title, pos, size, style)
{
if ( !bBitmapLoaded ) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxCD9C6InitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* boxSizer140 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(boxSizer140);
wxFlexGridSizer* flexGridSizer148 = new wxFlexGridSizer(0, 2, 0, 0);
flexGridSizer148->SetFlexibleDirection( wxBOTH );
flexGridSizer148->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
flexGridSizer148->AddGrowableCol(1);
boxSizer140->Add(flexGridSizer148, 1, wxALL|wxEXPAND, 5);
m_staticText160 = new wxStaticText(this, wxID_ANY, _("Name:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer148->Add(m_staticText160, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
m_textCtrllName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
m_textCtrllName->SetFocus();
#if wxVERSION_NUMBER >= 3000
m_textCtrllName->SetHint(wxT(""));
#endif
flexGridSizer148->Add(m_textCtrllName, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
m_staticText150 = new wxStaticText(this, wxID_ANY, _("Path:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer148->Add(m_staticText150, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
m_dirPickerFolder = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxSize(-1,-1), wxDIRP_SMALL|wxDIRP_DEFAULT_STYLE|wxDIRP_USE_TEXTCTRL);
flexGridSizer148->Add(m_dirPickerFolder, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
flexGridSizer148->Add(0, 0, 1, wxALL, 5);
m_checkBoxNewFolder = new wxCheckBox(this, wxID_ANY, _("Create the workspace in a separate directory"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxNewFolder->SetValue(true);
flexGridSizer148->Add(m_checkBoxNewFolder, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
m_staticTextPreview = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxALIGN_CENTRE);
m_staticTextPreview->SetForegroundColour(wxColour(wxT("rgb(21,144,18)")));
boxSizer140->Add(m_staticTextPreview, 0, wxALL|wxEXPAND, 5);
m_stdBtnSizer142 = new wxStdDialogButtonSizer();
boxSizer140->Add(m_stdBtnSizer142, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
m_button144 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_button144->SetDefault();
m_stdBtnSizer142->AddButton(m_button144);
m_button146 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_stdBtnSizer142->AddButton(m_button146);
m_stdBtnSizer142->Realize();
SetName(wxT("NodeJSNewWorkspaceDlgBase"));
SetSize(-1,-1);
if (GetSizer()) {
GetSizer()->Fit(this);
}
if(GetParent()) {
CentreOnParent(wxBOTH);
} else {
CentreOnScreen(wxBOTH);
}
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(this)) {
wxPersistenceManager::Get().RegisterAndRestore(this);
} else {
wxPersistenceManager::Get().Restore(this);
}
#endif
// Connect events
m_textCtrllName->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NodeJSNewWorkspaceDlgBase::OnTextUpdate), NULL, this);
m_dirPickerFolder->Connect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(NodeJSNewWorkspaceDlgBase::OnFolderSelected), NULL, this);
m_checkBoxNewFolder->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(NodeJSNewWorkspaceDlgBase::OnCheckNewFolder), NULL, this);
m_button144->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NodeJSNewWorkspaceDlgBase::OnOKUI), NULL, this);
}
NodeJSNewWorkspaceDlgBase::~NodeJSNewWorkspaceDlgBase()
{
m_textCtrllName->Disconnect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NodeJSNewWorkspaceDlgBase::OnTextUpdate), NULL, this);
m_dirPickerFolder->Disconnect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(NodeJSNewWorkspaceDlgBase::OnFolderSelected), NULL, this);
m_checkBoxNewFolder->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(NodeJSNewWorkspaceDlgBase::OnCheckNewFolder), NULL, this);
m_button144->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NodeJSNewWorkspaceDlgBase::OnOKUI), NULL, this);
}
WebToolsImages::WebToolsImages()
: wxImageList(16, 16, true)
{
if ( !bBitmapLoaded ) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxCD9C6InitBitmapResources();
bBitmapLoaded = true;
}
{
wxBitmap bmp;
wxIcon icn;
bmp = wxXmlResource::Get()->LoadBitmap(wxT("m_bmpNodeJS"));
icn.CopyFromBitmap( bmp );
this->Add( icn );
m_bitmaps.insert( std::make_pair(wxT("m_bmpNodeJS"), bmp ) );
}
}
WebToolsImages::~WebToolsImages()
{
}