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

#include "SwitchToWorkspaceBase.h"

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

static bool bBitmapLoaded = false;

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

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

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

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

    wxBoxSizer* boxSizer14 = new wxBoxSizer(wxVERTICAL);
    m_panel12->SetSizer(boxSizer14);

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

    boxSizer14->Add(flexGridSizer4, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText6 = new wxStaticText(m_panel12, wxID_ANY, _("Workspace file:"), wxDefaultPosition,
                                     wxDLG_UNIT(m_panel12, wxSize(-1, -1)), 0);

    flexGridSizer4->Add(m_staticText6, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    wxArrayString m_comboBoxFilesArr;
    m_comboBoxFiles = new clThemedComboBox(m_panel12, wxID_ANY, wxT(""), wxDefaultPosition,
                                           wxDLG_UNIT(m_panel12, wxSize(250, -1)), m_comboBoxFilesArr, 0);
    m_comboBoxFiles->SetFocus();
#if wxVERSION_NUMBER >= 3000
    m_comboBoxFiles->SetHint(wxT(""));
#endif

    flexGridSizer4->Add(m_comboBoxFiles, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_button24 =
        new wxButton(m_panel12, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDLG_UNIT(m_panel12, wxSize(-1, -1)), 0);
    m_button24->SetFocus();

    flexGridSizer4->Add(m_button24, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_stdBtnSizer18 = new wxStdDialogButtonSizer();

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

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

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

    SetName(wxT("SwitchToWorkspaceBaseDlg"));
    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_button24->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchToWorkspaceBaseDlg::OnBrowse), NULL,
                        this);
    m_button20->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SwitchToWorkspaceBaseDlg::OnOKUI), NULL, this);
}

SwitchToWorkspaceBaseDlg::~SwitchToWorkspaceBaseDlg()
{
    m_button24->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchToWorkspaceBaseDlg::OnBrowse),
                           NULL, this);
    m_button20->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SwitchToWorkspaceBaseDlg::OnOKUI), NULL, this);
}
