File: UI.cpp

package info (click to toggle)
codelite 14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 112,816 kB
  • sloc: cpp: 483,662; ansic: 150,144; php: 9,569; lex: 4,186; python: 3,417; yacc: 2,820; sh: 1,147; makefile: 52; xml: 13
file content (691 lines) | stat: -rw-r--r-- 32,983 bytes parent folder | download
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
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: UI.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#include "UI.h"

// Declare the bitmap loading function
extern void wxCrafternz79PnInitBitmapResources();

static bool bBitmapLoaded = false;

LLDBCallStackBase::LLDBCallStackBase(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);
        wxCrafternz79PnInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer2);

    m_dvListCtrlBacktrace = new clThemedListCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                                 wxDV_ROW_LINES | wxDV_SINGLE | wxBORDER_NONE);

    boxSizer2->Add(m_dvListCtrlBacktrace, 1, wxEXPAND, WXC_FROM_DIP(2));

    m_dvListCtrlBacktrace->AppendTextColumn(_("#"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                            wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlBacktrace->AppendTextColumn(_("Function"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                            wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlBacktrace->AppendTextColumn(_("File"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                            wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlBacktrace->AppendTextColumn(_("Line"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                            wxDATAVIEW_COL_RESIZABLE);

    SetName(wxT("LLDBCallStackBase"));
    SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    // Connect events
    m_dvListCtrlBacktrace->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED,
                                   wxDataViewEventHandler(LLDBCallStackBase::OnItemActivated), NULL, this);
    m_dvListCtrlBacktrace->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU,
                                   wxDataViewEventHandler(LLDBCallStackBase::OnContextMenu), NULL, this);
}

LLDBCallStackBase::~LLDBCallStackBase()
{
    m_dvListCtrlBacktrace->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED,
                                      wxDataViewEventHandler(LLDBCallStackBase::OnItemActivated), NULL, this);
    m_dvListCtrlBacktrace->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU,
                                      wxDataViewEventHandler(LLDBCallStackBase::OnContextMenu), NULL, this);
}

LLDBOutputViewBase::LLDBOutputViewBase(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);
        wxCrafternz79PnInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer10 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer10);

    m_notebook205 = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxBK_DEFAULT);
    m_notebook205->SetName(wxT("m_notebook205"));

    boxSizer10->Add(m_notebook205, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_pageBreakpoints = new wxPanel(m_notebook205, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_notebook205, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook205->AddPage(m_pageBreakpoints, _("Breakpoints"), true);

    wxBoxSizer* boxSizer211 = new wxBoxSizer(wxVERTICAL);
    m_pageBreakpoints->SetSizer(boxSizer211);

    m_tbBreakpoints = new clToolBar(m_pageBreakpoints, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_pageBreakpoints, wxSize(-1, -1)), wxTB_FLAT);
    m_tbBreakpoints->SetToolBitmapSize(wxSize(16, 16));

    boxSizer211->Add(m_tbBreakpoints, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_treeCtrlBreakpoints = new clThemedTreeCtrl(m_pageBreakpoints, wxID_ANY, wxDefaultPosition,
                                                 wxDLG_UNIT(m_pageBreakpoints, wxSize(-1, -1)),
                                                 wxTR_MULTIPLE | wxTR_HIDE_ROOT | wxBORDER_NONE);

    boxSizer211->Add(m_treeCtrlBreakpoints, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panelConsole = new wxPanel(m_notebook205, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook205, wxSize(-1, -1)),
                                 wxTAB_TRAVERSAL);
    m_notebook205->AddPage(m_panelConsole, _("Console"), false);

    wxBoxSizer* boxSizer213 = new wxBoxSizer(wxVERTICAL);
    m_panelConsole->SetSizer(boxSizer213);

    m_stcConsole = new wxStyledTextCtrl(m_panelConsole, wxID_ANY, wxDefaultPosition,
                                        wxDLG_UNIT(m_panelConsole, wxSize(-1, -1)), 0);
    // Configure the fold margin
    m_stcConsole->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_stcConsole->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_stcConsole->SetMarginSensitive(4, true);
    m_stcConsole->SetMarginWidth(4, 0);

    // Configure the tracker margin
    m_stcConsole->SetMarginWidth(1, 0);

    // Configure the symbol margin
    m_stcConsole->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
    m_stcConsole->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
    m_stcConsole->SetMarginWidth(2, 0);
    m_stcConsole->SetMarginSensitive(2, true);

    // Configure the line numbers margin
    m_stcConsole->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcConsole->SetMarginWidth(0, 0);

    // Configure the line symbol margin
    m_stcConsole->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcConsole->SetMarginMask(3, 0);
    m_stcConsole->SetMarginWidth(3, 0);
    // Select the lexer
    m_stcConsole->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcConsole->StyleClearAll();
    m_stcConsole->SetWrapMode(0);
    m_stcConsole->SetIndentationGuides(0);
    m_stcConsole->SetKeyWords(0, wxT(""));
    m_stcConsole->SetKeyWords(1, wxT(""));
    m_stcConsole->SetKeyWords(2, wxT(""));
    m_stcConsole->SetKeyWords(3, wxT(""));
    m_stcConsole->SetKeyWords(4, wxT(""));

    boxSizer213->Add(m_stcConsole, 1, wxEXPAND, WXC_FROM_DIP(2));

    m_textCtrlConsoleSend = new wxTextCtrl(m_panelConsole, wxID_ANY, wxT(""), wxDefaultPosition,
                                           wxDLG_UNIT(m_panelConsole, wxSize(-1, -1)), wxTE_PROCESS_ENTER);
    m_textCtrlConsoleSend->SetFocus();
#if wxVERSION_NUMBER >= 3000
    m_textCtrlConsoleSend->SetHint(_("Send commands to lldb"));
#endif

    boxSizer213->Add(m_textCtrlConsoleSend, 0, wxALL | wxEXPAND, WXC_FROM_DIP(2));

    SetName(wxT("LLDBOutputViewBase"));
    SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    // Connect events
    m_treeCtrlBreakpoints->Connect(wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
                                   wxTreeEventHandler(LLDBOutputViewBase::OnBpActivated), NULL, this);
    m_textCtrlConsoleSend->Connect(wxEVT_COMMAND_TEXT_ENTER,
                                   wxCommandEventHandler(LLDBOutputViewBase::OnSendCommandToLLDB), NULL, this);
}

LLDBOutputViewBase::~LLDBOutputViewBase()
{
    m_treeCtrlBreakpoints->Disconnect(wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
                                      wxTreeEventHandler(LLDBOutputViewBase::OnBpActivated), NULL, this);
    m_textCtrlConsoleSend->Disconnect(wxEVT_COMMAND_TEXT_ENTER,
                                      wxCommandEventHandler(LLDBOutputViewBase::OnSendCommandToLLDB), NULL, this);
}

LLDBNewBreakpointDlgBase::LLDBNewBreakpointDlgBase(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);
        wxCrafternz79PnInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer32 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer32);

    wxFlexGridSizer* flexGridSizer41 = new wxFlexGridSizer(0, 3, 0, 0);
    flexGridSizer41->SetFlexibleDirection(wxBOTH);
    flexGridSizer41->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer41->AddGrowableCol(1);

    boxSizer32->Add(flexGridSizer41, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxFileLine = new wxCheckBox(this, wxID_ANY, _("File and Line:"), wxDefaultPosition,
                                        wxDLG_UNIT(this, wxSize(-1, -1)), wxALIGN_RIGHT);
    m_checkBoxFileLine->SetValue(false);

    flexGridSizer41->Add(m_checkBoxFileLine, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlFile = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textCtrlFile->SetToolTip(_("File name"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlFile->SetHint(wxT(""));
#endif

    flexGridSizer41->Add(m_textCtrlFile, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlLine = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textCtrlLine->SetToolTip(_("Line number"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlLine->SetHint(wxT(""));
#endif

    flexGridSizer41->Add(m_textCtrlLine, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_checkBoxFuncName = new wxCheckBox(this, wxID_ANY, _("Function name:"), wxDefaultPosition,
                                        wxDLG_UNIT(this, wxSize(-1, -1)), wxALIGN_RIGHT);
    m_checkBoxFuncName->SetValue(false);

    flexGridSizer41->Add(m_checkBoxFuncName, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlFunctionName =
        new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlFunctionName->SetHint(wxT(""));
#endif

    flexGridSizer41->Add(m_textCtrlFunctionName, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    flexGridSizer41->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));

    m_stdBtnSizer34 = new wxStdDialogButtonSizer();

    boxSizer32->Add(m_stdBtnSizer34, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button36 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button36->SetDefault();
    m_stdBtnSizer34->AddButton(m_button36);

    m_button38 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer34->AddButton(m_button38);
    m_stdBtnSizer34->Realize();

    SetName(wxT("LLDBNewBreakpointDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-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_checkBoxFileLine->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
                                wxCommandEventHandler(LLDBNewBreakpointDlgBase::OnCheckFileAndLine), NULL, this);
    m_textCtrlFile->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBNewBreakpointDlgBase::OnFileLineEnabledUI),
                            NULL, this);
    m_textCtrlLine->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBNewBreakpointDlgBase::OnFileLineEnabledUI),
                            NULL, this);
    m_checkBoxFuncName->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
                                wxCommandEventHandler(LLDBNewBreakpointDlgBase::OnCheckFuncName), NULL, this);
    m_textCtrlFunctionName->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBNewBreakpointDlgBase::OnFuncNameUI),
                                    NULL, this);
}

LLDBNewBreakpointDlgBase::~LLDBNewBreakpointDlgBase()
{
    m_checkBoxFileLine->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
                                   wxCommandEventHandler(LLDBNewBreakpointDlgBase::OnCheckFileAndLine), NULL, this);
    m_textCtrlFile->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBNewBreakpointDlgBase::OnFileLineEnabledUI),
                               NULL, this);
    m_textCtrlLine->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBNewBreakpointDlgBase::OnFileLineEnabledUI),
                               NULL, this);
    m_checkBoxFuncName->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
                                   wxCommandEventHandler(LLDBNewBreakpointDlgBase::OnCheckFuncName), NULL, this);
    m_textCtrlFunctionName->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBNewBreakpointDlgBase::OnFuncNameUI),
                                       NULL, this);
}

