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

#include "clAboutDialogBase.h"

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

namespace
{
// return the wxBORDER_SIMPLE that matches the current application theme
wxBorder get_border_simple_theme_aware_bit()
{
#if wxVERSION_NUMBER >= 3300 && defined(__WXMSW__)
    return wxSystemSettings::GetAppearance().IsDark() ? wxBORDER_SIMPLE : wxBORDER_STATIC;
#else
    return wxBORDER_DEFAULT;
#endif
} // DoGetBorderSimpleBit
bool bBitmapLoaded = false;
} // namespace

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

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

    m_notebook8 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxBK_DEFAULT);
    m_notebook8->SetName(wxT("m_notebook8"));

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

    m_panelAbout =
        new wxPanel(m_notebook8, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook8, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook8->AddPage(m_panelAbout, _("About"), true);

    wxBoxSizer* boxSizer16 = new wxBoxSizer(wxVERTICAL);
    m_panelAbout->SetSizer(boxSizer16);

    m_staticTextTitle = new wxStaticText(m_panelAbout, wxID_ANY,
                                         _("CodeLite, a free, open source, C/C++/Rust/Python/PHP and JavaScript IDE"),
                                         wxDefaultPosition, wxDLG_UNIT(m_panelAbout, wxSize(-1, -1)), 0);
    wxFont m_staticTextTitleFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticTextTitleFont.SetStyle(wxFONTSTYLE_ITALIC);
    m_staticTextTitle->SetFont(m_staticTextTitleFont);

    boxSizer16->Add(m_staticTextTitle, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

    m_panel22 = new wxPanel(m_panelAbout, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelAbout, wxSize(-1, -1)),
                            wxTAB_TRAVERSAL);

    boxSizer16->Add(m_panel22, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer26 = new wxBoxSizer(wxVERTICAL);
    m_panel22->SetSizer(boxSizer26);

    wxFlexGridSizer* flexGridSizer32 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer32->SetFlexibleDirection(wxBOTH);
    flexGridSizer32->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);

    boxSizer26->Add(flexGridSizer32, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText34 = new wxStaticText(m_panel22, wxID_ANY, _("Author:"), wxDefaultPosition,
                                      wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0);
    wxFont m_staticText34Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText34Font.SetStyle(wxFONTSTYLE_ITALIC);
    m_staticText34Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText34->SetFont(m_staticText34Font);

    flexGridSizer32->Add(m_staticText34, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_staticTextSubtitle = new wxStaticText(m_panel22, wxID_ANY, _("2007 - 2023, by Eran Ifrah"), wxDefaultPosition,
                                            wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0);

    flexGridSizer32->Add(m_staticTextSubtitle, 0, wxLEFT | wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_staticText36 = new wxStaticText(m_panel22, wxID_ANY, _("Version:"), wxDefaultPosition,
                                      wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0);
    wxFont m_staticText36Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText36Font.SetStyle(wxFONTSTYLE_ITALIC);
    m_staticText36Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText36->SetFont(m_staticText36Font);

    flexGridSizer32->Add(m_staticText36, 0, wxRIGHT | wxALIGN_RIGHT, WXC_FROM_DIP(5));

    m_staticTextVersion =
        new wxStaticText(m_panel22, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0);

    flexGridSizer32->Add(m_staticTextVersion, 0, wxLEFT | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText40 = new wxStaticText(m_panel22, wxID_ANY, _("Home Page:"), wxDefaultPosition,
                                      wxDLG_UNIT(m_panel22, wxSize(-1, -1)), 0);
    wxFont m_staticText40Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText40Font.SetStyle(wxFONTSTYLE_ITALIC);
    m_staticText40Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText40->SetFont(m_staticText40Font);

    flexGridSizer32->Add(m_staticText40, 0, wxRIGHT | wxALIGN_RIGHT, WXC_FROM_DIP(5));

    m_hyperLink44 = new wxHyperlinkCtrl(m_panel22, wxID_ANY, _("CodeLite IDE"), wxT("https://codelite.org"),
                                        wxDefaultPosition, wxDLG_UNIT(m_panel22, wxSize(-1, -1)), wxHL_DEFAULT_STYLE);
    m_hyperLink44->SetNormalColour(wxColour(wxT("#0000FF")));
    m_hyperLink44->SetHoverColour(wxColour(wxT("#0000FF")));
    m_hyperLink44->SetVisitedColour(wxColour(wxT("#FF0000")));

    flexGridSizer32->Add(m_hyperLink44, 0, wxLEFT, WXC_FROM_DIP(5));

    m_paneLicense =
        new wxPanel(m_notebook8, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook8, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook8->AddPage(m_paneLicense, _("License"), false);

    wxBoxSizer* boxSizer18 = new wxBoxSizer(wxVERTICAL);
    m_paneLicense->SetSizer(boxSizer18);

    m_stcLicense =
        new clThemedSTC(m_paneLicense, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_paneLicense, wxSize(300, 200)),
                        wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());
    // Configure the fold margin
    m_stcLicense->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_stcLicense->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_stcLicense->SetMarginSensitive(4, true);
    m_stcLicense->SetMarginWidth(4, 0);

    // Configure the tracker margin
    m_stcLicense->SetMarginWidth(1, 0);

    // Configure the symbol margin
    m_stcLicense->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
    m_stcLicense->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
    m_stcLicense->SetMarginWidth(2, 0);
    m_stcLicense->SetMarginSensitive(2, true);

    // Configure the line numbers margin
    m_stcLicense->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcLicense->SetMarginWidth(0, 0);

    // Configure the line symbol margin
    m_stcLicense->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcLicense->SetMarginMask(3, 0);
    m_stcLicense->SetMarginWidth(3, 0);
    // Select the lexer
    m_stcLicense->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcLicense->StyleClearAll();
    m_stcLicense->SetWrapMode(2);
    m_stcLicense->SetIndentationGuides(0);
    m_stcLicense->SetKeyWords(0, wxT(""));
    m_stcLicense->SetKeyWords(1, wxT(""));
    m_stcLicense->SetKeyWords(2, wxT(""));
    m_stcLicense->SetKeyWords(3, wxT(""));
    m_stcLicense->SetKeyWords(4, wxT(""));

    boxSizer18->Add(m_stcLicense, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panelCredits =
        new wxPanel(m_notebook8, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook8, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook8->AddPage(m_panelCredits, _("Credits"), false);

    wxBoxSizer* boxSizer20 = new wxBoxSizer(wxVERTICAL);
    m_panelCredits->SetSizer(boxSizer20);

    m_stcCredits =
        new clThemedSTC(m_panelCredits, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelCredits, wxSize(-1, -1)),
                        wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());
    // Configure the fold margin
    m_stcCredits->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_stcCredits->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_stcCredits->SetMarginSensitive(4, true);
    m_stcCredits->SetMarginWidth(4, 0);

    // Configure the tracker margin
    m_stcCredits->SetMarginWidth(1, 0);

    // Configure the symbol margin
    m_stcCredits->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
    m_stcCredits->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
    m_stcCredits->SetMarginWidth(2, 0);
    m_stcCredits->SetMarginSensitive(2, true);

    // Configure the line numbers margin
    m_stcCredits->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcCredits->SetMarginWidth(0, 0);

    // Configure the line symbol margin
    m_stcCredits->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcCredits->SetMarginMask(3, 0);
    m_stcCredits->SetMarginWidth(3, 0);
    // Select the lexer
    m_stcCredits->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcCredits->StyleClearAll();
    m_stcCredits->SetWrapMode(2);
    m_stcCredits->SetIndentationGuides(0);
    m_stcCredits->SetKeyWords(0, wxT(""));
    m_stcCredits->SetKeyWords(1, wxT(""));
    m_stcCredits->SetKeyWords(2, wxT(""));
    m_stcCredits->SetKeyWords(3, wxT(""));
    m_stcCredits->SetKeyWords(4, wxT(""));

    boxSizer20->Add(m_stcCredits, 1, wxEXPAND, WXC_FROM_DIP(5));

    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_stdBtnSizer4->Realize();

#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(m_notebook8)) {
        wxPersistenceManager::Get().RegisterAndRestore(m_notebook8);
    } else {
        wxPersistenceManager::Get().Restore(m_notebook8);
    }
#endif

    SetName(wxT("clAboutDialogBase"));
    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);
    }
}

clAboutDialogBase::~clAboutDialogBase() {}
