//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: tags_options_base_dlg.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#include "tags_options_base_dlg.h"
#include "tags_options_data.h"

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

static bool bBitmapLoaded = false;

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

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

    wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);

    boxSizer100->Add(mainSizer, 1, wxALL | wxEXPAND, WXC_FROM_DIP(0));

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

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

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

    wxBoxSizer* bSizer19 = new wxBoxSizer(wxVERTICAL);
    m_paneDisplayAndBehavior->SetSizer(bSizer19);

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

    bSizer19->Add(flexGridSizer12, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText14 =
        new wxStaticText(m_paneDisplayAndBehavior, wxID_ANY, _("Number of items to display in the completion box:"),
                         wxDefaultPosition, wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);

    flexGridSizer12->Add(m_staticText14, 0, wxLEFT | wxRIGHT | wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

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

    flexGridSizer12->Add(m_spinCtrlNumberOfCCItems, 0, wxALL | wxEXPAND | wxALIGN_LEFT, WXC_FROM_DIP(5));

    m_staticText123 = new wxStaticText(m_paneDisplayAndBehavior, wxID_ANY, _("Additional file extensions to parse:"),
                                       wxDefaultPosition, wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);

    flexGridSizer12->Add(m_staticText123, 0, wxALL, WXC_FROM_DIP(5));

    m_textCtrlFileSpec = new wxTextCtrl(m_paneDisplayAndBehavior, wxID_ANY, wxT(""), wxDefaultPosition,
                                        wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);
    m_textCtrlFileSpec->SetToolTip(_("In addition to the default C/C++ file extensions, you may add here\nadditional "
                                     "file extensions so CodeLite will know to parse them as\nC/C++ files"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlFileSpec->SetHint(wxT(""));
#endif

    flexGridSizer12->Add(m_textCtrlFileSpec, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticLine129 = new wxStaticLine(m_paneDisplayAndBehavior, wxID_ANY, wxDefaultPosition,
                                       wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), wxLI_HORIZONTAL);

    bSizer19->Add(m_staticLine129, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    bSizer19->Add(flexGridSizer127, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkDisplayTypeInfo = new wxCheckBox(m_paneDisplayAndBehavior, wxID_ANY, _("Display type info tooltips"),
                                            wxDefaultPosition, wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);
    m_checkDisplayTypeInfo->SetValue(false);
    m_checkDisplayTypeInfo->SetToolTip(_("Display information about the hovered text"));

    flexGridSizer127->Add(m_checkDisplayTypeInfo, 0, wxALL | wxALIGN_LEFT, WXC_FROM_DIP(5));

    m_checkBoxEnableCaseSensitiveCompletion =
        new wxCheckBox(m_paneDisplayAndBehavior, wxID_ANY, _("Code Completion is case sensitive"), wxDefaultPosition,
                       wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);
    m_checkBoxEnableCaseSensitiveCompletion->SetValue(false);
    m_checkBoxEnableCaseSensitiveCompletion->SetToolTip(
        _("When enabled, the code completion search engine will use case sensitive searches. \nSo 'QString' is NOT "
          "equal 'qstring'"));

    flexGridSizer127->Add(m_checkBoxEnableCaseSensitiveCompletion, 0, wxALL | wxALIGN_LEFT, WXC_FROM_DIP(5));

    m_checkDisplayFunctionTip =
        new wxCheckBox(m_paneDisplayAndBehavior, wxID_ANY, _("Display function calltip"), wxDefaultPosition,
                       wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);
    m_checkDisplayFunctionTip->SetValue(false);
    m_checkDisplayFunctionTip->SetToolTip(_("Display function argument list after typing an open brace '('"));

    flexGridSizer127->Add(m_checkDisplayFunctionTip, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxKeepFunctionSignature =
        new wxCheckBox(m_paneDisplayAndBehavior, wxID_ANY, _("Keep function signature un-formatted"), wxDefaultPosition,
                       wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);
    m_checkBoxKeepFunctionSignature->SetValue(false);

    flexGridSizer127->Add(m_checkBoxKeepFunctionSignature, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkCppKeywordAssist =
        new wxCheckBox(m_paneDisplayAndBehavior, wxID_ANY, _("Display completion box for language keywords"),
                       wxDefaultPosition, wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);
    m_checkCppKeywordAssist->SetValue(false);
    m_checkCppKeywordAssist->SetToolTip(
        _("When enabled, codelite will auto show the code completion box for C/C++ keywords after typing 2 chars"));

    flexGridSizer127->Add(m_checkCppKeywordAssist, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxretagWorkspaceOnStartup =
        new wxCheckBox(m_paneDisplayAndBehavior, wxID_ANY, _("Re-parse on workspace loaded"), wxDefaultPosition,
                       wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);
    m_checkBoxretagWorkspaceOnStartup->SetValue(false);
    m_checkBoxretagWorkspaceOnStartup->SetToolTip(_("Retag workspace once loaded"));

    flexGridSizer127->Add(m_checkBoxretagWorkspaceOnStartup, 0, wxALL, WXC_FROM_DIP(5));

    m_checkDisableParseOnSave =
        new wxCheckBox(m_paneDisplayAndBehavior, wxID_ANY, _("Do not parse the file after saving it"),
                       wxDefaultPosition, wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);
    m_checkDisableParseOnSave->SetValue(false);
    m_checkDisableParseOnSave->SetToolTip(_("Do not trigger file parsing after saving a file"));

    flexGridSizer127->Add(m_checkDisableParseOnSave, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxDeepUsingNamespaceResolving =
        new wxCheckBox(m_paneDisplayAndBehavior, wxID_ANY, _("Crawl all files to locate 'using namespace' calls"),
                       wxDefaultPosition, wxDLG_UNIT(m_paneDisplayAndBehavior, wxSize(-1, -1)), 0);
    m_checkBoxDeepUsingNamespaceResolving->SetValue(false);
    m_checkBoxDeepUsingNamespaceResolving->SetToolTip(
        _("Always search for 'using namespace' statements in all included files"));

    flexGridSizer127->Add(m_checkBoxDeepUsingNamespaceResolving, 0, wxALL, WXC_FROM_DIP(5));

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

    wxBoxSizer* bSizer16 = new wxBoxSizer(wxVERTICAL);
    m_paneColouring->SetSizer(bSizer16);

    wxArrayString m_pgMgrColouringArr;
    wxUnusedVar(m_pgMgrColouringArr);
    wxArrayInt m_pgMgrColouringIntArr;
    wxUnusedVar(m_pgMgrColouringIntArr);
    m_pgMgrColouring = new wxPropertyGridManager(m_paneColouring, wxID_ANY, wxDefaultPosition,
                                                 wxDLG_UNIT(m_paneColouring, wxSize(-1, -1)),
                                                 wxPG_DESCRIPTION | wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED);

    bSizer16->Add(m_pgMgrColouring, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_pgPropTrackPreProcessors =
        m_pgMgrColouring->Append(new wxBoolProperty(_("Track PreProcessor blocks"), wxPG_LABEL, 0));
    m_pgPropTrackPreProcessors->SetHelpString(
        _("Track Pre Processor blocks in the code and colour unreachable code with grey text (\"disabled text\")"));

    m_pgPropColourLocalVariables =
        m_pgMgrColouring->Append(new wxBoolProperty(_("Apply context aware colouring"), wxPG_LABEL, 1));
    m_pgPropColourLocalVariables->SetHelpString(
        _("When enabled, CodeLite will colour classes, enums, local variables etc\nwith their own custom colour to "
          "diferentiate them from the rest of the code"));

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

    wxBoxSizer* bSizer17 = new wxBoxSizer(wxVERTICAL);
    m_paneTriggering->SetSizer(bSizer17);

    wxStaticBoxSizer* sbSizer7 =
        new wxStaticBoxSizer(new wxStaticBox(m_paneTriggering, wxID_ANY, _("Automatic Word Completion:")), wxVERTICAL);

    bSizer17->Add(sbSizer7, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    sbSizer7->Add(fgSizer4, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkWordAssist = new wxCheckBox(m_paneTriggering, wxID_ANY, _("Auto display code completion box when typing"),
                                       wxDefaultPosition, wxDLG_UNIT(m_paneTriggering, wxSize(-1, -1)), 0);
    m_checkWordAssist->SetValue(false);
    m_checkWordAssist->SetToolTip(
        _("When enabled, codelite will auto show the code completion box after N chars were typed"));

    fgSizer4->Add(m_checkWordAssist, 0, wxALL, WXC_FROM_DIP(5));

    fgSizer4->Add(0, 0, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_staticTextMinWordLen = new wxStaticText(m_paneTriggering, wxID_ANY, _("Minimum chars to type:"),
                                              wxDefaultPosition, wxDLG_UNIT(m_paneTriggering, wxSize(-1, -1)), 0);
    m_staticTextMinWordLen->SetToolTip(_("Minimum chars to type:"));

    fgSizer4->Add(m_staticTextMinWordLen, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_sliderMinWordLen =
        new wxSlider(m_paneTriggering, wxID_ANY, 3, 1, 10, wxDefaultPosition,
                     wxDLG_UNIT(m_paneTriggering, wxSize(-1, -1)), wxSL_LABELS | wxSL_AUTOTICKS | wxSL_HORIZONTAL);
    m_sliderMinWordLen->SetToolTip(_("Number of chars to type before showing the code completion box"));

    fgSizer4->Add(m_sliderMinWordLen, 0, wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_checkAutoInsertSingleChoice = new wxCheckBox(m_paneTriggering, wxID_ANY, _("Auto insert single match"),
                                                   wxDefaultPosition, wxDLG_UNIT(m_paneTriggering, wxSize(-1, -1)), 0);
    m_checkAutoInsertSingleChoice->SetValue(true);
    m_checkAutoInsertSingleChoice->SetToolTip(
        _("When there is only a single match don't show the code completion box but rather insert the match"));

    fgSizer4->Add(m_checkAutoInsertSingleChoice, 0, wxALL, WXC_FROM_DIP(5));

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

    wxBoxSizer* boxSizer91 = new wxBoxSizer(wxVERTICAL);
    m_pageCtags->SetSizer(boxSizer91);

    m_notebook93 =
        new wxNotebook(m_pageCtags, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_pageCtags, wxSize(-1, -1)), wxBK_DEFAULT);
    m_notebook93->SetName(wxT("m_notebook93"));

    boxSizer91->Add(m_notebook93, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_panel38 = new wxPanel(m_notebook93, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook93, wxSize(-1, -1)),
                            wxTAB_TRAVERSAL);
    m_notebook93->AddPage(m_panel38, _("Search Paths"), true);

    wxBoxSizer* boxSizer30 = new wxBoxSizer(wxVERTICAL);
    m_panel38->SetSizer(boxSizer30);

    wxBoxSizer* bSizer9 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer30->Add(bSizer9, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_textCtrlCtagsSearchPaths =
        new wxStyledTextCtrl(m_panel38, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel38, wxSize(-1, -1)), 0);
    wxFont m_textCtrlCtagsSearchPathsFont = wxSystemSettings::GetFont(wxSYS_SYSTEM_FIXED_FONT);
    m_textCtrlCtagsSearchPaths->SetFont(m_textCtrlCtagsSearchPathsFont);
    // Configure the fold margin
    m_textCtrlCtagsSearchPaths->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_textCtrlCtagsSearchPaths->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_textCtrlCtagsSearchPaths->SetMarginSensitive(4, true);
    m_textCtrlCtagsSearchPaths->SetMarginWidth(4, 0);

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

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

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

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

    bSizer9->Add(m_textCtrlCtagsSearchPaths, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer8 = new wxBoxSizer(wxVERTICAL);

    bSizer9->Add(bSizer8, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_buttonAddSearchPath =
        new wxButton(m_panel38, wxID_ANY, _("&Add..."), wxDefaultPosition, wxDLG_UNIT(m_panel38, wxSize(-1, -1)), 0);

    bSizer8->Add(m_buttonAddSearchPath, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_buttonCtagsSuggest =
        new wxButton(m_panel38, wxID_ANY, _("Suggest"), wxDefaultPosition, wxDLG_UNIT(m_panel38, wxSize(-1, -1)), 0);
    m_buttonCtagsSuggest->SetToolTip(_("Suggest search paths based on the installed compilers"));

    bSizer8->Add(m_buttonCtagsSuggest, 0, wxALL, WXC_FROM_DIP(5));

    m_panel40 = new wxPanel(m_notebook93, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook93, wxSize(-1, -1)),
                            wxTAB_TRAVERSAL);
    m_notebook93->AddPage(m_panel40, _("Exclude Paths"), false);

    wxBoxSizer* boxSizer42 = new wxBoxSizer(wxVERTICAL);
    m_panel40->SetSizer(boxSizer42);

    wxBoxSizer* bSizer91 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer42->Add(bSizer91, 1, wxEXPAND, WXC_FROM_DIP(5));

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

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

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

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

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

    bSizer91->Add(m_textCtrlCtagsExcludePaths, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer81 = new wxBoxSizer(wxVERTICAL);

    bSizer91->Add(bSizer81, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_buttonAddExcludePath =
        new wxButton(m_panel40, wxID_ANY, _("&Add..."), wxDefaultPosition, wxDLG_UNIT(m_panel40, wxSize(-1, -1)), 0);

    bSizer81->Add(m_buttonAddExcludePath, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    wxBoxSizer* bSizer6 = new wxBoxSizer(wxVERTICAL);
    m_panelCtagsAdvanced->SetSizer(bSizer6);

    m_notebook2 = new wxNotebook(m_panelCtagsAdvanced, wxID_ANY, wxDefaultPosition,
                                 wxDLG_UNIT(m_panelCtagsAdvanced, wxSize(-1, -1)), 0);
    m_notebook2->SetName(wxT("m_notebook2"));

    bSizer6->Add(m_notebook2, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panelClangGeneral =
        new wxPanel(m_notebook2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook2, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_panelClangGeneral->SetToolTip(_("List here list of tokens to be pre-processed by codelite-indexer. \nUsually, "
                                      "you would like to add here macros which confuse the parser\nClick the below "
                                      "link to read more about this feature and the syntax supported.\n"));
    m_notebook2->AddPage(m_panelClangGeneral, _("Tokens"), false);

    wxBoxSizer* bSizer5 = new wxBoxSizer(wxVERTICAL);
    m_panelClangGeneral->SetSizer(bSizer5);

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

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

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

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

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

    bSizer5->Add(m_textPrep, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer130 = new wxBoxSizer(wxVERTICAL);

    bSizer5->Add(boxSizer130, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText9 = new wxStaticText(m_panelClangGeneral, wxID_ANY,
                                     _("List here list of tokens to be pre-processed by codelite-indexer usually, you "
                                       "would like to add here\nmacros which confuse the parser"),
                                     wxDefaultPosition, wxDLG_UNIT(m_panelClangGeneral, wxSize(-1, -1)), 0);
    m_staticText9->SetToolTip(_("List here list of tokens to be pre-processed by codelite-indexer. \nUsually, you "
                                "would like to add here macros which confuse the parser\nClick the below link to read "
                                "more about this feature and the syntax supported.\n"));

    boxSizer130->Add(m_staticText9, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_hyperlink1 = new wxHyperlinkCtrl(m_panelClangGeneral, wxID_ANY, _("Macros Handling"),
                                       wxT("http://codelite.org/LiteEditor/MacrosHandling101"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panelClangGeneral, wxSize(-1, -1)), wxHL_DEFAULT_STYLE);

    boxSizer130->Add(m_hyperlink1, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer131 = new wxBoxSizer(wxHORIZONTAL);

    bSizer5->Add(bSizer131, 0, wxEXPAND, WXC_FROM_DIP(5));

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

    wxBoxSizer* bSizer13 = new wxBoxSizer(wxVERTICAL);
    m_panel5->SetSizer(bSizer13);

    wxStaticBoxSizer* sbSizer521 = new wxStaticBoxSizer(new wxStaticBox(m_panel5, wxID_ANY, wxT("")), wxVERTICAL);

    bSizer13->Add(sbSizer521, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText91 = new wxStaticText(m_panel5, wxID_ANY,
                                      _("Specify here a list of types which are to be specially handled while parsing "
                                        "C and C++\nsource files in the format of TYPE1=TYPE2. So when TYPE1 is found, "
                                        "CodeLite will offer\ncompletion as if it was TYPE2 was found"),
                                      wxDefaultPosition, wxDLG_UNIT(m_panel5, wxSize(-1, -1)), 0);

    sbSizer521->Add(m_staticText91, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

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

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

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

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

    bSizer13->Add(m_textTypes, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer14 = new wxBoxSizer(wxVERTICAL);

    bSizer6->Add(bSizer14, 0, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer15 = new wxBoxSizer(wxHORIZONTAL);

    bSizer14->Add(bSizer15, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_textCtrlFilesList = new wxTextCtrl(m_panelCtagsAdvanced, wxID_ANY, wxT(""), wxDefaultPosition,
                                         wxDLG_UNIT(m_panelCtagsAdvanced, wxSize(-1, -1)), 0);
    m_textCtrlFilesList->SetToolTip(_("CodeLite can suggest a list of 'Tokens' that will be added to the 'Tokens' "
                                      "table based on parsing the following header files"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlFilesList->SetHint(wxT(""));
#endif

    bSizer15->Add(m_textCtrlFilesList, 1, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_buttonParse = new wxButton(m_panelCtagsAdvanced, wxID_ANY, _("Parse!"), wxDefaultPosition,
                                 wxDLG_UNIT(m_panelCtagsAdvanced, wxSize(-1, -1)), 0);

    bSizer15->Add(m_buttonParse, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer102 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer100->Add(boxSizer102, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button104 = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button104->SetDefault();

    boxSizer102->Add(m_button104, 0, wxALL, WXC_FROM_DIP(5));

    m_button106 = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer102->Add(m_button106, 0, wxALL, WXC_FROM_DIP(5));

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

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

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

    SetName(wxT("TagsOptionsBaseDlg"));
    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_pgMgrColouring->Connect(
        wxEVT_PG_CHANGED, wxPropertyGridEventHandler(TagsOptionsBaseDlg::OnColouringPropertyValueChanged), NULL, this);
    m_staticTextMinWordLen->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TagsOptionsBaseDlg::OnAutoShowWordAssitUI),
                                    NULL, this);
    m_sliderMinWordLen->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TagsOptionsBaseDlg::OnAutoShowWordAssitUI),
                                NULL, this);
    m_buttonAddSearchPath->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
                                   wxCommandEventHandler(TagsOptionsBaseDlg::OnAddSearchPath), NULL, this);
    m_buttonCtagsSuggest->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
                                  wxCommandEventHandler(TagsOptionsBaseDlg::OnSuggestCtags), NULL, this);
    m_buttonAddExcludePath->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
                                    wxCommandEventHandler(TagsOptionsBaseDlg::OnAddExcludePath), NULL, this);
    m_buttonParse->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TagsOptionsBaseDlg::OnParse), NULL,
                           this);
    m_buttonParse->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TagsOptionsBaseDlg::OnFileSelectedUI), NULL, this);
    m_button104->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TagsOptionsBaseDlg::OnButtonOk), NULL,
                         this);
    m_button106->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TagsOptionsBaseDlg::OnButtonCancel), NULL,
                         this);
}

TagsOptionsBaseDlg::~TagsOptionsBaseDlg()
{
    m_pgMgrColouring->Disconnect(
        wxEVT_PG_CHANGED, wxPropertyGridEventHandler(TagsOptionsBaseDlg::OnColouringPropertyValueChanged), NULL, this);
    m_staticTextMinWordLen->Disconnect(wxEVT_UPDATE_UI,
                                       wxUpdateUIEventHandler(TagsOptionsBaseDlg::OnAutoShowWordAssitUI), NULL, this);
    m_sliderMinWordLen->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TagsOptionsBaseDlg::OnAutoShowWordAssitUI),
                                   NULL, this);
    m_buttonAddSearchPath->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
                                      wxCommandEventHandler(TagsOptionsBaseDlg::OnAddSearchPath), NULL, this);
    m_buttonCtagsSuggest->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
                                     wxCommandEventHandler(TagsOptionsBaseDlg::OnSuggestCtags), NULL, this);
    m_buttonAddExcludePath->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
                                       wxCommandEventHandler(TagsOptionsBaseDlg::OnAddExcludePath), NULL, this);
    m_buttonParse->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TagsOptionsBaseDlg::OnParse), NULL,
                              this);
    m_buttonParse->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TagsOptionsBaseDlg::OnFileSelectedUI), NULL,
                              this);
    m_button104->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TagsOptionsBaseDlg::OnButtonOk), NULL,
                            this);
    m_button106->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TagsOptionsBaseDlg::OnButtonCancel),
                            NULL, this);
}