LLDBLocalsViewBase::LLDBLocalsViewBase(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);
        wxCrafternz79PnInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer67 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer67);

    m_toolbar = new clToolBar(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTB_FLAT);
    m_toolbar->SetToolBitmapSize(wxSize(16, 16));

    boxSizer67->Add(m_toolbar, 0, wxEXPAND, WXC_FROM_DIP(5));

    SetName(wxT("LLDBLocalsViewBase"));
    SetMinClientSize(wxSize(200, 200));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
}

LLDBLocalsViewBase::~LLDBLocalsViewBase() {}

LLDBSettingDialogBase::LLDBSettingDialogBase(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);
        wxCrafternz79PnInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer77 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer77);

    m_notebook87 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(500, 400)), wxBK_DEFAULT);
    m_notebook87->SetName(wxT("m_notebook87"));

    boxSizer77->Add(m_notebook87, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_panel89 = new wxPanel(m_notebook87, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook87, wxSize(-1, -1)),
                            wxTAB_TRAVERSAL);
    m_notebook87->AddPage(m_panel89, _("General"), true);

    wxBoxSizer* boxSizer93 = new wxBoxSizer(wxVERTICAL);
    m_panel89->SetSizer(boxSizer93);

    wxArrayString m_pgMgrDisplayPropertiesArr;
    wxUnusedVar(m_pgMgrDisplayPropertiesArr);
    wxArrayInt m_pgMgrDisplayPropertiesIntArr;
    wxUnusedVar(m_pgMgrDisplayPropertiesIntArr);
    m_pgMgrDisplayProperties =
        new wxPropertyGridManager(m_panel89, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel89, wxSize(-1, -1)),
                                  wxPG_DESCRIPTION | wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED);

    boxSizer93->Add(m_pgMgrDisplayProperties, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_pgPropCatGeneral = m_pgMgrDisplayProperties->Append(new wxPropertyCategory(_("Behaviour")));
    m_pgPropCatGeneral->SetHelpString(wxT(""));

    m_pgPropRaiseCodeLite = m_pgMgrDisplayProperties->AppendIn(
        m_pgPropCatGeneral, new wxBoolProperty(_("Raise CodeLite when breakpoint hit"), wxPG_LABEL, 1));
    m_pgPropRaiseCodeLite->SetHelpString(_("When a breakpoint is hit, notify the user raising CodeLite"));

    m_pgProp138 = m_pgMgrDisplayProperties->Append(new wxPropertyCategory(_("Display")));
    m_pgProp138->SetHelpString(wxT(""));

    m_pgPropArraySize = m_pgMgrDisplayProperties->AppendIn(
        m_pgProp138, new wxIntProperty(_("Max number of array elements"), wxPG_LABEL, 50));
    m_pgPropArraySize->SetHelpString(_("The maximum number of elements to display in arrays"));

    m_pgPropCallStackSize =
        m_pgMgrDisplayProperties->AppendIn(m_pgProp138, new wxIntProperty(_("Backtrace frames"), wxPG_LABEL, 100));
    m_pgPropCallStackSize->SetHelpString(_("Maximum number of frames to show in the callstack window"));

    m_pgShowThreadNames =
        m_pgMgrDisplayProperties->AppendIn(m_pgProp138, new wxBoolProperty(_("Show thread names"), wxPG_LABEL, 0));
    m_pgShowThreadNames->SetHelpString(_("Whether to show thread names in the thread pane (thread names can be set "
                                         "with, for example, pthread_setname_np() on Linux)."));

    m_pgShowFileNamesOnly =
        m_pgMgrDisplayProperties->AppendIn(m_pgProp138, new wxBoolProperty(_("Show filenames only"), wxPG_LABEL, 0));
    m_pgShowFileNamesOnly->SetHelpString(
        _("Whether to show complete file paths or just file names in the callstack, breakpoint and thread panes"));

    m_panel91 = new wxPanel(m_notebook87, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook87, wxSize(-1, -1)),
                            wxTAB_TRAVERSAL);
    m_notebook87->AddPage(m_panel91, _("Types"), false);

    wxBoxSizer* boxSizer107 = new wxBoxSizer(wxVERTICAL);
    m_panel91->SetSizer(boxSizer107);

    m_stcTypes = new wxStyledTextCtrl(m_panel91, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel91, wxSize(-1, -1)), 0);
