//////////////////////////////////////////////////////////////////////
// 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 wxCrafterCbL3wsInitBitmapResources();

static bool bBitmapLoaded = false;

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

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

    wxBoxSizer* boxSizer22 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer2->Add(boxSizer22, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxEnable = new wxCheckBox(this, wxID_ANY, _("Enable Language Server Completion"), wxDefaultPosition,
                                      wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxEnable->SetValue(false);

    boxSizer22->Add(m_checkBoxEnable, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

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

    m_staticLine102 =
        new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxLI_HORIZONTAL);

    boxSizer2->Add(m_staticLine102, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText105 = new wxStaticText(this, wxID_ANY, _("Available Language Servers"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer2->Add(m_staticText105, 0, wxALL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer106 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer2->Add(boxSizer106, 1, wxEXPAND, WXC_FROM_DIP(5));

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

    boxSizer106->Add(m_notebook, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer108 = new wxBoxSizer(wxVERTICAL);

    boxSizer106->Add(boxSizer108, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_buttonScan = new wxButton(this, wxID_FIND, _("Scan..."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonScan->SetToolTip(_("Scan for installed Language Servers insalled"));

    boxSizer108->Add(m_buttonScan, 0, wxALL, WXC_FROM_DIP(5));

    m_buttonNew = new wxButton(this, wxID_NEW, _("Add..."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonNew->SetToolTip(_("Add new Language Server"));

    boxSizer108->Add(m_buttonNew, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_buttonDelete =
        new wxButton(this, wxID_DELETE, _("Delete"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer108->Add(m_buttonDelete, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer4 = new wxStdDialogButtonSizer();

    boxSizer2->Add(m_stdBtnSizer4, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

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

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

    SetName(wxT("LanguageServerSettingsDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_buttonScan->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &LanguageServerSettingsDlgBase::OnScan, this);
    m_buttonNew->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &LanguageServerSettingsDlgBase::OnAddServer, this);
    m_buttonDelete->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &LanguageServerSettingsDlgBase::OnDeleteLSP, this);
    m_buttonDelete->Bind(wxEVT_UPDATE_UI, &LanguageServerSettingsDlgBase::OnDeleteLSPUI, this);
    m_button6->Bind(wxEVT_UPDATE_UI, &LanguageServerSettingsDlgBase::OnOKUI, this);
}

LanguageServerSettingsDlgBase::~LanguageServerSettingsDlgBase()
{
    m_buttonScan->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &LanguageServerSettingsDlgBase::OnScan, this);
    m_buttonNew->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &LanguageServerSettingsDlgBase::OnAddServer, this);
    m_buttonDelete->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &LanguageServerSettingsDlgBase::OnDeleteLSP, this);
    m_buttonDelete->Unbind(wxEVT_UPDATE_UI, &LanguageServerSettingsDlgBase::OnDeleteLSPUI, this);
    m_button6->Unbind(wxEVT_UPDATE_UI, &LanguageServerSettingsDlgBase::OnOKUI, this);
}

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

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

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

    boxSizer31->Add(flexGridSizer432, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    m_checkBoxEnabled =
        new wxCheckBox(this, wxID_ANY, _("Enabled"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxEnabled->SetValue(true);

    flexGridSizer432->Add(m_checkBoxEnabled, 0, wxALL, WXC_FROM_DIP(5));

    m_staticText453 =
        new wxStaticText(this, wxID_ANY, _("Name"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_staticText453->SetToolTip(_("Give this language server a unique name"));

    flexGridSizer432->Add(m_staticText453, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

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

    flexGridSizer432->Add(m_textCtrlName, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

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

    wxBoxSizer* boxSizer184 = new wxBoxSizer(wxHORIZONTAL);

    flexGridSizer432->Add(boxSizer184, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxRemoteServer =
        new wxCheckBox(this, wxID_ANY, _("Remote Server"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxRemoteServer->SetValue(false);

    boxSizer184->Add(m_checkBoxRemoteServer, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    wxArrayString m_choiceSSHAccountsArr;
    m_choiceSSHAccounts =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceSSHAccountsArr, 0);

    boxSizer184->Add(m_choiceSSHAccounts, 1, wxALL, WXC_FROM_DIP(5));

    m_staticText495 =
        new wxStaticText(this, wxID_ANY, _("Options:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_staticText495->SetToolTip(_("The language server executable"));

    flexGridSizer432->Add(m_staticText495, 0, wxALL | wxALIGN_RIGHT | wxALIGN_TOP, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer162 = new wxBoxSizer(wxVERTICAL);

    flexGridSizer432->Add(boxSizer162, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    boxSizer162->Add(m_notebook164, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panelCommand = new wxPanel(m_notebook164, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook164, wxSize(-1, -1)),
                                 wxTAB_TRAVERSAL);
    m_notebook164->AddPage(m_panelCommand, _("Command"), true);

    wxBoxSizer* boxSizer168 = new wxBoxSizer(wxVERTICAL);
    m_panelCommand->SetSizer(boxSizer168);

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

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

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

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

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

    boxSizer168->Add(m_stcCommand, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panelEnvironment = new wxPanel(m_notebook164, wxID_ANY, wxDefaultPosition,
                                     wxDLG_UNIT(m_notebook164, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook164->AddPage(m_panelEnvironment, _("Environment"), false);

    wxBoxSizer* boxSizer178 = new wxBoxSizer(wxVERTICAL);
    m_panelEnvironment->SetSizer(boxSizer178);

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

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

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

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

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

    boxSizer178->Add(m_stcEnvironment, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panelInitOptions = new wxPanel(m_notebook164, wxID_ANY, wxDefaultPosition,
                                     wxDLG_UNIT(m_notebook164, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook164->AddPage(m_panelInitOptions, _("Initialization Options"), false);

    wxBoxSizer* boxSizer1682 = new wxBoxSizer(wxVERTICAL);
    m_panelInitOptions->SetSizer(boxSizer1682);

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

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

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

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

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

    boxSizer1682->Add(m_stcInitOptions, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_staticText579 = new wxStaticText(this, wxID_ANY, _("Working directory:"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_staticText579->SetToolTip(_("Set the language server working directory"));

    flexGridSizer432->Add(m_staticText579, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer1131 = new wxBoxSizer(wxHORIZONTAL);

    flexGridSizer432->Add(boxSizer1131, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    boxSizer1131->Add(m_textCtrlWD, 1, wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_button1153 =
        new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxBU_EXACTFIT);
    m_button1153->SetToolTip(_("Browse..."));

    boxSizer1131->Add(m_button1153, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_staticText6311 =
        new wxStaticText(this, wxID_ANY, _("Languages:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_staticText6311->SetToolTip(_("List of supported languages by this Language Server"));

    flexGridSizer432->Add(m_staticText6311, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(10));

    wxBoxSizer* boxSizer113 = new wxBoxSizer(wxHORIZONTAL);

    flexGridSizer432->Add(boxSizer113, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    boxSizer113->Add(m_textCtrlLanguages, 1, wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_button115 =
        new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxBU_EXACTFIT);
    m_button115->SetToolTip(_("Show List of Languages"));

    boxSizer113->Add(m_button115, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_staticText117 = new wxStaticText(this, wxID_ANY, _("Connection string:"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_staticText117->SetToolTip(_("Set the connection string here.\nIf the server connects using 'stdio', choose the "
                                  "'stdio' entry\nOtherwise, set a connection in the form of:\ntcp://127.0.0.1:12345"));

    flexGridSizer432->Add(m_staticText117, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    wxArrayString m_comboBoxConnectionArr;
    m_comboBoxConnectionArr.Add(_("stdio"));
    m_comboBoxConnection = new wxComboBox(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                          m_comboBoxConnectionArr, 0);
    m_comboBoxConnection->SetToolTip(
        _("If the language server is using TCP\nType the connection string in the format of:\n\ntcp://host:port"));
#if wxVERSION_NUMBER >= 3000
    m_comboBoxConnection->SetHint(wxT(""));
#endif
    m_comboBoxConnection->SetSelection(0);

    flexGridSizer432->Add(m_comboBoxConnection, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText125 =
        new wxStaticText(this, wxID_ANY, _("Priority:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_staticText125->SetToolTip(
        _("Multiple Plugins / Servers can compete for providing code completion\nfor a given language. Set here the "
          "server priority.\nThe server with the highest priority will be triggered first\n\nNote that the builtin "
          "plugins are using priority in the range of 10 - 75\nIf you want that the LSP will be the first in the "
          "chain, set its priority to a value that is higher than 75"));

    flexGridSizer432->Add(m_staticText125, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_sliderPriority =
        new wxSlider(this, wxID_ANY, 50, 0, 200, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxSL_LABELS);

    flexGridSizer432->Add(m_sliderPriority, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    m_checkBoxDiagnostics = new wxCheckBox(this, wxID_ANY, _("Display diagnostics"), wxDefaultPosition,
                                           wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxDiagnostics->SetValue(true);

    flexGridSizer432->Add(m_checkBoxDiagnostics, 0, wxALL, WXC_FROM_DIP(5));

    SetName(wxT("LanguageServerPageBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    // Connect events
    m_choiceSSHAccounts->Bind(wxEVT_UPDATE_UI, &LanguageServerPageBase::OnRemoteServerUI, this);
    m_stcCommand->Bind(wxEVT_UPDATE_UI, &LanguageServerPageBase::OnCommandUI, this);
    m_button1153->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &LanguageServerPageBase::OnBrowseWD, this);
    m_button115->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &LanguageServerPageBase::OnSuggestLanguages, this);
}

LanguageServerPageBase::~LanguageServerPageBase()
{
    m_choiceSSHAccounts->Unbind(wxEVT_UPDATE_UI, &LanguageServerPageBase::OnRemoteServerUI, this);
    m_stcCommand->Unbind(wxEVT_UPDATE_UI, &LanguageServerPageBase::OnCommandUI, this);
    m_button1153->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &LanguageServerPageBase::OnBrowseWD, this);
    m_button115->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &LanguageServerPageBase::OnSuggestLanguages, this);
}

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

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

    m_stdBtnSizer37 = new wxStdDialogButtonSizer();

    boxSizer35->Add(m_stdBtnSizer37, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

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

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

    SetName(wxT("NewLanguageServerDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_buttonOK->Bind(wxEVT_UPDATE_UI, &NewLanguageServerDlgBase::OnOKUI, this);
}

NewLanguageServerDlgBase::~NewLanguageServerDlgBase()
{
    m_buttonOK->Unbind(wxEVT_UPDATE_UI, &NewLanguageServerDlgBase::OnOKUI, this);
}

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

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

    m_panel155 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    boxSizer151->Add(m_panel155, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer157 = new wxBoxSizer(wxVERTICAL);
    m_panel155->SetSizer(boxSizer157);

    m_textCtrlFilter = new clThemedTextCtrl(m_panel155, wxID_ANY, wxT(""), wxDefaultPosition,
                                            wxDLG_UNIT(m_panel155, wxSize(-1, -1)), wxTE_PROCESS_ENTER);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlFilter->SetHint(wxT(""));
#endif

    boxSizer157->Add(m_textCtrlFilter, 0, wxEXPAND, WXC_FROM_DIP(2));

    m_dvTreeCtrll =
        new clTerminalViewCtrl(m_panel155, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel155, wxSize(-1, -1)),
                               wxDV_NO_HEADER | wxDV_ROW_LINES | wxDV_SINGLE);

    boxSizer157->Add(m_dvTreeCtrll, 1, wxEXPAND, WXC_FROM_DIP(2));

    SetName(wxT("LSPOutlineViewDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
    // Connect events
    m_textCtrlFilter->Bind(wxEVT_COMMAND_TEXT_UPDATED, &LSPOutlineViewDlgBase::OnTextUpdated, this);
    m_textCtrlFilter->Bind(wxEVT_COMMAND_TEXT_ENTER, &LSPOutlineViewDlgBase::OnEnter, this);
    m_textCtrlFilter->Bind(wxEVT_KEY_DOWN, &LSPOutlineViewDlgBase::OnKeyDown, this);
    m_dvTreeCtrll->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, &LSPOutlineViewDlgBase::OnItemActivated, this);
    m_dvTreeCtrll->Bind(wxEVT_KEY_DOWN, &LSPOutlineViewDlgBase::OnListKeyDown, this);
}

LSPOutlineViewDlgBase::~LSPOutlineViewDlgBase()
{
    m_textCtrlFilter->Unbind(wxEVT_COMMAND_TEXT_UPDATED, &LSPOutlineViewDlgBase::OnTextUpdated, this);
    m_textCtrlFilter->Unbind(wxEVT_COMMAND_TEXT_ENTER, &LSPOutlineViewDlgBase::OnEnter, this);
    m_textCtrlFilter->Unbind(wxEVT_KEY_DOWN, &LSPOutlineViewDlgBase::OnKeyDown, this);
    m_dvTreeCtrll->Unbind(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, &LSPOutlineViewDlgBase::OnItemActivated, this);
    m_dvTreeCtrll->Unbind(wxEVT_KEY_DOWN, &LSPOutlineViewDlgBase::OnListKeyDown, this);
}

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

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

    m_dvListCtrl = new clTerminalViewCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                          wxDV_NO_HEADER | wxDV_ROW_LINES | wxDV_SINGLE);

    boxSizer194->Add(m_dvListCtrl, 1, wxEXPAND, WXC_FROM_DIP(5));

    SetName(wxT("LanguageServerLogViewBase"));
    SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
}

LanguageServerLogViewBase::~LanguageServerLogViewBase() {}
