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

#include "wxcAboutDlg.h"


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

static bool bBitmapLoaded = false;


AboutDlgBase::AboutDlgBase(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);
        wxC3415InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(mainSizer);
    
    m_notebook1 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_notebook1->SetName(wxT("m_notebook1"));
    
    mainSizer->Add(m_notebook1, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_panel1 = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook1, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook1->AddPage(m_panel1, _("About"), false);
    
    wxBoxSizer* bSizer3 = new wxBoxSizer(wxVERTICAL);
    m_panel1->SetSizer(bSizer3);
    
    m_bitmap = new wxStaticBitmap(m_panel1, wxID_ANY, wxXmlResource::Get()->LoadBitmap(wxT("splashscreen")), wxDefaultPosition, wxDLG_UNIT(m_panel1, wxSize(-1, -1)), 0 );
    
    bSizer3->Add(m_bitmap, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_panel4 = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook1, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook1->AddPage(m_panel4, _("Credits"), false);
    
    wxBoxSizer* bSizer4 = new wxBoxSizer(wxVERTICAL);
    m_panel4->SetSizer(bSizer4);
    
    m_htmlWin3 = new wxHtmlWindow(m_panel4, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel4, wxSize(-1, -1)), wxHW_SCROLLBAR_AUTO);
    m_htmlWin3->SetPage(wxT("<b>wxHtmlWindow control!</b>"));
    
    bSizer4->Add(m_htmlWin3, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_panel3 = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook1, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook1->AddPage(m_panel3, _("License"), false);
    
    wxBoxSizer* bSizer5 = new wxBoxSizer(wxVERTICAL);
    m_panel3->SetSizer(bSizer5);
    
    m_textCtrlLicense = new wxTextCtrl(m_panel3, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel3, wxSize(-1, -1)), wxTE_RICH2|wxTE_READONLY|wxTE_MULTILINE|wxTE_DONTWRAP);
    
    bSizer5->Add(m_textCtrlLicense, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    wxStaticBoxSizer* sbSizer1 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);
    
    mainSizer->Add(sbSizer1, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer(0, 2, 0, 0);
    fgSizer1->SetFlexibleDirection( wxBOTH );
    fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    
    sbSizer1->Add(fgSizer1, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticTextHomePage = new wxStaticText(this, wxID_ANY, _("Home Page:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    fgSizer1->Add(m_staticTextHomePage, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_hyperlink1 = new wxHyperlinkCtrl(this, wxID_ANY, _("https://www.codelite.org"), wxT("https://www.codelite.org"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxHL_DEFAULT_STYLE);
    
    fgSizer1->Add(m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_staticText2 = new wxStaticText(this, wxID_ANY, _("CodeLite Forum:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    fgSizer1->Add(m_staticText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_hyperlink2 = new wxHyperlinkCtrl(this, wxID_ANY, _("https://forums.codelite.org"), wxT("https://forums.codelite.org"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxHL_DEFAULT_STYLE);
    
    fgSizer1->Add(m_hyperlink2, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_staticText3 = new wxStaticText(this, wxID_ANY, _("Version:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    fgSizer1->Add(m_staticText3, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
    
    m_staticTextInformation = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    fgSizer1->Add(m_staticTextInformation, 0, wxALL, WXC_FROM_DIP(5));
    
    m_bitmapPayPal = new wxStaticBitmap(this, wxID_ANY, wxXmlResource::Get()->LoadBitmap(wxT("paypal")), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0 );
    
    fgSizer1->Add(m_bitmapPayPal, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
    
    m_hyperlink3 = new wxHyperlinkCtrl(this, wxID_ANY, _("Support CodeLite"), wxT("https://codelite.org/support.php"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxHL_DEFAULT_STYLE);
    
    fgSizer1->Add(m_hyperlink3, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    wxBoxSizer* buttonSizer = new wxBoxSizer(wxHORIZONTAL);
    
    mainSizer->Add(buttonSizer, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));
    
    m_buttonOk = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonOk->SetDefault();
    m_buttonOk->SetFocus();
    
    buttonSizer->Add(m_buttonOk, 0, wxALL, WXC_FROM_DIP(5));
    
    
    #if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(m_notebook1)){
        wxPersistenceManager::Get().RegisterAndRestore(m_notebook1);
    } else {
        wxPersistenceManager::Get().Restore(m_notebook1);
    }
    #endif
    
    SetName(wxT("AboutDlgBase"));
    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_buttonOk->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AboutDlgBase::OnOK), NULL, this);
    
}

AboutDlgBase::~AboutDlgBase()
{
    m_buttonOk->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AboutDlgBase::OnOK), NULL, this);
    
}