#ifdef __WXMSW__
    // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to
    // wxFONTFAMILY_TELETYPE
    wxFont m_stcTypesFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_stcTypesFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_stcTypesFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_stcTypesFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_stcTypes->SetFont(m_stcTypesFont);
    m_stcTypes->SetToolTip(_("LLDB has a data formatters subsystem that allows users to define custom display options "
                             "for their variables\nYou can set here the types to pass to LLDB"));
    // Configure the fold margin
    m_stcTypes->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_stcTypes->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_stcTypes->SetMarginSensitive(4, true);
    m_stcTypes->SetMarginWidth(4, 0);

    // Configure the tracker margin
    m_stcTypes->SetMarginWidth(1, 0);

    // Configure the symbol margin
    m_stcTypes->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
    m_stcTypes->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
    m_stcTypes->SetMarginWidth(2, 0);
    m_stcTypes->SetMarginSensitive(2, true);

    // Configure the line numbers margin
    m_stcTypes->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcTypes->SetMarginWidth(0, 0);

    // Configure the line symbol margin
    m_stcTypes->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcTypes->SetMarginMask(3, 0);
    m_stcTypes->SetMarginWidth(3, 0);
    // Select the lexer
    m_stcTypes->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcTypes->StyleClearAll();
    for(int i = 0; i < wxSTC_STYLE_MAX; ++i) {
        m_stcTypes->StyleSetFont(i, m_stcTypesFont);
    }
    m_stcTypes->SetWrapMode(0);
    m_stcTypes->SetIndentationGuides(0);
    m_stcTypes->SetKeyWords(0, wxT(""));
    m_stcTypes->SetKeyWords(1, wxT(""));
    m_stcTypes->SetKeyWords(2, wxT(""));
    m_stcTypes->SetKeyWords(3, wxT(""));
    m_stcTypes->SetKeyWords(4, wxT(""));

    boxSizer107->Add(m_stcTypes, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_hyperLink111 = new wxHyperlinkCtrl(m_panel91, wxID_ANY, _("Learn more about LLDB types"),
                                         wxT("http://lldb.llvm.org/varformats.html"), wxDefaultPosition,
                                         wxDLG_UNIT(m_panel91, wxSize(-1, -1)), wxHL_DEFAULT_STYLE);
    m_hyperLink111->SetNormalColour(wxColour(wxT("#0000FF")));
    m_hyperLink111->SetHoverColour(wxColour(wxT("#0000FF")));
    m_hyperLink111->SetVisitedColour(wxColour(wxT("#FF0000")));

    boxSizer107->Add(m_hyperLink111, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_panel142 = new wxPanel(m_notebook87, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook87, wxSize(-1, -1)),
                             wxTAB_TRAVERSAL);
    m_notebook87->AddPage(m_panel142, _("Advanced"), false);

    wxBoxSizer* boxSizer160 = new wxBoxSizer(wxVERTICAL);
    m_panel142->SetSizer(boxSizer160);

    wxArrayString m_pgMgrAdvancedArr;
    wxUnusedVar(m_pgMgrAdvancedArr);
    wxArrayInt m_pgMgrAdvancedIntArr;
    wxUnusedVar(m_pgMgrAdvancedIntArr);
    m_pgMgrAdvanced =
        new wxPropertyGridManager(m_panel142, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel142, wxSize(-1, -1)),
                                  wxPG_DESCRIPTION | wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED);

    boxSizer160->Add(m_pgMgrAdvanced, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_pgProp165 = m_pgMgrAdvanced->Append(new wxPropertyCategory(_("Debugger Proxy")));
    m_pgProp165->SetHelpString(wxT(""));

    m_pgMgrAdvancedArr.Clear();
    m_pgMgrAdvancedIntArr.Clear();
    m_pgMgrAdvancedArr.Add(_("Local proxy process (default)"));
    m_pgMgrAdvancedArr.Add(_("Remote proxy process over TCP/IP"));
    m_pgPropProxyType = m_pgMgrAdvanced->AppendIn(
        m_pgProp165, new wxEnumProperty(_("Proxy type"), wxPG_LABEL, m_pgMgrAdvancedArr, m_pgMgrAdvancedIntArr, 0));
    m_pgPropProxyType->SetHelpString(_(
        "Debugging using LLDB is always done over a proxy process (i.e. codelite-lldb)\nHere you can select the type "
        "of the proxy to use (local or remote):\n* Local proxy is used by default to debug local processes (this is "
        "the default)\n* Remote proxy: use this method to connect to a remote codelite-lldb proxy server over TCP/IP"));

    m_pgPropDebugServer =
        m_pgMgrAdvanced->AppendIn(m_pgProp165, new wxFileProperty(_("Debug Server Path:"), wxPG_LABEL, wxT("")));
#if !defined(__WXOSX__) && !defined(_WIN64)
    m_pgPropDebugServer->SetAttribute(wxPG_FILE_WILDCARD, wxT(""));
#endif // !defined(__WXOSX__) && !defined(_WIN64)
    m_pgPropDebugServer->SetHelpString(_("The path to lldb's lldb-server.\nThis is a mandatory field"));

    m_pgProp169 = m_pgMgrAdvanced->Append(new wxPropertyCategory(_("Remote proxy settings")));
    m_pgProp169->SetHelpString(wxT(""));

    m_pgPropProxyIP =
        m_pgMgrAdvanced->AppendIn(m_pgProp169, new wxStringProperty(_("Address"), wxPG_LABEL, _("127.0.0.1")));
    m_pgPropProxyIP->SetHelpString(_("The IP address on which the remote proxy server is accepting connections"));

    m_pgPropProxyPort = m_pgMgrAdvanced->AppendIn(m_pgProp169, new wxIntProperty(_("Port"), wxPG_LABEL, 13610));
    m_pgPropProxyPort->SetHelpString(_("The port number on which the remote proxy server is accepting connections"));

    m_stdBtnSizer79 = new wxStdDialogButtonSizer();

    boxSizer77->Add(m_stdBtnSizer79, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button81 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer79->AddButton(m_button81);

    m_button83 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button83->SetDefault();
    m_stdBtnSizer79->AddButton(m_button83);

    m_button175 = new wxButton(this, wxID_APPLY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer79->AddButton(m_button175);
    m_stdBtnSizer79->Realize();

#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(m_notebook87)) {
        wxPersistenceManager::Get().RegisterAndRestore(m_notebook87);
    } else {
        wxPersistenceManager::Get().Restore(m_notebook87);
    }
#endif

    SetName(wxT("LLDBSettingDialogBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-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_pgMgrDisplayProperties->Connect(
        wxEVT_PG_CHANGED, wxPropertyGridEventHandler(LLDBSettingDialogBase::OnGeneralValueChanged), NULL, this);
    m_pgMgrAdvanced->Connect(wxEVT_PG_CHANGED,
                             wxPropertyGridEventHandler(LLDBSettingDialogBase::OnAdvancedValueChanged), NULL, this);
    m_button83->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBSettingDialogBase::OnOKUI), NULL, this);
    m_button175->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LLDBSettingDialogBase::OnApply), NULL,
                         this);
    m_button175->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBSettingDialogBase::OnOKUI), NULL, this);
}

