forked from eranif/codelite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codeformatterdlgbase.cpp
704 lines (567 loc) · 34.9 KB
/
codeformatterdlgbase.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
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
692
693
694
695
696
697
698
699
700
701
702
703
704
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: codeformatterdlg.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#include "codeformatterdlgbase.h"
#include "formatoptions.h"
#include "PHPFormatterBuffer.h"
// Declare the bitmap loading function
extern void wxCrafterGgLOZbInitBitmapResources();
static bool bBitmapLoaded = false;
CodeFormatterBaseDlg::CodeFormatterBaseDlg(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);
wxCrafterGgLOZbInitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* bSizerMain = new wxBoxSizer(wxVERTICAL);
this->SetSizer(bSizerMain);
m_treebook = new wxTreebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT);
m_treebook->SetName(wxT("m_treebook"));
bSizerMain->Add(m_treebook, 1, wxALL|wxEXPAND, 5);
m_panel133 = new wxPanel(m_treebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_treebook->AddPage(m_panel133, _("General"), true, wxNOT_FOUND);
wxBoxSizer* boxSizer179 = new wxBoxSizer(wxVERTICAL);
m_panel133->SetSizer(boxSizer179);
wxFlexGridSizer* flexGridSizer158 = new wxFlexGridSizer(0, 2, 0, 0);
flexGridSizer158->SetFlexibleDirection( wxBOTH );
flexGridSizer158->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
flexGridSizer158->AddGrowableCol(1);
boxSizer179->Add(flexGridSizer158, 1, wxALL|wxEXPAND, 2);
flexGridSizer158->Add(0, 0, 1, wxALL, 5);
m_checkBoxFormatOnSave = new wxCheckBox(m_panel133, wxID_ANY, _("Format editor on file save"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxFormatOnSave->SetValue(false);
m_checkBoxFormatOnSave->SetToolTip(_("When saving a file, automatically format it"));
flexGridSizer158->Add(m_checkBoxFormatOnSave, 0, wxALL|wxALIGN_LEFT, 5);
m_staticText115 = new wxStaticText(m_panel133, wxID_ANY, _("C++ formatter:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer158->Add(m_staticText115, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
wxArrayString m_choiceCxxEngineArr;
m_choiceCxxEngineArr.Add(wxT("AStyle"));
m_choiceCxxEngineArr.Add(wxT("clang-format"));
m_choiceCxxEngine = new wxChoice(m_panel133, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceCxxEngineArr, 0);
m_choiceCxxEngine->SetToolTip(_("Select the formatter engine for C/C++\nNote that JavaScript, clang-format is always used"));
m_choiceCxxEngine->SetSelection(1);
flexGridSizer158->Add(m_choiceCxxEngine, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
m_staticText198 = new wxStaticText(m_panel133, wxID_ANY, _("PHP formatter:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer158->Add(m_staticText198, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
wxArrayString m_choicePhpFormatterArr;
m_choicePhpFormatterArr.Add(wxT("Builtin"));
m_choicePhpFormatterArr.Add(wxT("PHP-CS-Fixer"));
m_choicePhpFormatter = new wxChoice(m_panel133, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choicePhpFormatterArr, 0);
m_choicePhpFormatter->SetToolTip(_("Select the formatter engine for PHP files"));
m_choicePhpFormatter->SetSelection(0);
flexGridSizer158->Add(m_choicePhpFormatter, 0, wxALL|wxEXPAND, 5);
m_treebook->AddPage(NULL, _("C++"), false, wxNOT_FOUND);
m_panelAstyle = new wxPanel(m_treebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_treebook->InsertSubPage(1, m_panelAstyle, _("AStyle"), false, wxNOT_FOUND);
wxBoxSizer* boxSizer95 = new wxBoxSizer(wxVERTICAL);
m_panelAstyle->SetSizer(boxSizer95);
m_splitter145 = new wxSplitterWindow(m_panelAstyle, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE);
m_splitter145->SetSashGravity(0.5);
m_splitter145->SetMinimumPaneSize(10);
boxSizer95->Add(m_splitter145, 1, wxEXPAND, 5);
m_splitterPage149 = new wxPanel(m_splitter145, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
wxBoxSizer* boxSizer155 = new wxBoxSizer(wxVERTICAL);
m_splitterPage149->SetSizer(boxSizer155);
wxArrayString m_pgMgrAstyleArr;
wxUnusedVar(m_pgMgrAstyleArr);
wxArrayInt m_pgMgrAstyleIntArr;
wxUnusedVar(m_pgMgrAstyleIntArr);
m_pgMgrAstyle = new wxPropertyGridManager(m_splitterPage149, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
boxSizer155->Add(m_pgMgrAstyle, 1, wxALL|wxEXPAND, 2);
m_pgPropAstyleOptions = m_pgMgrAstyle->Append( new wxPropertyCategory( _("AStyle Options") ) );
m_pgPropAstyleOptions->SetHelpString(wxT(""));
m_pgMgrAstyleArr.Clear();
m_pgMgrAstyleIntArr.Clear();
m_pgMgrAstyleArr.Add(_("GNU"));
m_pgMgrAstyleArr.Add(_("Java"));
m_pgMgrAstyleArr.Add(_("K&R"));
m_pgMgrAstyleArr.Add(_("Linux"));
m_pgMgrAstyleArr.Add(_("ANSI"));
m_pgPropPreDefinedStyles = m_pgMgrAstyle->AppendIn( m_pgPropAstyleOptions, new wxEnumProperty( _("PreDefined Styles"), wxPG_LABEL, m_pgMgrAstyleArr, m_pgMgrAstyleIntArr, 0) );
m_pgPropPreDefinedStyles->SetHelpString(_("Choose the formatting from one of the known styles"));
m_pgMgrAstyleArr.Clear();
m_pgMgrAstyleIntArr.Clear();
m_pgMgrAstyleArr.Add(_("Break closing"));
m_pgMgrAstyleArr.Add(_("Attach"));
m_pgMgrAstyleArr.Add(_("Linux"));
m_pgMgrAstyleArr.Add(_("Break"));
m_pgMgrAstyleArr.Add(_("None"));
m_pgPropBrackets = m_pgMgrAstyle->AppendIn( m_pgPropAstyleOptions, new wxEnumProperty( _("Brackets"), wxPG_LABEL, m_pgMgrAstyleArr, m_pgMgrAstyleIntArr, 0) );
m_pgPropBrackets->SetHelpString(_("Bracket Style options define the bracket style to use"));
m_pgMgrAstyleArr.Clear();
m_pgMgrAstyleIntArr.Clear();
m_pgMgrAstyleArr.Add(_("Class"));
m_pgMgrAstyleArr.Add(_("Brackets"));
m_pgMgrAstyleArr.Add(_("Switches"));
m_pgMgrAstyleArr.Add(_("Namespaces"));
m_pgMgrAstyleArr.Add(_("Case"));
m_pgMgrAstyleArr.Add(_("Labels"));
m_pgMgrAstyleArr.Add(_("Blocks"));
m_pgMgrAstyleArr.Add(_("Preprocessors"));
m_pgMgrAstyleArr.Add(_("Max Instatement Indent"));
m_pgMgrAstyleArr.Add(_("Min Instatement Indent"));
m_pgMgrAstyleIntArr.Add(AS_INDENT_CLASS);
m_pgMgrAstyleIntArr.Add(AS_INDENT_BRACKETS);
m_pgMgrAstyleIntArr.Add(AS_INDENT_SWITCHES);
m_pgMgrAstyleIntArr.Add(AS_INDENT_NAMESPACES);
m_pgMgrAstyleIntArr.Add(AS_INDENT_CASE);
m_pgMgrAstyleIntArr.Add(AS_INDENT_LABELS);
m_pgMgrAstyleIntArr.Add(AS_INDENT_BLOCKS);
m_pgMgrAstyleIntArr.Add(AS_INDENT_PREPROCESSORS);
m_pgMgrAstyleIntArr.Add(AS_MAX_INSTATEMENT_INDENT);
m_pgMgrAstyleIntArr.Add(AS_MIN_COND_INDENT);
m_pgPropIndentation = m_pgMgrAstyle->AppendIn( m_pgPropAstyleOptions, new wxFlagsProperty( _("Indentation"), wxPG_LABEL, m_pgMgrAstyleArr, m_pgMgrAstyleIntArr, 0) );
m_pgPropIndentation->SetHelpString(wxT(""));
m_pgMgrAstyleArr.Clear();
m_pgMgrAstyleIntArr.Clear();
m_pgMgrAstyleArr.Add(_("Break Blocks"));
m_pgMgrAstyleArr.Add(_("Pad Parenthesis"));
m_pgMgrAstyleArr.Add(_("Break Blocks All"));
m_pgMgrAstyleArr.Add(_("Pad Parenthesis Outside"));
m_pgMgrAstyleArr.Add(_("Break else-if"));
m_pgMgrAstyleArr.Add(_("Pad Parenthesis Inside"));
m_pgMgrAstyleArr.Add(_("Pad Operators"));
m_pgMgrAstyleArr.Add(_("UnPad Parenthesis"));
m_pgMgrAstyleArr.Add(_("One Line Keep Statement"));
m_pgMgrAstyleArr.Add(_("Fill Empty Lines"));
m_pgMgrAstyleArr.Add(_("One Line Keep Blocks"));
m_pgMgrAstyleIntArr.Add(AS_BREAK_BLOCKS);
m_pgMgrAstyleIntArr.Add(AS_PAD_PARENTHESIS);
m_pgMgrAstyleIntArr.Add(AS_BREAK_BLOCKS_ALL);
m_pgMgrAstyleIntArr.Add(AS_PAD_PARENTHESIS_OUT);
m_pgMgrAstyleIntArr.Add(AS_BREAK_ELSEIF);
m_pgMgrAstyleIntArr.Add(AS_PAD_PARENTHESIS_IN);
m_pgMgrAstyleIntArr.Add(AS_PAD_OPER);
m_pgMgrAstyleIntArr.Add(AS_UNPAD_PARENTHESIS);
m_pgMgrAstyleIntArr.Add(AS_ONE_LINE_KEEP_STATEMENT);
m_pgMgrAstyleIntArr.Add(AS_FILL_EMPTY_LINES);
m_pgMgrAstyleIntArr.Add(AS_ONE_LINE_KEEP_BLOCKS);
m_pgPropFormatting = m_pgMgrAstyle->AppendIn( m_pgPropAstyleOptions, new wxFlagsProperty( _("Formatting"), wxPG_LABEL, m_pgMgrAstyleArr, m_pgMgrAstyleIntArr, 0) );
m_pgPropFormatting->SetHelpString(_("Select one or more formatting option from the list below"));
wxBoxSizer* bCustomSettingsSizer = new wxBoxSizer(wxVERTICAL);
boxSizer155->Add(bCustomSettingsSizer, 0, wxALL|wxEXPAND, 2);
wxBoxSizer* boxSizer57 = new wxBoxSizer(wxHORIZONTAL);
bCustomSettingsSizer->Add(boxSizer57, 0, wxEXPAND, 5);
m_staticText59 = new wxStaticText(m_splitterPage149, wxID_ANY, _("AStyle Only:"), wxDefaultPosition, wxSize(-1,-1), 0);
wxFont m_staticText59Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
m_staticText59Font.SetWeight(wxFONTWEIGHT_BOLD);
m_staticText59->SetFont(m_staticText59Font);
boxSizer57->Add(m_staticText59, 0, wxRIGHT|wxTOP|wxBOTTOM, 5);
m_staticText3 = new wxStaticText(m_splitterPage149, wxID_ANY, _("Custom user settings"), wxDefaultPosition, wxSize(-1, -1), 0);
boxSizer57->Add(m_staticText3, 0, wxALL, 5);
m_textCtrlUserFlags = new wxTextCtrl(m_splitterPage149, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,80), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER|wxTE_MULTILINE);
wxFont m_textCtrlUserFlagsFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("Sans"));
m_textCtrlUserFlags->SetFont(m_textCtrlUserFlagsFont);
bCustomSettingsSizer->Add(m_textCtrlUserFlags, 1, wxEXPAND, 5);
m_splitterPage153 = new wxPanel(m_splitter145, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_splitter145->SplitVertically(m_splitterPage149, m_splitterPage153, 0);
wxBoxSizer* boxSizer157 = new wxBoxSizer(wxVERTICAL);
m_splitterPage153->SetSizer(boxSizer157);
m_textCtrlPreview = new wxStyledTextCtrl(m_splitterPage153, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
// Configure the fold margin
m_textCtrlPreview->SetMarginType (4, wxSTC_MARGIN_SYMBOL);
m_textCtrlPreview->SetMarginMask (4, wxSTC_MASK_FOLDERS);
m_textCtrlPreview->SetMarginSensitive(4, true);
m_textCtrlPreview->SetMarginWidth (4, 0);
// Configure the tracker margin
m_textCtrlPreview->SetMarginWidth(1, 0);
// Configure the symbol margin
m_textCtrlPreview->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
m_textCtrlPreview->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
m_textCtrlPreview->SetMarginWidth(2, 0);
m_textCtrlPreview->SetMarginSensitive(2, true);
// Configure the line numbers margin
m_textCtrlPreview->SetMarginType(0, wxSTC_MARGIN_NUMBER);
m_textCtrlPreview->SetMarginWidth(0,0);
// Configure the line symbol margin
m_textCtrlPreview->SetMarginType(3, wxSTC_MARGIN_FORE);
m_textCtrlPreview->SetMarginMask(3, 0);
m_textCtrlPreview->SetMarginWidth(3,0);
// Select the lexer
m_textCtrlPreview->SetLexer(wxSTC_LEX_NULL);
// Set default font / styles
m_textCtrlPreview->StyleClearAll();
m_textCtrlPreview->SetWrapMode(0);
m_textCtrlPreview->SetIndentationGuides(0);
m_textCtrlPreview->SetKeyWords(0, wxT(""));
m_textCtrlPreview->SetKeyWords(1, wxT(""));
m_textCtrlPreview->SetKeyWords(2, wxT(""));
m_textCtrlPreview->SetKeyWords(3, wxT(""));
m_textCtrlPreview->SetKeyWords(4, wxT(""));
boxSizer157->Add(m_textCtrlPreview, 1, wxALL|wxEXPAND, 2);
m_panelClang = new wxPanel(m_treebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_treebook->InsertSubPage(1, m_panelClang, _("clang-format"), false, wxNOT_FOUND);
wxBoxSizer* boxSizer97 = new wxBoxSizer(wxVERTICAL);
m_panelClang->SetSizer(boxSizer97);
m_splitter165 = new wxSplitterWindow(m_panelClang, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE);
m_splitter165->SetSashGravity(0.5);
m_splitter165->SetMinimumPaneSize(10);
boxSizer97->Add(m_splitter165, 1, wxEXPAND, 5);
m_splitterPage169 = new wxPanel(m_splitter165, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
wxBoxSizer* boxSizer175 = new wxBoxSizer(wxVERTICAL);
m_splitterPage169->SetSizer(boxSizer175);
wxArrayString m_pgMgrClangArr;
wxUnusedVar(m_pgMgrClangArr);
wxArrayInt m_pgMgrClangIntArr;
wxUnusedVar(m_pgMgrClangIntArr);
m_pgMgrClang = new wxPropertyGridManager(m_splitterPage169, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
boxSizer175->Add(m_pgMgrClang, 1, wxALL|wxEXPAND, 2);
m_pgPropClangFormat = m_pgMgrClang->Append( new wxPropertyCategory( _("ClangFormat Options") ) );
m_pgPropClangFormat->SetHelpString(wxT(""));
m_pgPropClangFormatExePath = m_pgMgrClang->AppendIn( m_pgPropClangFormat, new wxFileProperty( _("clang-format path"), wxPG_LABEL, wxT("")) );
#if !defined(__WXOSX__) && !defined(_WIN64)
m_pgMgrClang->SetPropertyAttribute(m_pgPropClangFormatExePath, wxPG_FILE_WILDCARD, wxT(""));
#endif // !defined(__WXOSX__) && !defined(_WIN64)
m_pgPropClangFormatExePath->SetHelpString(_("Select the path to clang-format executable tool"));
m_pgPropColumnLimit = m_pgMgrClang->AppendIn( m_pgPropClangFormat, new wxIntProperty( _("Column Limit"), wxPG_LABEL, 0) );
m_pgPropColumnLimit->SetHelpString(_("The column limit\nA column limit of 0 means that there is no column limit.\nIn this case, clang-format will respect the input's line breaking decisions within statements unless they contradict other rules"));
m_pgMgrClangArr.Clear();
m_pgMgrClangIntArr.Clear();
m_pgMgrClangArr.Add(_("Linux"));
m_pgMgrClangArr.Add(_("Attach"));
m_pgMgrClangArr.Add(_("Stroustrup"));
m_pgMgrClangArr.Add(_("Allman"));
m_pgMgrClangArr.Add(_("GNU"));
m_pgMgrClangIntArr.Add(kLinux);
m_pgMgrClangIntArr.Add(kAttach);
m_pgMgrClangIntArr.Add(kStroustrup);
m_pgMgrClangIntArr.Add(kAllman);
m_pgMgrClangIntArr.Add(kGNU);
m_pgPropClangBraceBreakStyle = m_pgMgrClang->AppendIn( m_pgPropClangFormat, new wxEnumProperty( _("Brace breaking style"), wxPG_LABEL, m_pgMgrClangArr, m_pgMgrClangIntArr, 0) );
m_pgPropClangBraceBreakStyle->SetHelpString(_("The brace breaking style to use."));
m_pgMgrClangArr.Clear();
m_pgMgrClangIntArr.Clear();
m_pgMgrClangArr.Add(_("LLVM"));
m_pgMgrClangArr.Add(_("Google"));
m_pgMgrClangArr.Add(_("WebKit"));
m_pgMgrClangArr.Add(_("Chromium"));
m_pgMgrClangArr.Add(_("Mozilla"));
m_pgMgrClangIntArr.Add(kClangFormatLLVM);
m_pgMgrClangIntArr.Add(kClangFormatGoogle);
m_pgMgrClangIntArr.Add(kClangFormatWebKit);
m_pgMgrClangIntArr.Add(kClangFormatChromium);
m_pgMgrClangIntArr.Add(kClangFormatMozilla);
m_pgPropClangFormatStyle = m_pgMgrClang->AppendIn( m_pgPropClangFormat, new wxEnumProperty( _("Style"), wxPG_LABEL, m_pgMgrClangArr, m_pgMgrClangIntArr, 0) );
m_pgPropClangFormatStyle->SetHelpString(_("Coding style"));
m_pgMgrClangArr.Clear();
m_pgMgrClangIntArr.Clear();
m_pgMgrClangArr.Add(_("Align Escaped Newlines Left"));
m_pgMgrClangArr.Add(_("Align Trailing Comments"));
m_pgMgrClangArr.Add(_("Allow All Parameters Of Declaration On Next Line"));
m_pgMgrClangArr.Add(_("Allow Short Functions On A Single Line"));
m_pgMgrClangArr.Add(_("Allow Short Blocks On A Single Line"));
m_pgMgrClangArr.Add(_("Allow Short Loops On A Single Line"));
m_pgMgrClangArr.Add(_("Allow Short If Statements On A SingleLine"));
m_pgMgrClangArr.Add(_("Always Break Before Multiline Strings"));
m_pgMgrClangArr.Add(_("Always Break Template Declarations"));
m_pgMgrClangArr.Add(_("Bin Pack Parameters"));
m_pgMgrClangArr.Add(_("Break Before Binary Operators"));
m_pgMgrClangArr.Add(_("Break Before Ternary Operators"));
m_pgMgrClangArr.Add(_("Break Constructor Initializers Before Comma"));
m_pgMgrClangArr.Add(_("Indent Case Labels"));
m_pgMgrClangArr.Add(_("Indent Function DeclarationAfterType"));
m_pgMgrClangArr.Add(_("Space Before Assignment Operators"));
m_pgMgrClangArr.Add(_("Space Before Parentheses"));
m_pgMgrClangArr.Add(_("Spaces In Parentheses"));
m_pgMgrClangArr.Add(_("Pointer And Reference Aligned to the Right"));
m_pgMgrClangIntArr.Add(kAlignEscapedNewlinesLeft);
m_pgMgrClangIntArr.Add(kAlignTrailingComments);
m_pgMgrClangIntArr.Add(kAllowAllParametersOfDeclarationOnNextLine);
m_pgMgrClangIntArr.Add(kAllowShortFunctionsOnASingleLine);
m_pgMgrClangIntArr.Add(kAllowShortBlocksOnASingleLine);
m_pgMgrClangIntArr.Add(kAllowShortLoopsOnASingleLine);
m_pgMgrClangIntArr.Add(kAllowShortIfStatementsOnASingleLine);
m_pgMgrClangIntArr.Add(kAlwaysBreakBeforeMultilineStrings);
m_pgMgrClangIntArr.Add(kAlwaysBreakTemplateDeclarations);
m_pgMgrClangIntArr.Add(kBinPackParameters);
m_pgMgrClangIntArr.Add(kBreakBeforeBinaryOperators);
m_pgMgrClangIntArr.Add(kBreakBeforeTernaryOperators);
m_pgMgrClangIntArr.Add(kBreakConstructorInitializersBeforeComma);
m_pgMgrClangIntArr.Add(kIndentCaseLabels);
m_pgMgrClangIntArr.Add(kIndentFunctionDeclarationAfterType);
m_pgMgrClangIntArr.Add(kSpaceBeforeAssignmentOperators);
m_pgMgrClangIntArr.Add(kSpaceBeforeParens);
m_pgMgrClangIntArr.Add(kSpacesInParentheses);
m_pgMgrClangIntArr.Add(kPointerAlignmentRight);
m_pgPropClangFormattingOptions = m_pgMgrClang->AppendIn( m_pgPropClangFormat, new wxFlagsProperty( _("Clang Formatting Options"), wxPG_LABEL, m_pgMgrClangArr, m_pgMgrClangIntArr, 0) );
m_pgPropClangFormattingOptions->SetHelpString(wxT(""));
m_splitterPage173 = new wxPanel(m_splitter165, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_splitter165->SplitVertically(m_splitterPage169, m_splitterPage173, 0);
wxBoxSizer* boxSizer177 = new wxBoxSizer(wxVERTICAL);
m_splitterPage173->SetSizer(boxSizer177);
m_textCtrlPreview_Clang = new wxStyledTextCtrl(m_splitterPage173, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
// Configure the fold margin
m_textCtrlPreview_Clang->SetMarginType (4, wxSTC_MARGIN_SYMBOL);
m_textCtrlPreview_Clang->SetMarginMask (4, wxSTC_MASK_FOLDERS);
m_textCtrlPreview_Clang->SetMarginSensitive(4, true);
m_textCtrlPreview_Clang->SetMarginWidth (4, 0);
// Configure the tracker margin
m_textCtrlPreview_Clang->SetMarginWidth(1, 0);
// Configure the symbol margin
m_textCtrlPreview_Clang->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
m_textCtrlPreview_Clang->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
m_textCtrlPreview_Clang->SetMarginWidth(2, 0);
m_textCtrlPreview_Clang->SetMarginSensitive(2, true);
// Configure the line numbers margin
m_textCtrlPreview_Clang->SetMarginType(0, wxSTC_MARGIN_NUMBER);
m_textCtrlPreview_Clang->SetMarginWidth(0,0);
// Configure the line symbol margin
m_textCtrlPreview_Clang->SetMarginType(3, wxSTC_MARGIN_FORE);
m_textCtrlPreview_Clang->SetMarginMask(3, 0);
m_textCtrlPreview_Clang->SetMarginWidth(3,0);
// Select the lexer
m_textCtrlPreview_Clang->SetLexer(wxSTC_LEX_NULL);
// Set default font / styles
m_textCtrlPreview_Clang->StyleClearAll();
m_textCtrlPreview_Clang->SetWrapMode(0);
m_textCtrlPreview_Clang->SetIndentationGuides(0);
m_textCtrlPreview_Clang->SetKeyWords(0, wxT(""));
m_textCtrlPreview_Clang->SetKeyWords(1, wxT(""));
m_textCtrlPreview_Clang->SetKeyWords(2, wxT(""));
m_textCtrlPreview_Clang->SetKeyWords(3, wxT(""));
m_textCtrlPreview_Clang->SetKeyWords(4, wxT(""));
boxSizer177->Add(m_textCtrlPreview_Clang, 1, wxALL|wxEXPAND, 2);
m_panelPHP = new wxPanel(m_treebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_treebook->AddPage(m_panelPHP, _("PHP"), false, wxNOT_FOUND);
m_panelBuiltIn = new wxPanel(m_treebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_treebook->InsertSubPage(4, m_panelBuiltIn, _("Builtin"), false, wxNOT_FOUND);
wxBoxSizer* boxSizer99 = new wxBoxSizer(wxVERTICAL);
m_panelBuiltIn->SetSizer(boxSizer99);
m_splitter119 = new wxSplitterWindow(m_panelBuiltIn, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE);
m_splitter119->SetSashGravity(0.5);
m_splitter119->SetMinimumPaneSize(10);
boxSizer99->Add(m_splitter119, 1, wxEXPAND, 5);
m_splitterPage123 = new wxPanel(m_splitter119, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
wxBoxSizer* boxSizer129 = new wxBoxSizer(wxVERTICAL);
m_splitterPage123->SetSizer(boxSizer129);
wxArrayString m_pgMgrPhpArr;
wxUnusedVar(m_pgMgrPhpArr);
wxArrayInt m_pgMgrPhpIntArr;
wxUnusedVar(m_pgMgrPhpIntArr);
m_pgMgrPhp = new wxPropertyGridManager(m_splitterPage123, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
boxSizer129->Add(m_pgMgrPhp, 1, wxALL|wxEXPAND, 2);
m_pgPropPhpFormatter = m_pgMgrPhp->Append( new wxPropertyCategory( _("PHP") ) );
m_pgPropPhpFormatter->SetHelpString(_("PHP related settings"));
m_pgMgrPhpArr.Clear();
m_pgMgrPhpIntArr.Clear();
m_pgMgrPhpArr.Add(_("Break before class"));
m_pgMgrPhpArr.Add(_("Break before function"));
m_pgMgrPhpArr.Add(_("Break before 'while'"));
m_pgMgrPhpArr.Add(_("Break before 'foreach'"));
m_pgMgrPhpArr.Add(_("'else' doesn't break"));
m_pgMgrPhpArr.Add(_("Break after 'heredoc' statement"));
m_pgMgrPhpArr.Add(_("Break PHP Arrays vertically"));
m_pgMgrPhpArr.Add(_("Break after string concatentation operator (\".\")"));
m_pgMgrPhpIntArr.Add(kPFF_BreakBeforeClass);
m_pgMgrPhpIntArr.Add(kPFF_BreakBeforeFunction);
m_pgMgrPhpIntArr.Add(kPFF_BreakBeforeWhile);
m_pgMgrPhpIntArr.Add(kPFF_BreakBeforeForeach);
m_pgMgrPhpIntArr.Add(kPFF_ElseOnSameLineAsClosingCurlyBrace);
m_pgMgrPhpIntArr.Add(kPFF_BreakAfterHeredoc);
m_pgMgrPhpIntArr.Add(kPFF_VerticalArrays);
m_pgMgrPhpIntArr.Add(kPFF_BreakAfterStringConcatentation);
m_pgPropPhpFormatterOptions = m_pgMgrPhp->AppendIn( m_pgPropPhpFormatter, new wxFlagsProperty( _("PHPFormatter Options"), wxPG_LABEL, m_pgMgrPhpArr, m_pgMgrPhpIntArr, 0) );
m_pgPropPhpFormatterOptions->SetHelpString(wxT(""));
m_splitterPage127 = new wxPanel(m_splitter119, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_splitter119->SplitVertically(m_splitterPage123, m_splitterPage127, 0);
wxBoxSizer* boxSizer131 = new wxBoxSizer(wxVERTICAL);
m_splitterPage127->SetSizer(boxSizer131);
m_stcPhpPreview = new wxStyledTextCtrl(m_splitterPage127, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
// Configure the fold margin
m_stcPhpPreview->SetMarginType (4, wxSTC_MARGIN_SYMBOL);
m_stcPhpPreview->SetMarginMask (4, wxSTC_MASK_FOLDERS);
m_stcPhpPreview->SetMarginSensitive(4, true);
m_stcPhpPreview->SetMarginWidth (4, 0);
// Configure the tracker margin
m_stcPhpPreview->SetMarginWidth(1, 0);
// Configure the symbol margin
m_stcPhpPreview->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
m_stcPhpPreview->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
m_stcPhpPreview->SetMarginWidth(2, 0);
m_stcPhpPreview->SetMarginSensitive(2, true);
// Configure the line numbers margin
m_stcPhpPreview->SetMarginType(0, wxSTC_MARGIN_NUMBER);
m_stcPhpPreview->SetMarginWidth(0,0);
// Configure the line symbol margin
m_stcPhpPreview->SetMarginType(3, wxSTC_MARGIN_FORE);
m_stcPhpPreview->SetMarginMask(3, 0);
m_stcPhpPreview->SetMarginWidth(3,0);
// Select the lexer
m_stcPhpPreview->SetLexer(wxSTC_LEX_HTML);
// Set default font / styles
m_stcPhpPreview->StyleClearAll();
m_stcPhpPreview->SetWrapMode(0);
m_stcPhpPreview->SetIndentationGuides(0);
m_stcPhpPreview->SetKeyWords(0, wxT(""));
m_stcPhpPreview->SetKeyWords(1, wxT(""));
m_stcPhpPreview->SetKeyWords(2, wxT(""));
m_stcPhpPreview->SetKeyWords(3, wxT(""));
m_stcPhpPreview->SetKeyWords(4, wxT(""));
boxSizer131->Add(m_stcPhpPreview, 1, wxALL|wxEXPAND, 2);
m_panel185 = new wxPanel(m_treebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_treebook->InsertSubPage(4, m_panel185, _("PHP-CS-Fixer"), false, wxNOT_FOUND);
wxBoxSizer* boxSizer209 = new wxBoxSizer(wxVERTICAL);
m_panel185->SetSizer(boxSizer209);
wxFlexGridSizer* flexGridSizer190 = new wxFlexGridSizer(0, 2, 0, 0);
flexGridSizer190->SetFlexibleDirection( wxBOTH );
flexGridSizer190->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
flexGridSizer190->AddGrowableCol(1);
boxSizer209->Add(flexGridSizer190, 0, wxALL|wxEXPAND, 5);
m_staticText192 = new wxStaticText(m_panel185, wxID_ANY, _("PHP Executable:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer190->Add(m_staticText192, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
m_filePickerPhpExec = new wxFilePickerCtrl(m_panel185, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1,-1), wxFLP_USE_TEXTCTRL|wxFLP_SMALL);
m_filePickerPhpExec->SetToolTip(_("Select the PHP executable to use"));
m_filePickerPhpExec->SetFocus();
flexGridSizer190->Add(m_filePickerPhpExec, 0, wxALL|wxEXPAND, 5);
m_staticText202 = new wxStaticText(m_panel185, wxID_ANY, _("PHP-CS-Fixer phar file:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer190->Add(m_staticText202, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
m_filePickerPHPCsFixerPhar = new wxFilePickerCtrl(m_panel185, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1,-1), wxFLP_USE_TEXTCTRL|wxFLP_SMALL);
m_filePickerPHPCsFixerPhar->SetToolTip(_("Select the PHP-CS-Fixer phar file location"));
flexGridSizer190->Add(m_filePickerPHPCsFixerPhar, 0, wxALL|wxEXPAND, 5);
m_staticText217 = new wxStaticText(m_panel185, wxID_ANY, _("Options:"), wxDefaultPosition, wxSize(-1,-1), 0);
boxSizer209->Add(m_staticText217, 0, wxALL, 5);
m_stc = new wxStyledTextCtrl(m_panel185, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
m_stc->SetToolTip(_("Set here list of options to pass to PHP-CS-Fixer\nClick the Help button to view documentation page"));
// Configure the fold margin
m_stc->SetMarginType (4, wxSTC_MARGIN_SYMBOL);
m_stc->SetMarginMask (4, wxSTC_MASK_FOLDERS);
m_stc->SetMarginSensitive(4, true);
m_stc->SetMarginWidth (4, 0);
// Configure the tracker margin
m_stc->SetMarginWidth(1, 0);
// Configure the symbol margin
m_stc->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
m_stc->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
m_stc->SetMarginWidth(2, 0);
m_stc->SetMarginSensitive(2, true);
// Configure the line numbers margin
m_stc->SetMarginType(0, wxSTC_MARGIN_NUMBER);
m_stc->SetMarginWidth(0,0);
// Configure the line symbol margin
m_stc->SetMarginType(3, wxSTC_MARGIN_FORE);
m_stc->SetMarginMask(3, 0);
m_stc->SetMarginWidth(3,0);
// Select the lexer
m_stc->SetLexer(wxSTC_LEX_NULL);
// Set default font / styles
m_stc->StyleClearAll();
m_stc->SetWrapMode(1);
m_stc->SetIndentationGuides(0);
m_stc->SetEOLMode(2);
m_stc->SetKeyWords(0, wxT(""));
m_stc->SetKeyWords(1, wxT(""));
m_stc->SetKeyWords(2, wxT(""));
m_stc->SetKeyWords(3, wxT(""));
m_stc->SetKeyWords(4, wxT(""));
boxSizer209->Add(m_stc, 1, wxALL|wxEXPAND, 5);
m_stcFixerPreview = new wxStyledTextCtrl(m_panel185, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
// Configure the fold margin
m_stcFixerPreview->SetMarginType (4, wxSTC_MARGIN_SYMBOL);
m_stcFixerPreview->SetMarginMask (4, wxSTC_MASK_FOLDERS);
m_stcFixerPreview->SetMarginSensitive(4, true);
m_stcFixerPreview->SetMarginWidth (4, 0);
// Configure the tracker margin
m_stcFixerPreview->SetMarginWidth(1, 0);
// Configure the symbol margin
m_stcFixerPreview->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
m_stcFixerPreview->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
m_stcFixerPreview->SetMarginWidth(2, 0);
m_stcFixerPreview->SetMarginSensitive(2, true);
// Configure the line numbers margin
m_stcFixerPreview->SetMarginType(0, wxSTC_MARGIN_NUMBER);
m_stcFixerPreview->SetMarginWidth(0,0);
// Configure the line symbol margin
m_stcFixerPreview->SetMarginType(3, wxSTC_MARGIN_FORE);
m_stcFixerPreview->SetMarginMask(3, 0);
m_stcFixerPreview->SetMarginWidth(3,0);
// Select the lexer
m_stcFixerPreview->SetLexer(wxSTC_LEX_NULL);
// Set default font / styles
m_stcFixerPreview->StyleClearAll();
m_stcFixerPreview->SetWrapMode(1);
m_stcFixerPreview->SetIndentationGuides(0);
m_stcFixerPreview->SetKeyWords(0, wxT(""));
m_stcFixerPreview->SetKeyWords(1, wxT(""));
m_stcFixerPreview->SetKeyWords(2, wxT(""));
m_stcFixerPreview->SetKeyWords(3, wxT(""));
m_stcFixerPreview->SetKeyWords(4, wxT(""));
boxSizer209->Add(m_stcFixerPreview, 1, wxALL|wxEXPAND, 5);
wxBoxSizer* bSizerButtons = new wxBoxSizer(wxHORIZONTAL);
bSizerMain->Add(bSizerButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5);
m_stdBtnSizer30 = new wxStdDialogButtonSizer();
bSizerButtons->Add(m_stdBtnSizer30, 0, wxALL, 5);
m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_buttonOK->SetDefault();
m_stdBtnSizer30->AddButton(m_buttonOK);
m_buttonApply = new wxButton(this, wxID_APPLY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_stdBtnSizer30->AddButton(m_buttonApply);
m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_stdBtnSizer30->AddButton(m_buttonCancel);
m_buttonHelp = new wxButton(this, wxID_HELP, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_stdBtnSizer30->AddButton(m_buttonHelp);
m_stdBtnSizer30->Realize();
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(m_treebook)){
wxPersistenceManager::Get().RegisterAndRestore(m_treebook);
} else {
wxPersistenceManager::Get().Restore(m_treebook);
}
#endif
m_treebook->ExpandNode( 0, true );
m_treebook->ExpandNode( 1, true );
m_treebook->ExpandNode( 2, true );
m_treebook->ExpandNode( 3, true );
m_treebook->ExpandNode( 4, true );
m_treebook->ExpandNode( 5, true );
m_treebook->ExpandNode( 6, true );
SetName(wxT("CodeFormatterBaseDlg"));
SetSizeHints(-1,-1);
if ( GetSizer() ) {
GetSizer()->Fit(this);
}
CentreOnParent(wxBOTH);
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(this)) {
wxPersistenceManager::Get().RegisterAndRestore(this);
} else {
wxPersistenceManager::Get().Restore(this);
}
#endif
// Connect events
m_checkBoxFormatOnSave->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnFormatOnSave), NULL, this);
m_choiceCxxEngine->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(CodeFormatterBaseDlg::OnChoicecxxengineChoiceSelected), NULL, this);
m_choicePhpFormatter->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(CodeFormatterBaseDlg::OnChoicephpformatterChoiceSelected), NULL, this);
m_pgMgrAstyle->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CodeFormatterBaseDlg::OnPgmgrastylePgChanged), NULL, this);
m_textCtrlUserFlags->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(CodeFormatterBaseDlg::OnCustomAstyleFlags), NULL, this);
m_pgMgrClang->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CodeFormatterBaseDlg::OnPgmgrclangPgChanged), NULL, this);
m_pgMgrPhp->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CodeFormatterBaseDlg::OnPgmgrphpPgChanged), NULL, this);
m_filePickerPhpExec->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(CodeFormatterBaseDlg::OnPhpFileSelected), NULL, this);
m_filePickerPHPCsFixerPhar->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(CodeFormatterBaseDlg::OnPharFileSelected), NULL, this);
m_stc->Connect(wxEVT_STC_CHANGE, wxStyledTextEventHandler(CodeFormatterBaseDlg::OnPHPCSFixerOptionsUpdated), NULL, this);
m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnOK), NULL, this);
m_buttonApply->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CodeFormatterBaseDlg::OnApplyUI), NULL, this);
m_buttonApply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnApply), NULL, this);
m_buttonHelp->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnHelp), NULL, this);
}
CodeFormatterBaseDlg::~CodeFormatterBaseDlg()
{
m_checkBoxFormatOnSave->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnFormatOnSave), NULL, this);
m_choiceCxxEngine->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(CodeFormatterBaseDlg::OnChoicecxxengineChoiceSelected), NULL, this);
m_choicePhpFormatter->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(CodeFormatterBaseDlg::OnChoicephpformatterChoiceSelected), NULL, this);
m_pgMgrAstyle->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CodeFormatterBaseDlg::OnPgmgrastylePgChanged), NULL, this);
m_textCtrlUserFlags->Disconnect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(CodeFormatterBaseDlg::OnCustomAstyleFlags), NULL, this);
m_pgMgrClang->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CodeFormatterBaseDlg::OnPgmgrclangPgChanged), NULL, this);
m_pgMgrPhp->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CodeFormatterBaseDlg::OnPgmgrphpPgChanged), NULL, this);
m_filePickerPhpExec->Disconnect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(CodeFormatterBaseDlg::OnPhpFileSelected), NULL, this);
m_filePickerPHPCsFixerPhar->Disconnect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(CodeFormatterBaseDlg::OnPharFileSelected), NULL, this);
m_stc->Disconnect(wxEVT_STC_CHANGE, wxStyledTextEventHandler(CodeFormatterBaseDlg::OnPHPCSFixerOptionsUpdated), NULL, this);
m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnOK), NULL, this);
m_buttonApply->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CodeFormatterBaseDlg::OnApplyUI), NULL, this);
m_buttonApply->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnApply), NULL, this);
m_buttonHelp->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnHelp), NULL, this);
}