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

#include "wxFlatButtonBase.h"


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

static bool bBitmapLoaded = false;


wxFlatButtonBase::wxFlatButtonBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC9ED9InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    SetName(wxT("wxFlatButtonBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
    // Connect events
    this->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(wxFlatButtonBase::OnEnterWindow), NULL, this);
    this->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxFlatButtonBase::OnLeaveWindow), NULL, this);
    this->Connect(wxEVT_PAINT, wxPaintEventHandler(wxFlatButtonBase::OnPaint), NULL, this);
    this->Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(wxFlatButtonBase::OnEraseBackground), NULL, this);
    this->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(wxFlatButtonBase::OnLeftDown), NULL, this);
    this->Connect(wxEVT_SIZE, wxSizeEventHandler(wxFlatButtonBase::OnSize), NULL, this);
    this->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(wxFlatButtonBase::OnLeftDClick), NULL, this);
    this->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(wxFlatButtonBase::OnLeftUp), NULL, this);
    
}

wxFlatButtonBase::~wxFlatButtonBase()
{
    this->Disconnect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(wxFlatButtonBase::OnEnterWindow), NULL, this);
    this->Disconnect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxFlatButtonBase::OnLeaveWindow), NULL, this);
    this->Disconnect(wxEVT_PAINT, wxPaintEventHandler(wxFlatButtonBase::OnPaint), NULL, this);
    this->Disconnect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(wxFlatButtonBase::OnEraseBackground), NULL, this);
    this->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(wxFlatButtonBase::OnLeftDown), NULL, this);
    this->Disconnect(wxEVT_SIZE, wxSizeEventHandler(wxFlatButtonBase::OnSize), NULL, this);
    this->Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(wxFlatButtonBase::OnLeftDClick), NULL, this);
    this->Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(wxFlatButtonBase::OnLeftUp), NULL, this);
    
}

wxFlatButtonBarBase::wxFlatButtonBarBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC9ED9InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    m_mainSizer = new wxFlexGridSizer(0, 2, 0, 0);
    m_mainSizer->SetFlexibleDirection( wxBOTH );
    m_mainSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    this->SetSizer(m_mainSizer);
    
    m_mainSizer->Add(0, 0, 1, wxALL, 5);
    
    SetName(wxT("wxFlatButtonBarBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
    // Connect events
    this->Connect(wxEVT_PAINT, wxPaintEventHandler(wxFlatButtonBarBase::OnPaint), NULL, this);
    this->Connect(wxEVT_SIZE, wxSizeEventHandler(wxFlatButtonBarBase::OnSize), NULL, this);
    
}

wxFlatButtonBarBase::~wxFlatButtonBarBase()
{
    this->Disconnect(wxEVT_PAINT, wxPaintEventHandler(wxFlatButtonBarBase::OnPaint), NULL, this);
    this->Disconnect(wxEVT_SIZE, wxSizeEventHandler(wxFlatButtonBarBase::OnSize), NULL, this);
    
}
