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

#include "ToolBarUI.h"

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

static bool bBitmapLoaded = false;

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

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

    m_dvListCtrlItems = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(250, 200)),
                                               wxDV_NO_HEADER | wxDV_SINGLE | wxTRANSPARENT_WINDOW);

    boxSizer2->Add(m_dvListCtrlItems, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrlItems->AppendToggleColumn(_("?"), wxDATAVIEW_CELL_ACTIVATABLE, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                          wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlItems->AppendIconTextColumn(_("Item"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                            wxDATAVIEW_COL_RESIZABLE);
    m_stdBtnSizer4 = new wxStdDialogButtonSizer();

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

    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("clCustomiseToolBarBaseDlg"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    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_button6->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &clCustomiseToolBarBaseDlg::OnOK, this);
}

clCustomiseToolBarBaseDlg::~clCustomiseToolBarBaseDlg()
{
    m_button6->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &clCustomiseToolBarBaseDlg::OnOK, this);
}