LLDBSettingDialogBase::~LLDBSettingDialogBase()
{
    m_pgMgrDisplayProperties->Disconnect(
        wxEVT_PG_CHANGED, wxPropertyGridEventHandler(LLDBSettingDialogBase::OnGeneralValueChanged), NULL, this);
    m_pgMgrAdvanced->Disconnect(wxEVT_PG_CHANGED,
                                wxPropertyGridEventHandler(LLDBSettingDialogBase::OnAdvancedValueChanged), NULL, this);
    m_button83->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBSettingDialogBase::OnOKUI), NULL, this);
    m_button175->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LLDBSettingDialogBase::OnApply), NULL,
                            this);
    m_button175->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBSettingDialogBase::OnOKUI), NULL, this);
}

LLDBThreadsViewBase::LLDBThreadsViewBase(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);
        wxCrafternz79PnInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer115 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer115);

    m_dvListCtrlThreads = new clThemedListCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                               wxDV_ROW_LINES | wxDV_MULTIPLE);

    boxSizer115->Add(m_dvListCtrlThreads, 1, wxALL | wxEXPAND, WXC_FROM_DIP(2));

    m_dvListCtrlThreads->AppendTextColumn(_("#"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                          wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlThreads->AppendTextColumn(_("Name"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                          wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlThreads->AppendTextColumn(_("Stop Reason"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                          wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlThreads->AppendTextColumn(_("Function"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                          wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlThreads->AppendTextColumn(_("File"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                          wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlThreads->AppendTextColumn(_("Line"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                          wxDATAVIEW_COL_RESIZABLE);

    SetName(wxT("LLDBThreadsViewBase"));
    SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    // Connect events
    m_dvListCtrlThreads->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED,
                                 wxDataViewEventHandler(LLDBThreadsViewBase::OnItemActivated), NULL, this);
}

LLDBThreadsViewBase::~LLDBThreadsViewBase()
{
    m_dvListCtrlThreads->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED,
                                    wxDataViewEventHandler(LLDBThreadsViewBase::OnItemActivated), NULL, this);
}

FolderMappingBaseDlg::FolderMappingBaseDlg(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);
        wxCrafternz79PnInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer179 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer179);

    m_staticText197 = new wxStaticText(
        this, wxID_ANY,
        _("You are debugging on a remote machine. In order for codelite\nto be able to load files into the editor, "
          "codelite needs to map the folders on\nyour local machine to the folders on the remote machine"),
        wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxALIGN_CENTRE);
    wxFont m_staticText197Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText197Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText197->SetFont(m_staticText197Font);

    boxSizer179->Add(m_staticText197, 0, wxALL | wxEXPAND, WXC_FROM_DIP(10));

    wxFlexGridSizer* flexGridSizer187 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer187->SetFlexibleDirection(wxBOTH);
    flexGridSizer187->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer187->AddGrowableCol(1);

    boxSizer179->Add(flexGridSizer187, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText189 =
        new wxStaticText(this, wxID_ANY, _("Local Folder:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer187->Add(m_staticText189, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_dirPickerLocal = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition,
                                           wxDLG_UNIT(this, wxSize(-1, -1)),
                                           wxDIRP_SMALL | wxDIRP_DEFAULT_STYLE | wxDIRP_USE_TEXTCTRL);
    m_dirPickerLocal->SetToolTip(_("Local Folder"));
    m_dirPickerLocal->SetFocus();

    flexGridSizer187->Add(m_dirPickerLocal, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText193 =
        new wxStaticText(this, wxID_ANY, _("Remote Folder:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer187->Add(m_staticText193, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlRemote = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textCtrlRemote->SetToolTip(_("Remote Folder"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlRemote->SetHint(wxT(""));
#endif

    flexGridSizer187->Add(m_textCtrlRemote, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer181 = new wxStdDialogButtonSizer();

    boxSizer179->Add(m_stdBtnSizer181, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

    m_button183 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button183->SetDefault();
    m_stdBtnSizer181->AddButton(m_button183);

    m_button185 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer181->AddButton(m_button185);
    m_stdBtnSizer181->Realize();

    SetName(wxT("FolderMappingBaseDlg"));
    SetSize(wxDLG_UNIT(this, wxSize(-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_button183->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(FolderMappingBaseDlg::OnOKUI), NULL, this);
}

FolderMappingBaseDlg::~FolderMappingBaseDlg()
{
    m_button183->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(FolderMappingBaseDlg::OnOKUI), NULL, this);
}