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

#include "wxCodeCompletionBoxBase.h"
#include "codelite_exports.h"


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

static bool bBitmapLoaded = false;


wxCodeCompletionBoxBase::wxCodeCompletionBoxBase(wxWindow* parent,long style)
    : wxPopupWindow(parent, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC9ED9AInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    mainSizer = new wxBoxSizer(wxHORIZONTAL);
    this->SetSizer(mainSizer);
    
    m_panelComposite = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    mainSizer->Add(m_panelComposite, 1, wxEXPAND, 5);
    
    boxSizer = new wxBoxSizer(wxHORIZONTAL);
    m_panelComposite->SetSizer(boxSizer);
    
    m_canvas = new wxPanel(m_panelComposite, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    boxSizer->Add(m_canvas, 1, wxALL|wxEXPAND, 0);
    
    SetName(wxT("wxCodeCompletionBoxBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
    // Connect events
    m_canvas->Connect(wxEVT_PAINT, wxPaintEventHandler(wxCodeCompletionBoxBase::OnPaint), NULL, this);
    m_canvas->Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(wxCodeCompletionBoxBase::OnEraseBackground), NULL, this);
    
}

wxCodeCompletionBoxBase::~wxCodeCompletionBoxBase()
{
    m_canvas->Disconnect(wxEVT_PAINT, wxPaintEventHandler(wxCodeCompletionBoxBase::OnPaint), NULL, this);
    m_canvas->Disconnect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(wxCodeCompletionBoxBase::OnEraseBackground), NULL, this);
    
}
