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

#include "plugindlgbase.h"


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

static bool bBitmapLoaded = false;


PluginMgrDlgBase::PluginMgrDlgBase(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);
        wxCEF4InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer1);
    
    wxBoxSizer* boxSizer16 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer1->Add(boxSizer16, 1, wxEXPAND, 5);
    
    wxBoxSizer* boxSizer12 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer16->Add(boxSizer12, 0, wxALL|wxEXPAND, 5);
    
    wxArrayString m_checkListPluginsListArr;
    m_checkListPluginsList = new wxCheckListBox(this, wxID_ANY, wxDefaultPosition, wxSize(200,-1), m_checkListPluginsListArr, wxLB_SINGLE);
    
    boxSizer12->Add(m_checkListPluginsList, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer14 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer16->Add(boxSizer14, 1, wxALL|wxEXPAND, 5);
    
    m_htmlWinDesc = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxSize(300,300), wxHW_SCROLLBAR_AUTO|wxBORDER_THEME);
    m_htmlWinDesc->SetPage(wxT("<b>wxHtmlWindow control!</b>"));
    
    boxSizer14->Add(m_htmlWinDesc, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer18 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer16->Add(boxSizer18, 0, wxALL|wxEXPAND, 5);
    
    m_button20 = new wxButton(this, wxID_ANY, _("Check &All"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer18->Add(m_button20, 0, wxALL|wxEXPAND, 5);
    
    m_button22 = new wxButton(this, wxID_ANY, _("Uncheck All"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer18->Add(m_button22, 0, wxALL|wxEXPAND, 5);
    
    m_stdBtnSizer26 = new wxStdDialogButtonSizer();
    
    bSizer1->Add(m_stdBtnSizer26, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
    
    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer26->AddButton(m_buttonOK);
    
    m_button30 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer26->AddButton(m_button30);
    m_stdBtnSizer26->Realize();
    
    SetName(wxT("PluginMgrDlgBase"));
    SetSizeHints(-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_checkListPluginsList->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(PluginMgrDlgBase::OnItemSelected), NULL, this);
    m_button20->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnCheckAll), NULL, this);
    m_button20->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(PluginMgrDlgBase::OnCheckAllUI), NULL, this);
    m_button22->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnUncheckAll), NULL, this);
    m_button22->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(PluginMgrDlgBase::OnUncheckAllUI), NULL, this);
    m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnButtonOK), NULL, this);
    
}

PluginMgrDlgBase::~PluginMgrDlgBase()
{
    m_checkListPluginsList->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(PluginMgrDlgBase::OnItemSelected), NULL, this);
    m_button20->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnCheckAll), NULL, this);
    m_button20->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(PluginMgrDlgBase::OnCheckAllUI), NULL, this);
    m_button22->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnUncheckAll), NULL, this);
    m_button22->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(PluginMgrDlgBase::OnUncheckAllUI), NULL, this);
    m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnButtonOK), NULL, this);
    
}
