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

#include "tabgroupbasedlgs.h"


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

static bool bBitmapLoaded = false;


LoadTabGroupBaseDlg::LoadTabGroupBaseDlg(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);
        wxCrafterVGyK6QInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* mainsizer = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(mainsizer);
    
    wxBoxSizer* bSizer2 = new wxBoxSizer(wxVERTICAL);
    
    mainsizer->Add(bSizer2, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    wxBoxSizer* bSizer3 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer2->Add(bSizer3, 0, wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText1 = new wxStaticText(this, wxID_ANY, _("Select a tab group, or browse for one"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    bSizer3->Add(m_staticText1, 1, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_buttonBrowse = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonBrowse->SetToolTip(_("Click to search for other groups"));
    
    bSizer3->Add(m_buttonBrowse, 0, wxALL, WXC_FROM_DIP(5));
    
    wxArrayString m_listBoxArr;
    m_listBox = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_listBoxArr, 0);
    m_listBox->SetToolTip(_("Double-click to choose one of these groups"));
    
    bSizer2->Add(m_listBox, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    m_listBox->SetMinSize(wxSize(450,100));
    
    m_replaceCheck = new wxCheckBox(this, wxID_ANY, _("Replace current tabs"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_replaceCheck->SetValue(false);
    m_replaceCheck->SetToolTip(_("By default, the tabs of this group will be added to the current tabs. Tick this to replace the current tabs instead."));
    
    bSizer2->Add(m_replaceCheck, 0, wxALL, WXC_FROM_DIP(5));
    
    wxBoxSizer* bSizer11 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer2->Add(bSizer11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));
    
    m_button6 = new wxButton(this, wxID_OK, _("&Ok"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button6->SetDefault();
    
    bSizer11->Add(m_button6, 0, wxALL, WXC_FROM_DIP(5));
    
    m_button5 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    bSizer11->Add(m_button5, 0, wxALL, WXC_FROM_DIP(5));
    
    SetName(wxT("LoadTabGroupBaseDlg"));
    SetSize(-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_buttonBrowse->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadTabGroupBaseDlg::OnBrowse), NULL, this);
    m_listBox->Connect(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(LoadTabGroupBaseDlg::OnItemActivated), NULL, this);
    
}

LoadTabGroupBaseDlg::~LoadTabGroupBaseDlg()
{
    m_buttonBrowse->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadTabGroupBaseDlg::OnBrowse), NULL, this);
    m_listBox->Disconnect(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(LoadTabGroupBaseDlg::OnItemActivated), NULL, this);
    
}

SaveTabGroupBaseDlg::SaveTabGroupBaseDlg(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);
        wxCrafterVGyK6QInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* mainsizer = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(mainsizer);
    
    wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
    
    mainsizer->Add(bSizer1, 1, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText1 = new wxStaticText(this, wxID_ANY, _("Select which tabs you want to be in the group"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    bSizer1->Add(m_staticText1, 0, wxALL, WXC_FROM_DIP(5));
    
    wxBoxSizer* bSizer3 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer1->Add(bSizer3, 1, wxALL|wxEXPAND, WXC_FROM_DIP(0));
    
    wxArrayString m_ListTabsArr;
    m_ListTabs = new wxCheckListBox(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_ListTabsArr, 0);
    
    bSizer3->Add(m_ListTabs, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    m_ListTabs->SetMinSize(wxSize(400,-1));
    
    wxBoxSizer* bSizer13 = new wxBoxSizer(wxVERTICAL);
    
    bSizer3->Add(bSizer13, 0, wxALL, WXC_FROM_DIP(5));
    
    m_buttonCheckAll = new wxButton(this, wxID_ANY, _("Check All"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonCheckAll->SetToolTip(_("Click to select all items"));
    
    bSizer13->Add(m_buttonCheckAll, 0, wxALL, WXC_FROM_DIP(5));
    
    m_buttonClearAll = new wxButton(this, wxID_ANY, _("Clear All"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonClearAll->SetToolTip(_("Click to clear all items"));
    
    bSizer13->Add(m_buttonClearAll, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));
    
    wxBoxSizer* bSizer10 = new wxBoxSizer(wxVERTICAL);
    
    bSizer1->Add(bSizer10, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText4 = new wxStaticText(this, wxID_ANY, _("Choose a name for the group:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    bSizer10->Add(m_staticText4, 0, wxALL|wxALIGN_LEFT, WXC_FROM_DIP(5));
    
    m_textName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textName->SetHint(wxT(""));
    #endif
    
    bSizer10->Add(m_textName, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    wxArrayString m_radioBoxWorkspaceOrGlobalArr;
    m_radioBoxWorkspaceOrGlobalArr.Add(_("Workspace"));
    m_radioBoxWorkspaceOrGlobalArr.Add(_("Global"));
    m_radioBoxWorkspaceOrGlobal = new wxRadioBox(this, wxID_ANY, _("Save in the current Workspace, or Globally"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), m_radioBoxWorkspaceOrGlobalArr, 1, wxRA_SPECIFY_ROWS);
    m_radioBoxWorkspaceOrGlobal->SetToolTip(_("Tabgroups are usually specific to a single workspace. However if you want to use one in multiple workspaces, or when a workspace is not open, save it globally."));
    m_radioBoxWorkspaceOrGlobal->SetSelection(0);
    
    bSizer10->Add(m_radioBoxWorkspaceOrGlobal, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    wxBoxSizer* bSizer11 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer1->Add(bSizer11, 0, wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));
    
    m_button6 = new wxButton(this, wxID_OK, _("&Ok"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button6->SetDefault();
    
    bSizer11->Add(m_button6, 0, wxALL, WXC_FROM_DIP(5));
    
    m_button5 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    bSizer11->Add(m_button5, 0, wxALL, WXC_FROM_DIP(5));
    
    SetName(wxT("SaveTabGroupBaseDlg"));
    SetSize(-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_buttonCheckAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SaveTabGroupBaseDlg::OnCheckAll), NULL, this);
    m_buttonCheckAll->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SaveTabGroupBaseDlg::OnCheckAllUpdateUI), NULL, this);
    m_buttonClearAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SaveTabGroupBaseDlg::OnClearAll), NULL, this);
    m_buttonClearAll->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SaveTabGroupBaseDlg::OnClearAllUpdateUI), NULL, this);
    
}

SaveTabGroupBaseDlg::~SaveTabGroupBaseDlg()
{
    m_buttonCheckAll->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SaveTabGroupBaseDlg::OnCheckAll), NULL, this);
    m_buttonCheckAll->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SaveTabGroupBaseDlg::OnCheckAllUpdateUI), NULL, this);
    m_buttonClearAll->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SaveTabGroupBaseDlg::OnClearAll), NULL, this);
    m_buttonClearAll->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SaveTabGroupBaseDlg::OnClearAllUpdateUI), NULL, this);
    
}
