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

#include "wxcrafter.h"

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

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

TextEditorBaseClass::TextEditorBaseClass(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);
        wxCA63InitBitmapResources();
        bBitmapLoaded = true;
    }
    this->SetToolTip(_("Text Editor"));

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

    m_textCtrl = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                wxTE_RICH2 | wxTE_PROCESS_ENTER);
#if wxVERSION_NUMBER >= 3000
    m_textCtrl->SetHint(wxT(""));
#endif

    boxSizer4->Add(m_textCtrl, 0, wxALL, WXC_FROM_DIP(1));

    SetName(wxT("TextEditorBaseClass"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    // Connect events
    m_textCtrl->Bind(wxEVT_COMMAND_TEXT_ENTER, &TextEditorBaseClass::OnTextEnter, this);
    m_textCtrl->Bind(wxEVT_KILL_FOCUS, &TextEditorBaseClass::OnKillFocus, this);
    m_textCtrl->Bind(wxEVT_KEY_DOWN, &TextEditorBaseClass::OnKeyDown, this);
}

TextEditorBaseClass::~TextEditorBaseClass()
{
    m_textCtrl->Unbind(wxEVT_COMMAND_TEXT_ENTER, &TextEditorBaseClass::OnTextEnter, this);
    m_textCtrl->Unbind(wxEVT_KILL_FOCUS, &TextEditorBaseClass::OnKillFocus, this);
    m_textCtrl->Unbind(wxEVT_KEY_DOWN, &TextEditorBaseClass::OnKeyDown, this);
}

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

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

    wxStaticBoxSizer* statixBoxSizer36 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);

    boxSizer32->Add(statixBoxSizer36, 0, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    m_checkBoxPreDefinedFont = new wxCheckBox(this, wxID_ANY, _("Use pre-defined font"), wxDefaultPosition,
                                              wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxPreDefinedFont->SetValue(false);

    statixBoxSizer36->Add(m_checkBoxPreDefinedFont, 0, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    wxArrayString m_choiceSystemFontsArr;
    m_choiceSystemFontsArr.Add(_("wxSYS_DEFAULT_GUI_FONT"));
    m_choiceSystemFontsArr.Add(_("wxSYS_OEM_FIXED_FONT"));
    m_choiceSystemFontsArr.Add(_("wxSYS_ANSI_FIXED_FONT"));
    m_choiceSystemFontsArr.Add(_("wxSYS_ANSI_VAR_FONT"));
    m_choiceSystemFontsArr.Add(_("wxSYS_SYSTEM_FONT"));
    m_choiceSystemFontsArr.Add(_("wxSYS_DEVICE_DEFAULT_FONT"));
    m_choiceSystemFontsArr.Add(_("wxSYS_SYSTEM_FIXED_FONT"));
    m_choiceSystemFonts =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceSystemFontsArr, 0);
    m_choiceSystemFonts->SetSelection(0);

    statixBoxSizer36->Add(m_choiceSystemFonts, 0, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer43 = new wxBoxSizer(wxHORIZONTAL);

    statixBoxSizer36->Add(boxSizer43, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, WXC_FROM_DIP(5));

    m_checkBoxBold = new wxCheckBox(this, wxID_ANY, _("Bold"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxBold->SetValue(false);

    boxSizer43->Add(m_checkBoxBold, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxItalic =
        new wxCheckBox(this, wxID_ANY, _("Italic"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxItalic->SetValue(false);

    boxSizer43->Add(m_checkBoxItalic, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxUnderlined =
        new wxCheckBox(this, wxID_ANY, _("Underlined"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxUnderlined->SetValue(false);

    boxSizer43->Add(m_checkBoxUnderlined, 0, wxALL, WXC_FROM_DIP(5));

    wxStaticBoxSizer* statixBoxSizer37 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);

    boxSizer32->Add(statixBoxSizer37, 0, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    m_checkBoxCustomFont =
        new wxCheckBox(this, wxID_ANY, _("Custom font"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxCustomFont->SetValue(false);

    statixBoxSizer37->Add(m_checkBoxCustomFont, 0, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    m_fontPicker = new wxFontPickerCtrl(this, wxID_ANY, wxNullFont, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                        wxFNTP_DEFAULT_STYLE);

    statixBoxSizer37->Add(m_fontPicker, 0, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    wxStaticBoxSizer* statixBoxSizer47 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);

    boxSizer32->Add(statixBoxSizer47, 0, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    m_staticTextSample =
        new wxStaticText(this, wxID_ANY, _("Sample Text"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    statixBoxSizer47->Add(m_staticTextSample, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, WXC_FROM_DIP(5));

    boxSizer32->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer35 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer32->Add(boxSizer35, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, WXC_FROM_DIP(5));

    m_button34 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button34->SetDefault();

    boxSizer35->Add(m_button34, 0, wxALL, WXC_FROM_DIP(5));

    m_button33 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer35->Add(m_button33, 0, wxALL, WXC_FROM_DIP(5));

    SetName(wxT("FontPickerDlgBaseClass"));
    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_checkBoxPreDefinedFont->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FontPickerDlgBaseClass::OnUsePreDefinedFont, this);
    m_choiceSystemFonts->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &FontPickerDlgBaseClass::OnSystemFontSelected, this);
    m_choiceSystemFonts->Bind(wxEVT_UPDATE_UI, &FontPickerDlgBaseClass::OnUsePreDefinedFontUI, this);
    m_checkBoxBold->Bind(wxEVT_UPDATE_UI, &FontPickerDlgBaseClass::OnUsePreDefinedFontUI, this);
    m_checkBoxBold->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FontPickerDlgBaseClass::OnUsePreDefinedFont, this);
    m_checkBoxItalic->Bind(wxEVT_UPDATE_UI, &FontPickerDlgBaseClass::OnUsePreDefinedFontUI, this);
    m_checkBoxItalic->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FontPickerDlgBaseClass::OnUsePreDefinedFont, this);
    m_checkBoxUnderlined->Bind(wxEVT_UPDATE_UI, &FontPickerDlgBaseClass::OnUsePreDefinedFontUI, this);
    m_checkBoxUnderlined->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FontPickerDlgBaseClass::OnUsePreDefinedFont, this);
    m_checkBoxCustomFont->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FontPickerDlgBaseClass::OnUseCustomFont, this);
    m_fontPicker->Bind(wxEVT_UPDATE_UI, &FontPickerDlgBaseClass::OnUseCustomFontUI, this);
    m_fontPicker->Bind(wxEVT_COMMAND_FONTPICKER_CHANGED, &FontPickerDlgBaseClass::OnFontSelected, this);
}

FontPickerDlgBaseClass::~FontPickerDlgBaseClass()
{
    m_checkBoxPreDefinedFont->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FontPickerDlgBaseClass::OnUsePreDefinedFont,
                                     this);
    m_choiceSystemFonts->Unbind(wxEVT_COMMAND_CHOICE_SELECTED, &FontPickerDlgBaseClass::OnSystemFontSelected, this);
    m_choiceSystemFonts->Unbind(wxEVT_UPDATE_UI, &FontPickerDlgBaseClass::OnUsePreDefinedFontUI, this);
    m_checkBoxBold->Unbind(wxEVT_UPDATE_UI, &FontPickerDlgBaseClass::OnUsePreDefinedFontUI, this);
    m_checkBoxBold->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FontPickerDlgBaseClass::OnUsePreDefinedFont, this);
    m_checkBoxItalic->Unbind(wxEVT_UPDATE_UI, &FontPickerDlgBaseClass::OnUsePreDefinedFontUI, this);
    m_checkBoxItalic->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FontPickerDlgBaseClass::OnUsePreDefinedFont, this);
    m_checkBoxUnderlined->Unbind(wxEVT_UPDATE_UI, &FontPickerDlgBaseClass::OnUsePreDefinedFontUI, this);
    m_checkBoxUnderlined->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FontPickerDlgBaseClass::OnUsePreDefinedFont, this);
    m_checkBoxCustomFont->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FontPickerDlgBaseClass::OnUseCustomFont, this);
    m_fontPicker->Unbind(wxEVT_UPDATE_UI, &FontPickerDlgBaseClass::OnUseCustomFontUI, this);
    m_fontPicker->Unbind(wxEVT_COMMAND_FONTPICKER_CHANGED, &FontPickerDlgBaseClass::OnFontSelected, this);
}

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

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

    m_panel70 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(300, 150)),
                            wxTAB_TRAVERSAL | wxBORDER_THEME);
    m_panel70->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
    m_panel70->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));

    boxSizer64->Add(m_panel70, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer71 = new wxBoxSizer(wxHORIZONTAL);
    m_panel70->SetSizer(boxSizer71);

    m_staticBitmap75 = new wxStaticBitmap(m_panel70, wxID_ANY, wxXmlResource::Get()->LoadBitmap(wxT("info")),
                                          wxDefaultPosition, wxDLG_UNIT(m_panel70, wxSize(-1, -1)), 0);

    boxSizer71->Add(m_staticBitmap75, 0, wxALIGN_CENTER_VERTICAL | wxALL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer74 = new wxBoxSizer(wxVERTICAL);

    boxSizer71->Add(boxSizer74, 0, wxALL, WXC_FROM_DIP(5));

    m_title =
        new wxStaticText(m_panel70, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel70, wxSize(-1, -1)), 0);
    wxFont m_titleFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_titleFont.SetWeight(wxFONTWEIGHT_BOLD);
    m_title->SetFont(m_titleFont);

    boxSizer74->Add(m_title, 0, wxALIGN_LEFT | wxALL, WXC_FROM_DIP(5));

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

    boxSizer74->Add(m_message, 0, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    m_checkBoxDontAnnoy = new wxCheckBox(this, wxID_ANY, _("Don't show this message again"), wxDefaultPosition,
                                         wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxDontAnnoy->SetValue(false);
    m_checkBoxDontAnnoy->SetToolTip(_("Check this to prevent this dialog from showing up again"));

    boxSizer64->Add(m_checkBoxDontAnnoy, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_stdBtnSizer335 = new wxStdDialogButtonSizer();

    boxSizer64->Add(m_stdBtnSizer335, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button337 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button337->SetDefault();
    m_stdBtnSizer335->AddButton(m_button337);

    m_button339 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer335->AddButton(m_button339);
    m_stdBtnSizer335->Realize();

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

MessageDlgBaseClass::~MessageDlgBaseClass() {}

DefineCustomControlWizardBaseClass::DefineCustomControlWizardBaseClass(wxWindow* parent, wxWindowID id,
                                                                       const wxString& title, const wxBitmap& bmp,
                                                                       const wxPoint& pos, long style)
{
    if(!bBitmapLoaded) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCA63InitBitmapResources();
        bBitmapLoaded = true;
    }
    Create(parent, id, title, wxXmlResource::Get()->LoadBitmap(wxT("custom-control")), pos, style);

    m_wizardPageGeneral = new wxWizardPageSimple(this, NULL, NULL, wxNullBitmap);
    m_pages.push_back(m_wizardPageGeneral);

    wxBoxSizer* boxSizer84 = new wxBoxSizer(wxVERTICAL);
    m_wizardPageGeneral->SetSizer(boxSizer84);

    m_staticText88 = new wxStaticText(m_wizardPageGeneral, wxID_ANY, _("Set the class name"), wxDefaultPosition,
                                      wxDLG_UNIT(m_wizardPageGeneral, wxSize(-1, -1)), 0);
    wxFont m_staticText88Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText88Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText88->SetFont(m_staticText88Font);

    boxSizer84->Add(m_staticText88, 0, wxALL | wxALIGN_LEFT, WXC_FROM_DIP(5));

    m_staticLine265 = new wxStaticLine(m_wizardPageGeneral, wxID_ANY, wxDefaultPosition,
                                       wxDLG_UNIT(m_wizardPageGeneral, wxSize(-1, -1)), wxLI_HORIZONTAL);

    boxSizer84->Add(m_staticLine265, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    boxSizer84->Add(flexGridSizer85, 1, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    m_staticText103 = new wxStaticText(m_wizardPageGeneral, wxID_ANY, _("Class:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_wizardPageGeneral, wxSize(-1, -1)), 0);

    flexGridSizer85->Add(m_staticText103, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, WXC_FROM_DIP(5));

    m_textClassName = new wxTextCtrl(m_wizardPageGeneral, wxID_ANY, wxT(""), wxDefaultPosition,
                                     wxDLG_UNIT(m_wizardPageGeneral, wxSize(-1, -1)), 0);
#ifdef __WXMSW__
    // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to
    // wxFONTFAMILY_TELETYPE
    wxFont m_textClassNameFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textClassNameFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_textClassNameFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textClassNameFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_textClassName->SetFont(m_textClassNameFont);
    m_textClassName->SetToolTip(_("Set the class name"));
#if wxVERSION_NUMBER >= 3000
    m_textClassName->SetHint(wxT(""));
#endif

    flexGridSizer85->Add(m_textClassName, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText109 = new wxStaticText(m_wizardPageGeneral, wxID_ANY, _("XRC Preview class:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_wizardPageGeneral, wxSize(-1, -1)), 0);
    m_staticText109->SetToolTip(_("Set here a standard wxWidgets control for preview purposes"));

    flexGridSizer85->Add(m_staticText109, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, WXC_FROM_DIP(5));

    m_textCtrlXRCPreviewClass = new wxTextCtrl(m_wizardPageGeneral, wxID_ANY, wxT(""), wxDefaultPosition,
                                               wxDLG_UNIT(m_wizardPageGeneral, wxSize(-1, -1)), 0);
#ifdef __WXMSW__
    // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to
    // wxFONTFAMILY_TELETYPE
    wxFont m_textCtrlXRCPreviewClassFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlXRCPreviewClassFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_textCtrlXRCPreviewClassFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlXRCPreviewClassFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_textCtrlXRCPreviewClass->SetFont(m_textCtrlXRCPreviewClassFont);
    m_textCtrlXRCPreviewClass->SetToolTip(_("Set here a standard wxWidgets control for preview purposes (optional)"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlXRCPreviewClass->SetHint(wxT(""));
#endif

    flexGridSizer85->Add(m_textCtrlXRCPreviewClass, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_wizardPageHeader = new wxWizardPageSimple(this, NULL, NULL, wxNullBitmap);
    m_pages.push_back(m_wizardPageHeader);

    wxBoxSizer* boxSizer89 = new wxBoxSizer(wxVERTICAL);
    m_wizardPageHeader->SetSizer(boxSizer89);

    m_staticText91 = new wxStaticText(m_wizardPageHeader, wxID_ANY, _("Additional include file"), wxDefaultPosition,
                                      wxDLG_UNIT(m_wizardPageHeader, wxSize(-1, -1)), 0);
    wxFont m_staticText91Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText91Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText91->SetFont(m_staticText91Font);

    boxSizer89->Add(m_staticText91, 0, wxALL | wxALIGN_LEFT, WXC_FROM_DIP(5));

    m_staticLine267 = new wxStaticLine(m_wizardPageHeader, wxID_ANY, wxDefaultPosition,
                                       wxDLG_UNIT(m_wizardPageHeader, wxSize(-1, -1)), wxLI_HORIZONTAL);

    boxSizer89->Add(m_staticLine267, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    boxSizer89->Add(flexGridSizer90, 1, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    m_staticText92 = new wxStaticText(m_wizardPageHeader, wxID_ANY, _("Include file:"), wxDefaultPosition,
                                      wxDLG_UNIT(m_wizardPageHeader, wxSize(-1, -1)), 0);

    flexGridSizer90->Add(m_staticText92, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, WXC_FROM_DIP(5));

    m_textCtrlIncludeLine = new wxTextCtrl(m_wizardPageHeader, wxID_ANY, wxT(""), wxDefaultPosition,
                                           wxDLG_UNIT(m_wizardPageHeader, wxSize(-1, -1)), 0);
#ifdef __WXMSW__
    // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to
    // wxFONTFAMILY_TELETYPE
    wxFont m_textCtrlIncludeLineFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlIncludeLineFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_textCtrlIncludeLineFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlIncludeLineFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_textCtrlIncludeLine->SetFont(m_textCtrlIncludeLineFont);
    m_textCtrlIncludeLine->SetToolTip(
        _("Place here the include file that this custom control requires\ne.g. #include <MyCustomControl.hpp>"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlIncludeLine->SetHint(wxT(""));
#endif

    flexGridSizer90->Add(m_textCtrlIncludeLine, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_wizardPageCpp = new wxWizardPageSimple(this, NULL, NULL, wxNullBitmap);
    m_pages.push_back(m_wizardPageCpp);

    wxBoxSizer* boxSizer98 = new wxBoxSizer(wxVERTICAL);
    m_wizardPageCpp->SetSizer(boxSizer98);

    m_staticText99 = new wxStaticText(m_wizardPageCpp, wxID_ANY, _("Implementation file content"), wxDefaultPosition,
                                      wxDLG_UNIT(m_wizardPageCpp, wxSize(-1, -1)), 0);
    wxFont m_staticText99Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText99Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText99->SetFont(m_staticText99Font);

    boxSizer98->Add(m_staticText99, 0, wxALL | wxALIGN_LEFT, WXC_FROM_DIP(5));

    m_staticLine269 = new wxStaticLine(m_wizardPageCpp, wxID_ANY, wxDefaultPosition,
                                       wxDLG_UNIT(m_wizardPageCpp, wxSize(-1, -1)), wxLI_HORIZONTAL);

    boxSizer98->Add(m_staticLine269, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_panel107 = new wxPanel(m_wizardPageCpp, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_wizardPageCpp, wxSize(-1, -1)),
                             wxTAB_TRAVERSAL | get_border_simple_theme_aware_bit());
    m_panel107->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));

    boxSizer98->Add(m_panel107, 0, wxEXPAND | wxALL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer108 = new wxBoxSizer(wxVERTICAL);
    m_panel107->SetSizer(boxSizer108);

    m_staticText106 =
        new wxStaticText(m_panel107, wxID_ANY,
                         _("You may use here the following macros (the macros expands to the value defined in the "
                           "designer):\n\n$parent - expands to the custom control parent name\n$name - expands to the "
                           "C++ member name\n$id - the control ID\n\nExample:\n$name = new MyControl($parent, $id)"),
                         wxDefaultPosition, wxDLG_UNIT(m_panel107, wxSize(-1, -1)), 0);
    m_staticText106->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
    m_staticText106->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));

    boxSizer108->Add(m_staticText106, 0, wxALL, WXC_FROM_DIP(5));

    m_textCtrlInstantiationLine = new wxTextCtrl(m_wizardPageCpp, wxID_ANY, wxT(""), wxDefaultPosition,
                                                 wxDLG_UNIT(m_wizardPageCpp, wxSize(400, -1)),
                                                 wxTE_RICH2 | wxTE_PROCESS_TAB | wxTE_PROCESS_ENTER | wxTE_MULTILINE);
#ifdef __WXMSW__
    // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to
    // wxFONTFAMILY_TELETYPE
    wxFont m_textCtrlInstantiationLineFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlInstantiationLineFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_textCtrlInstantiationLineFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlInstantiationLineFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_textCtrlInstantiationLine->SetFont(m_textCtrlInstantiationLineFont);
    m_textCtrlInstantiationLine->SetToolTip(_("Place the instantation code here\ne.g. $(name) = new MyControl(this);"));

    boxSizer98->Add(m_textCtrlInstantiationLine, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_wizardPageEvents = new wxWizardPageSimple(this, NULL, NULL, wxNullBitmap);
    m_pages.push_back(m_wizardPageEvents);
    if(m_pages.size() > 1) {
        for(size_t i = 1; i < m_pages.size(); i++) {
            wxWizardPageSimple::Chain(m_pages.at(i - 1), m_pages.at(i));
        }
    }
    GetPageAreaSizer()->Add(m_pages.at(0));

    wxBoxSizer* boxSizer275 = new wxBoxSizer(wxVERTICAL);
    m_wizardPageEvents->SetSizer(boxSizer275);

    m_staticText277 = new wxStaticText(m_wizardPageEvents, wxID_ANY, _("Custom Events"), wxDefaultPosition,
                                       wxDLG_UNIT(m_wizardPageEvents, wxSize(-1, -1)), 0);
    wxFont m_staticText277Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText277Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText277->SetFont(m_staticText277Font);

    boxSizer275->Add(m_staticText277, 0, wxALL, WXC_FROM_DIP(5));

    m_staticLine279 = new wxStaticLine(m_wizardPageEvents, wxID_ANY, wxDefaultPosition,
                                       wxDLG_UNIT(m_wizardPageEvents, wxSize(-1, -1)), wxLI_HORIZONTAL);

    boxSizer275->Add(m_staticLine279, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer283 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer275->Add(boxSizer283, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrlEvents =
        new wxDataViewListCtrl(m_wizardPageEvents, wxID_ANY, wxDefaultPosition,
                               wxDLG_UNIT(m_wizardPageEvents, wxSize(-1, -1)), wxDV_ROW_LINES | wxDV_SINGLE);
    m_dvListCtrlEvents->SetToolTip(_("Define here custom events of the control\ne.g. 'Event Type' can be something "
                                     "like wxEVT_MY_BUTTON_CLICKED\nand 'Event Class' can be wxCommandEvent"));

    boxSizer283->Add(m_dvListCtrlEvents, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrlEvents->AppendTextColumn(_("Event Type"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(200), wxALIGN_LEFT,
                                         wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlEvents->AppendTextColumn(_("Event Class"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(200), wxALIGN_LEFT,
                                         wxDATAVIEW_COL_RESIZABLE);
    wxBoxSizer* boxSizer285 = new wxBoxSizer(wxVERTICAL);

    boxSizer283->Add(boxSizer285, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_button287 = new wxButton(m_wizardPageEvents, wxID_NEW, _("&New..."), wxDefaultPosition,
                               wxDLG_UNIT(m_wizardPageEvents, wxSize(-1, -1)), 0);

    boxSizer285->Add(m_button287, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_button289 = new wxButton(m_wizardPageEvents, wxID_DELETE, _("Delete"), wxDefaultPosition,
                               wxDLG_UNIT(m_wizardPageEvents, wxSize(-1, -1)), 0);

    boxSizer285->Add(m_button289, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    SetName(wxT("DefineCustomControlWizardBaseClass"));
    SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
    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
    this->Bind(wxEVT_WIZARD_PAGE_CHANGING, &DefineCustomControlWizardBaseClass::OnPageChanging, this);
    m_button287->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DefineCustomControlWizardBaseClass::OnNewEvent, this);
    m_button289->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DefineCustomControlWizardBaseClass::OnDeleteEvent, this);
    m_button289->Bind(wxEVT_UPDATE_UI, &DefineCustomControlWizardBaseClass::OnDeleteEventUI, this);
}

DefineCustomControlWizardBaseClass::~DefineCustomControlWizardBaseClass()
{
    this->Unbind(wxEVT_WIZARD_PAGE_CHANGING, &DefineCustomControlWizardBaseClass::OnPageChanging, this);
    m_button287->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &DefineCustomControlWizardBaseClass::OnNewEvent, this);
    m_button289->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &DefineCustomControlWizardBaseClass::OnDeleteEvent, this);
    m_button289->Unbind(wxEVT_UPDATE_UI, &DefineCustomControlWizardBaseClass::OnDeleteEventUI, this);
}

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

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

    wxArrayString m_choiceControlsArr;
    m_choiceControls =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceControlsArr, 0);

    boxSizer112->Add(m_choiceControls, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    boxSizer112->Add(m_notebook, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_panel229 =
        new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook->AddPage(m_panel229, _("General"), true);

    wxFlexGridSizer* flexGridSizer117 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer117->SetFlexibleDirection(wxBOTH);
    flexGridSizer117->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer117->AddGrowableCol(1);
    flexGridSizer117->AddGrowableRow(2);
    m_panel229->SetSizer(flexGridSizer117);

    m_staticText120 = new wxStaticText(m_panel229, wxID_ANY, _("XRC Preview class:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel229, wxSize(-1, -1)), 0);

    flexGridSizer117->Add(m_staticText120, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, WXC_FROM_DIP(5));

    m_textCtrlXRCClass =
        new wxTextCtrl(m_panel229, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel229, wxSize(-1, -1)), 0);
#ifdef __WXMSW__
    // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to
    // wxFONTFAMILY_TELETYPE
    wxFont m_textCtrlXRCClassFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlXRCClassFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_textCtrlXRCClassFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlXRCClassFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_textCtrlXRCClass->SetFont(m_textCtrlXRCClassFont);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlXRCClass->SetHint(wxT(""));
#endif

    flexGridSizer117->Add(m_textCtrlXRCClass, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText122 = new wxStaticText(m_panel229, wxID_ANY, _("Include file:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel229, wxSize(-1, -1)), 0);

    flexGridSizer117->Add(m_staticText122, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, WXC_FROM_DIP(5));

    m_textCtrlIncludeFile =
        new wxTextCtrl(m_panel229, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel229, wxSize(-1, -1)), 0);
#ifdef __WXMSW__
    // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to
    // wxFONTFAMILY_TELETYPE
    wxFont m_textCtrlIncludeFileFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlIncludeFileFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_textCtrlIncludeFileFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlIncludeFileFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_textCtrlIncludeFile->SetFont(m_textCtrlIncludeFileFont);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlIncludeFile->SetHint(wxT(""));
#endif

    flexGridSizer117->Add(m_textCtrlIncludeFile, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_textCtrlInstantiationLineTEXT = new wxStaticText(m_panel229, wxID_ANY, _("Instantiation code:"),
                                                       wxDefaultPosition, wxDLG_UNIT(m_panel229, wxSize(-1, -1)), 0);

    flexGridSizer117->Add(m_textCtrlInstantiationLineTEXT, 0, wxALIGN_RIGHT | wxALIGN_TOP | wxALL, WXC_FROM_DIP(5));

    m_textCtrlInstantiationLine =
        new wxTextCtrl(m_panel229, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel229, wxSize(-1, -1)),
                       wxTE_MULTILINE | wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());
#ifdef __WXMSW__
    // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to
    // wxFONTFAMILY_TELETYPE
    wxFont m_textCtrlInstantiationLineFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlInstantiationLineFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_textCtrlInstantiationLineFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlInstantiationLineFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_textCtrlInstantiationLine->SetFont(m_textCtrlInstantiationLineFont);

    flexGridSizer117->Add(m_textCtrlInstantiationLine, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_panel231 =
        new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook->AddPage(m_panel231, _("Events"), false);

    wxBoxSizer* boxSizer233 = new wxBoxSizer(wxVERTICAL);
    m_panel231->SetSizer(boxSizer233);

    wxBoxSizer* boxSizer237 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer233->Add(boxSizer237, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrlEvents = new wxDataViewListCtrl(m_panel231, wxID_ANY, wxDefaultPosition,
                                                wxDLG_UNIT(m_panel231, wxSize(-1, -1)), wxDV_ROW_LINES | wxDV_SINGLE);

    boxSizer237->Add(m_dvListCtrlEvents, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrlEvents->AppendTextColumn(_("Event Type"), wxDATAVIEW_CELL_EDITABLE, WXC_FROM_DIP(200), wxALIGN_LEFT,
                                         wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlEvents->AppendTextColumn(_("Event Class"), wxDATAVIEW_CELL_EDITABLE, WXC_FROM_DIP(200), wxALIGN_LEFT,
                                         wxDATAVIEW_COL_RESIZABLE);
    wxBoxSizer* boxSizer239 = new wxBoxSizer(wxVERTICAL);

    boxSizer237->Add(boxSizer239, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_buttonNewEvent =
        new wxButton(m_panel231, wxID_NEW, _("New..."), wxDefaultPosition, wxDLG_UNIT(m_panel231, wxSize(-1, -1)), 0);
    m_buttonNewEvent->SetDefault();

    boxSizer239->Add(m_buttonNewEvent, 0, wxALL, WXC_FROM_DIP(5));

    m_buttonDeleteEvent = new wxButton(m_panel231, wxID_DELETE, _("Delete"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel231, wxSize(-1, -1)), 0);

    boxSizer239->Add(m_buttonDeleteEvent, 0, wxALL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer113 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer112->Add(boxSizer113, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button114 = new wxButton(this, wxID_SAVE, _("&Save"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button114->SetDefault();

    boxSizer113->Add(m_button114, 0, wxALL, WXC_FROM_DIP(5));

    m_button115 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer113->Add(m_button115, 0, wxALL, WXC_FROM_DIP(5));

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

    SetName(wxT("EditCustomControlDlgBaseClass"));
    SetSize(wxDLG_UNIT(this, wxSize(400, 400)));
    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_choiceControls->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &EditCustomControlDlgBaseClass::OnSelectControl, this);
    m_textCtrlXRCClass->Bind(wxEVT_COMMAND_TEXT_UPDATED, &EditCustomControlDlgBaseClass::OnControlModified, this);
    m_textCtrlIncludeFile->Bind(wxEVT_COMMAND_TEXT_UPDATED, &EditCustomControlDlgBaseClass::OnControlModified, this);
    m_textCtrlInstantiationLine->Bind(wxEVT_COMMAND_TEXT_UPDATED, &EditCustomControlDlgBaseClass::OnControlModified,
                                      this);
    m_dvListCtrlEvents->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, &EditCustomControlDlgBaseClass::OnEventEditDone,
                             this);
    m_buttonNewEvent->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &EditCustomControlDlgBaseClass::OnNewEvent, this);
    m_buttonDeleteEvent->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &EditCustomControlDlgBaseClass::OnDeleteEvent, this);
    m_buttonDeleteEvent->Bind(wxEVT_UPDATE_UI, &EditCustomControlDlgBaseClass::OnDeleteEventUI, this);
    m_button114->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &EditCustomControlDlgBaseClass::OnSave, this);
    m_button114->Bind(wxEVT_UPDATE_UI, &EditCustomControlDlgBaseClass::OnSaveUI, this);
}

EditCustomControlDlgBaseClass::~EditCustomControlDlgBaseClass()
{
    m_choiceControls->Unbind(wxEVT_COMMAND_CHOICE_SELECTED, &EditCustomControlDlgBaseClass::OnSelectControl, this);
    m_textCtrlXRCClass->Unbind(wxEVT_COMMAND_TEXT_UPDATED, &EditCustomControlDlgBaseClass::OnControlModified, this);
    m_textCtrlIncludeFile->Unbind(wxEVT_COMMAND_TEXT_UPDATED, &EditCustomControlDlgBaseClass::OnControlModified, this);
    m_textCtrlInstantiationLine->Unbind(wxEVT_COMMAND_TEXT_UPDATED, &EditCustomControlDlgBaseClass::OnControlModified,
                                        this);
    m_dvListCtrlEvents->Unbind(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE,
                               &EditCustomControlDlgBaseClass::OnEventEditDone, this);
    m_buttonNewEvent->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &EditCustomControlDlgBaseClass::OnNewEvent, this);
    m_buttonDeleteEvent->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &EditCustomControlDlgBaseClass::OnDeleteEvent, this);
    m_buttonDeleteEvent->Unbind(wxEVT_UPDATE_UI, &EditCustomControlDlgBaseClass::OnDeleteEventUI, this);
    m_button114->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &EditCustomControlDlgBaseClass::OnSave, this);
    m_button114->Unbind(wxEVT_UPDATE_UI, &EditCustomControlDlgBaseClass::OnSaveUI, this);
}

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

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

    wxFlexGridSizer* flexGridSizer138 = new wxFlexGridSizer(0, 3, 0, 0);
    flexGridSizer138->SetFlexibleDirection(wxBOTH);
    flexGridSizer138->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer138->AddGrowableCol(1);

    boxSizer127->Add(flexGridSizer138, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText128 = new wxStaticText(this, wxID_ANY, _("Filepath to import:"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer138->Add(m_staticText128, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_filepathText = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_filepathText->SetToolTip(_("Enter the filepath to import"));
#if wxVERSION_NUMBER >= 3000
    m_filepathText->SetHint(wxT(""));
#endif

    flexGridSizer138->Add(m_filepathText, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_buttonBrowse = new wxButton(this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer138->Add(m_buttonBrowse, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_staticText139 = new wxStaticText(this, wxID_ANY, _("Destination Filepath:"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer138->Add(m_staticText139, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textName->SetToolTip(_("Enter the name and path for wxCrafter file once it's imported"));
#if wxVERSION_NUMBER >= 3000
    m_textName->SetHint(wxT(""));
#endif

    flexGridSizer138->Add(m_textName, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_buttonFolder = new wxButton(this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer138->Add(m_buttonFolder, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    flexGridSizer138->Add(0, 0, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxAddToProject = new wxCheckBox(this, wxID_ANY, _("Add the new wxcp file to the current project"),
                                            wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxAddToProject->SetValue(false);

    flexGridSizer138->Add(m_checkBoxAddToProject, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    flexGridSizer138->Add(0, 0, 0, wxALL, WXC_FROM_DIP(5));

    m_staticText148 = new wxStaticText(this, wxID_ANY, _("Destination Virtual Folder:"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer138->Add(m_staticText148, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrl1VirtualFolder =
        new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textCtrl1VirtualFolder->SetToolTip(_("If the resulting .wxcp file is to be added to the current project, it "
                                           "needs to go in a Virtual Folder. Enter the one to use."));
#if wxVERSION_NUMBER >= 3000
    m_textCtrl1VirtualFolder->SetHint(wxT(""));
#endif

    flexGridSizer138->Add(m_textCtrl1VirtualFolder, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_buttonBrowseVD =
        new wxButton(this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer138->Add(m_buttonBrowseVD, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_checkBoxLoadWhenDone = new wxCheckBox(this, wxID_ANY, _("Load the .wxcp file when import is completed"),
                                            wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxLoadWhenDone->SetValue(false);

    boxSizer127->Add(m_checkBoxLoadWhenDone, 0, wxALL | wxALIGN_LEFT, WXC_FROM_DIP(5));

    boxSizer127->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));

    m_stdBtnSizer341 = new wxStdDialogButtonSizer();

    boxSizer127->Add(m_stdBtnSizer341, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button343 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button343->SetDefault();
    m_stdBtnSizer341->AddButton(m_button343);

    m_button345 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer341->AddButton(m_button345);
    m_stdBtnSizer341->Realize();

    SetName(wxT("ImportDlgBaseClass"));
    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_filepathText->Bind(wxEVT_COMMAND_TEXT_UPDATED, &ImportDlgBaseClass::OnFileImportTextUpdated, this);
    m_buttonBrowse->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ImportDlgBaseClass::OnBrowse, this);
    m_textName->Bind(wxEVT_COMMAND_TEXT_UPDATED, &ImportDlgBaseClass::OnDestFilePathUpdated, this);
    m_buttonFolder->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ImportDlgBaseClass::OnBrowseForOutputFolder, this);
    m_checkBoxAddToProject->Bind(wxEVT_UPDATE_UI, &ImportDlgBaseClass::OnAddToProjectUI, this);
    m_staticText148->Bind(wxEVT_UPDATE_UI, &ImportDlgBaseClass::OnAddFileToProjectUI, this);
    m_textCtrl1VirtualFolder->Bind(wxEVT_UPDATE_UI, &ImportDlgBaseClass::OnAddFileToProjectUI, this);
    m_buttonBrowseVD->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ImportDlgBaseClass::OnBrowseForVirtualFolder, this);
    m_buttonBrowseVD->Bind(wxEVT_UPDATE_UI, &ImportDlgBaseClass::OnAddFileToProjectUI, this);
}

ImportDlgBaseClass::~ImportDlgBaseClass()
{
    m_filepathText->Unbind(wxEVT_COMMAND_TEXT_UPDATED, &ImportDlgBaseClass::OnFileImportTextUpdated, this);
    m_buttonBrowse->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &ImportDlgBaseClass::OnBrowse, this);
    m_textName->Unbind(wxEVT_COMMAND_TEXT_UPDATED, &ImportDlgBaseClass::OnDestFilePathUpdated, this);
    m_buttonFolder->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &ImportDlgBaseClass::OnBrowseForOutputFolder, this);
    m_checkBoxAddToProject->Unbind(wxEVT_UPDATE_UI, &ImportDlgBaseClass::OnAddToProjectUI, this);
    m_staticText148->Unbind(wxEVT_UPDATE_UI, &ImportDlgBaseClass::OnAddFileToProjectUI, this);
    m_textCtrl1VirtualFolder->Unbind(wxEVT_UPDATE_UI, &ImportDlgBaseClass::OnAddFileToProjectUI, this);
    m_buttonBrowseVD->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &ImportDlgBaseClass::OnBrowseForVirtualFolder, this);
    m_buttonBrowseVD->Unbind(wxEVT_UPDATE_UI, &ImportDlgBaseClass::OnAddFileToProjectUI, this);
}

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

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

    wxBoxSizer* boxSizer155 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer152->Add(boxSizer155, 0, wxEXPAND, WXC_FROM_DIP(2));

    wxArrayString m_comboBoxFilesArr;
    m_comboBoxFiles = new wxComboBox(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                     m_comboBoxFilesArr, wxTE_PROCESS_ENTER);
    m_comboBoxFiles->SetFocus();
#if wxVERSION_NUMBER >= 3000
    m_comboBoxFiles->SetHint(_("Type part of the file and hit ENTER"));
#endif

    boxSizer155->Add(m_comboBoxFiles, 1, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_button426 = new wxButton(this, wxID_REFRESH, _("Reload"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer155->Add(m_button426, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_splitter347 = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                         wxSP_LIVE_UPDATE | wxSP_NO_XP_THEME | wxTRANSPARENT_WINDOW);
    m_splitter347->SetSashGravity(0.5);
    m_splitter347->SetMinimumPaneSize(10);

    boxSizer152->Add(m_splitter347, 1, wxALL | wxEXPAND, WXC_FROM_DIP(2));

    m_splitterPageTree = new wxPanel(m_splitter347, wxID_ANY, wxDefaultPosition,
                                     wxDLG_UNIT(m_splitter347, wxSize(-1, 150)), wxTAB_TRAVERSAL);

    wxBoxSizer* boxSizer357 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageTree->SetSizer(boxSizer357);

    m_treeControls = new clTreeCtrl(m_splitterPageTree, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_splitterPageTree, wxSize(-1, -1)), wxTR_ROW_LINES);

    boxSizer357->Add(m_treeControls, 1, wxALL | wxEXPAND, WXC_FROM_DIP(0));

    m_splitterPageEvents = new wxPanel(m_splitter347, wxID_ANY, wxDefaultPosition,
                                       wxDLG_UNIT(m_splitter347, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_splitter347->SplitHorizontally(m_splitterPageTree, m_splitterPageEvents, 0);

    wxBoxSizer* boxSizer359 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageEvents->SetSizer(boxSizer359);

    SetName(wxT("wxcTreeViewBaseClass"));
    SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    // Connect events
    m_comboBoxFiles->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &wxcTreeViewBaseClass::OnWxcpFileSelected, this);
    m_comboBoxFiles->Bind(wxEVT_UPDATE_UI, &wxcTreeViewBaseClass::OnWorkspaceOpenUI, this);
    m_comboBoxFiles->Bind(wxEVT_COMMAND_TEXT_ENTER, &wxcTreeViewBaseClass::OnWxcpComboxTextEnter, this);
    m_button426->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &wxcTreeViewBaseClass::OnRefreshWxcpFiles, this);
    m_button426->Bind(wxEVT_UPDATE_UI, &wxcTreeViewBaseClass::OnWorkspaceOpenUI, this);
    m_splitter347->Bind(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, &wxcTreeViewBaseClass::OnSashPositionChanged, this);
    m_treeControls->Bind(wxEVT_COMMAND_TREE_SEL_CHANGED, &wxcTreeViewBaseClass::OnItemSelected, this);
    m_treeControls->Bind(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, &wxcTreeViewBaseClass::OnItemSelected, this);
    m_treeControls->Bind(wxEVT_COMMAND_TREE_END_LABEL_EDIT, &wxcTreeViewBaseClass::OnItemLabelEditEnd, this);
    m_treeControls->Bind(wxEVT_CHAR, &wxcTreeViewBaseClass::OnChar, this);
}

wxcTreeViewBaseClass::~wxcTreeViewBaseClass()
{
    m_comboBoxFiles->Unbind(wxEVT_COMMAND_COMBOBOX_SELECTED, &wxcTreeViewBaseClass::OnWxcpFileSelected, this);
    m_comboBoxFiles->Unbind(wxEVT_UPDATE_UI, &wxcTreeViewBaseClass::OnWorkspaceOpenUI, this);
    m_comboBoxFiles->Unbind(wxEVT_COMMAND_TEXT_ENTER, &wxcTreeViewBaseClass::OnWxcpComboxTextEnter, this);
    m_button426->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &wxcTreeViewBaseClass::OnRefreshWxcpFiles, this);
    m_button426->Unbind(wxEVT_UPDATE_UI, &wxcTreeViewBaseClass::OnWorkspaceOpenUI, this);
    m_splitter347->Unbind(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, &wxcTreeViewBaseClass::OnSashPositionChanged, this);
    m_treeControls->Unbind(wxEVT_COMMAND_TREE_SEL_CHANGED, &wxcTreeViewBaseClass::OnItemSelected, this);
    m_treeControls->Unbind(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, &wxcTreeViewBaseClass::OnItemSelected, this);
    m_treeControls->Unbind(wxEVT_COMMAND_TREE_END_LABEL_EDIT, &wxcTreeViewBaseClass::OnItemLabelEditEnd, this);
    m_treeControls->Unbind(wxEVT_CHAR, &wxcTreeViewBaseClass::OnChar, this);
}

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

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

    m_staticText167 = new wxStaticText(this, wxID_ANY, _("Select the controls you wish to delete:"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    wxFont m_staticText167Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText167Font.SetStyle(wxFONTSTYLE_ITALIC);
    m_staticText167Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText167->SetFont(m_staticText167Font);

    boxSizer158->Add(m_staticText167, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_dvListCtrl = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                          wxDV_ROW_LINES | wxDV_SINGLE | wxTRANSPARENT_WINDOW |
                                              get_border_simple_theme_aware_bit());

    boxSizer158->Add(m_dvListCtrl, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrl->AppendToggleColumn(_("!"), wxDATAVIEW_CELL_ACTIVATABLE, WXC_FROM_DIP(20), wxALIGN_LEFT,
                                     wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrl->AppendTextColumn(_("Name"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(400), wxALIGN_LEFT,
                                   wxDATAVIEW_COL_RESIZABLE);
    wxBoxSizer* boxSizer162 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer158->Add(boxSizer162, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button163 =
        new wxButton(this, wxID_DELETE, _("Delete..."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button163->SetToolTip(_("Delete the selected control"));

    boxSizer162->Add(m_button163, 0, wxALL, WXC_FROM_DIP(5));

    m_button164 = new wxButton(this, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer162->Add(m_button164, 0, wxALL, WXC_FROM_DIP(5));

    SetName(wxT("DeleteCustomControlDlgBaseClass"));
    SetSize(wxDLG_UNIT(this, wxSize(400, 300)));
    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_dvListCtrl->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, &DeleteCustomControlDlgBaseClass::OnItemValueChanged,
                       this);
    m_button163->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DeleteCustomControlDlgBaseClass::OnDeleteControls, this);
    m_button163->Bind(wxEVT_UPDATE_UI, &DeleteCustomControlDlgBaseClass::OnDeleteUI, this);
}

DeleteCustomControlDlgBaseClass::~DeleteCustomControlDlgBaseClass()
{
    m_dvListCtrl->Unbind(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED,
                         &DeleteCustomControlDlgBaseClass::OnItemValueChanged, this);
    m_button163->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &DeleteCustomControlDlgBaseClass::OnDeleteControls, this);
    m_button163->Unbind(wxEVT_UPDATE_UI, &DeleteCustomControlDlgBaseClass::OnDeleteUI, this);
}

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

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

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

    boxSizer169->Add(m_notebook173, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    wxBoxSizer* boxSizer176 = new wxBoxSizer(wxVERTICAL);
    m_panel174->SetSizer(boxSizer176);

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

    boxSizer176->Add(flexGridSizer179, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText182 = new wxStaticText(m_panel174, wxID_ANY, _("Version:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel174, wxSize(-1, -1)), 0);
    wxFont m_staticText182Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText182Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText182->SetFont(m_staticText182Font);

    flexGridSizer179->Add(m_staticText182, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

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

    flexGridSizer179->Add(m_staticTextVersion, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText_1 = new wxStaticText(m_panel174, wxID_ANY, _("Build:"), wxDefaultPosition,
                                      wxDLG_UNIT(m_panel174, wxSize(-1, -1)), 0);
    wxFont m_staticText_1Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText_1Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText_1->SetFont(m_staticText_1Font);

    flexGridSizer179->Add(m_staticText_1, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

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

    flexGridSizer179->Add(m_staticTextBuildNumber, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticBitmap178 = new wxStaticBitmap(m_panel174, wxID_ANY, wxXmlResource::Get()->LoadBitmap(wxT("wxc-logo")),
                                           wxDefaultPosition, wxDLG_UNIT(m_panel174, wxSize(-1, -1)), 0);

    boxSizer176->Add(m_staticBitmap178, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    wxBoxSizer* boxSizer428 = new wxBoxSizer(wxVERTICAL);
    m_panel427->SetSizer(boxSizer428);

    m_stcLicense =
        new wxStyledTextCtrl(m_panel427, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel427, wxSize(-1, -1)), 0);
    // 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(0);
    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(""));

    boxSizer428->Add(m_stcLicense, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer170 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer169->Add(boxSizer170, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button171 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button171->SetDefault();

    boxSizer170->Add(m_button171, 0, wxALL, WXC_FROM_DIP(5));

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

    SetName(wxT("wxcAboutDlgBaseClass"));
    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
    this->Bind(wxEVT_SIZE, &wxcAboutDlgBaseClass::OnSize, this);
}

wxcAboutDlgBaseClass::~wxcAboutDlgBaseClass() { this->Unbind(wxEVT_SIZE, &wxcAboutDlgBaseClass::OnSize, this); }

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

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

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

    boxSizer247->Add(flexGridSizer255, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText257 =
        new wxStaticText(this, wxID_ANY, _("Event Type:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer255->Add(m_staticText257, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlEventType =
        new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textCtrlEventType->SetToolTip(_("Set the eventype here\ne.g. wxEVT_MY_BUTTON_CLICKED"));
    m_textCtrlEventType->SetFocus();
#if wxVERSION_NUMBER >= 3000
    m_textCtrlEventType->SetHint(wxT(""));
#endif

    flexGridSizer255->Add(m_textCtrlEventType, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText261 =
        new wxStaticText(this, wxID_ANY, _("Event Class:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer255->Add(m_staticText261, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlEventClass =
        new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textCtrlEventClass->SetToolTip(_("The event class.\ne.g. wxCommandEvent"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlEventClass->SetHint(wxT(""));
#endif

    flexGridSizer255->Add(m_textCtrlEventClass, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer249 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer247->Add(boxSizer249, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button251 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button251->SetDefault();

    boxSizer249->Add(m_button251, 0, wxALL, WXC_FROM_DIP(5));

    m_button253 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer249->Add(m_button253, 0, wxALL, WXC_FROM_DIP(5));

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

NewCustomEventBaseDlg::~NewCustomEventBaseDlg() {}

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

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

    wxStaticBoxSizer* staticBoxSizer325 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);

    boxSizer293->Add(staticBoxSizer325, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxSelectFile = new wxCheckBox(this, wxID_ANY, _("Select bitmap from a file"), wxDefaultPosition,
                                          wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxSelectFile->SetValue(true);

    staticBoxSizer325->Add(m_checkBoxSelectFile, 0, wxALL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer372 = new wxBoxSizer(wxVERTICAL);

    staticBoxSizer325->Add(boxSizer372, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer305 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer372->Add(boxSizer305, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_textCtrlFile = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlFile->SetHint(wxT(""));
#endif
    m_textCtrlFile->AutoCompleteFileNames();

    boxSizer305->Add(m_textCtrlFile, 1, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_buttonBrowseBitmap =
        new wxButton(this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer305->Add(m_buttonBrowseBitmap, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_checkBoxConvertToRelativePath =
        new wxCheckBox(this, wxID_ANY, _("Use relative paths"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxConvertToRelativePath->SetValue(true);
    m_checkBoxConvertToRelativePath->SetToolTip(
        _("Convert the selected path to relative (relative to the wxCrafter project file)"));

    boxSizer372->Add(m_checkBoxConvertToRelativePath, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    wxStaticBoxSizer* staticBoxSizer323 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);

    boxSizer293->Add(staticBoxSizer323, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxArtProvider =
        new wxCheckBox(this, wxID_ANY, _("Use wxArtProvider"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxArtProvider->SetValue(false);

    staticBoxSizer323->Add(m_checkBoxArtProvider, 0, wxALL, WXC_FROM_DIP(5));

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

    staticBoxSizer323->Add(flexGridSizer303, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText315 =
        new wxStaticText(this, wxID_ANY, _("wxArtID:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_staticText315->SetToolTip(
        _("This type identifies a specific art object which can be requested to wxArtProvider."));

    flexGridSizer303->Add(m_staticText315, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    wxArrayString m_choiceArtIDArr;
    m_choiceArtID =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceArtIDArr, 0);
    m_choiceArtID->SetToolTip(_("This type identifies a specific art object which can be requested to wxArtProvider."));

    flexGridSizer303->Add(m_choiceArtID, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText319 =
        new wxStaticText(this, wxID_ANY, _("wxArtClient:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_staticText319->SetToolTip(_("This type identifies the client of the art objects requested to wxArtProvider."));

    flexGridSizer303->Add(m_staticText319, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    wxArrayString m_choiceArtClientIDArr;
    m_choiceArtClientIDArr.Add(_("wxART_TOOLBAR"));
    m_choiceArtClientIDArr.Add(_("wxART_MENU"));
    m_choiceArtClientIDArr.Add(_("wxART_FRAME_ICON"));
    m_choiceArtClientIDArr.Add(_("wxART_CMN_DIALOG"));
    m_choiceArtClientIDArr.Add(_("wxART_HELP_BROWSER"));
    m_choiceArtClientIDArr.Add(_("wxART_MESSAGE_BOX"));
    m_choiceArtClientIDArr.Add(_("wxART_BUTTON"));
    m_choiceArtClientIDArr.Add(_("wxART_LIST"));
    m_choiceArtClientIDArr.Add(_("wxART_OTHER"));
    m_choiceArtClientID =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceArtClientIDArr, 0);
    m_choiceArtClientID->SetToolTip(
        _("This type identifies the client of the art objects requested to wxArtProvider."));
    m_choiceArtClientID->SetSelection(0);

    flexGridSizer303->Add(m_choiceArtClientID, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticTextHInt =
        new wxStaticText(this, wxID_ANY, _("Size Hint:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_staticTextHInt->SetToolTip(_("Size of the returned bitmap or wxDefaultSize if size doesn't matter"));

    flexGridSizer303->Add(m_staticTextHInt, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    wxArrayString m_choiceSizeArr;
    m_choiceSizeArr.Add(_("wxDefaultSize"));
    m_choiceSizeArr.Add(_("16"));
    m_choiceSizeArr.Add(_("24"));
    m_choiceSizeArr.Add(_("32"));
    m_choiceSizeArr.Add(_("64"));
    m_choiceSize =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceSizeArr, 0);
    m_choiceSize->SetToolTip(_("Size of the returned bitmap or wxDefaultSize if size doesn't matter"));
    m_choiceSize->SetSelection(0);

    flexGridSizer303->Add(m_choiceSize, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    boxSizer293->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer295 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer293->Add(boxSizer295, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button297 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button297->SetDefault();

    boxSizer295->Add(m_button297, 0, wxALL, WXC_FROM_DIP(5));

    m_button299 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer295->Add(m_button299, 0, wxALL, WXC_FROM_DIP(5));

    SetName(wxT("BitmapSelectorDlgBase"));
    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_checkBoxSelectFile->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &BitmapSelectorDlgBase::OnUseFilePicker, this);
    m_textCtrlFile->Bind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnSelectBitmapUI, this);
    m_buttonBrowseBitmap->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &BitmapSelectorDlgBase::OnBrowseFile, this);
    m_buttonBrowseBitmap->Bind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnSelectBitmapUI, this);
    m_checkBoxConvertToRelativePath->Bind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnSelectBitmapUI, this);
    m_checkBoxConvertToRelativePath->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &BitmapSelectorDlgBase::OnUseRelativePaths,
                                          this);
    m_checkBoxArtProvider->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &BitmapSelectorDlgBase::OnUserArtProvider, this);
    m_staticText315->Bind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
    m_choiceArtID->Bind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
    m_staticText319->Bind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
    m_choiceArtClientID->Bind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
    m_staticTextHInt->Bind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
    m_choiceSize->Bind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
}

BitmapSelectorDlgBase::~BitmapSelectorDlgBase()
{
    m_checkBoxSelectFile->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &BitmapSelectorDlgBase::OnUseFilePicker, this);
    m_textCtrlFile->Unbind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnSelectBitmapUI, this);
    m_buttonBrowseBitmap->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &BitmapSelectorDlgBase::OnBrowseFile, this);
    m_buttonBrowseBitmap->Unbind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnSelectBitmapUI, this);
    m_checkBoxConvertToRelativePath->Unbind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnSelectBitmapUI, this);
    m_checkBoxConvertToRelativePath->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &BitmapSelectorDlgBase::OnUseRelativePaths,
                                            this);
    m_checkBoxArtProvider->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &BitmapSelectorDlgBase::OnUserArtProvider, this);
    m_staticText315->Unbind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
    m_choiceArtID->Unbind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
    m_staticText319->Unbind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
    m_choiceArtClientID->Unbind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
    m_staticTextHInt->Unbind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
    m_choiceSize->Unbind(wxEVT_UPDATE_UI, &BitmapSelectorDlgBase::OnUserArtPorviderUI, this);
}

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

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

    m_staticTextEventsPaneTitle =
        new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    wxFont m_staticTextEventsPaneTitleFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticTextEventsPaneTitleFont.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticTextEventsPaneTitle->SetFont(m_staticTextEventsPaneTitleFont);

    boxSizer7->Add(m_staticTextEventsPaneTitle, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    boxSizer7->Add(m_notebook14, 1, wxALL | wxEXPAND, WXC_FROM_DIP(0));

    m_panelControlEvents = new wxPanel(m_notebook14, wxID_ANY, wxDefaultPosition,
                                       wxDLG_UNIT(m_notebook14, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook14->AddPage(m_panelControlEvents, _("Control Events"), true);

    wxBoxSizer* boxSizer17 = new wxBoxSizer(wxVERTICAL);
    m_panelControlEvents->SetSizer(boxSizer17);

    m_controlEventsTable = new EventsTableListView(m_panelControlEvents);
    boxSizer17->Add(m_controlEventsTable, 1, wxALL | wxEXPAND, WXC_FROM_DIP(0));

    m_panelInheritedEvents = new wxPanel(m_notebook14, wxID_ANY, wxDefaultPosition,
                                         wxDLG_UNIT(m_notebook14, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook14->AddPage(m_panelInheritedEvents, _("Inherited Events"), false);

    wxBoxSizer* boxSizer19 = new wxBoxSizer(wxVERTICAL);
    m_panelInheritedEvents->SetSizer(boxSizer19);

    m_inheritedEventsTable = new EventsTableListView(m_panelInheritedEvents);
    boxSizer19->Add(m_inheritedEventsTable, 1, wxALL | wxEXPAND, WXC_FROM_DIP(0));

    SetName(wxT("EventsEditorPaneBase"));
    SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
}

EventsEditorPaneBase::~EventsEditorPaneBase() {}

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

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

    wxBoxSizer* boxSizer371 = new wxBoxSizer(wxVERTICAL);

    boxSizer2471->Add(boxSizer371, 0, wxALL, WXC_FROM_DIP(5));

    m_staticText370 =
        new wxStaticText(this, wxID_ANY,
                         _("The new base-class must have a different name.\nIf you don't enter one, it will be created "
                           "for you.\nThe inherited fields are optional, but a good idea."),
                         wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer371->Add(m_staticText370, 0, wxALL, WXC_FROM_DIP(5));

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

    boxSizer2471->Add(flexGridSizer2552, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText2573 = new wxStaticText(this, wxID_ANY, _("New Base-Class Name:"), wxDefaultPosition,
                                        wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer2552->Add(m_staticText2573, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textBasename = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textBasename->SetToolTip(_("e.g. FooBaseDlg"));
    m_textBasename->SetFocus();
#if wxVERSION_NUMBER >= 3000
    m_textBasename->SetHint(wxT(""));
#endif

    flexGridSizer2552->Add(m_textBasename, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    flexGridSizer2552->Add(0, 1, 1, wxALL, WXC_FROM_DIP(5));

    flexGridSizer2552->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));

    m_staticText261510 = new wxStaticText(this, wxID_ANY, _("New Inherited-Class Name:"), wxDefaultPosition,
                                          wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer2552->Add(m_staticText261510, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textInheritedName =
        new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textInheritedName->SetToolTip(_("e.g. FooDlg"));
#if wxVERSION_NUMBER >= 3000
    m_textInheritedName->SetHint(wxT(""));
#endif

    flexGridSizer2552->Add(m_textInheritedName, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText2615 = new wxStaticText(this, wxID_ANY, _("New Inherited-Class Filename:"), wxDefaultPosition,
                                        wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer2552->Add(m_staticText2615, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textFilename = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textFilename->SetToolTip(
        _("The basename of the file for the new inherited class e.g. For FooDlg you might choose foodlg"));
#if wxVERSION_NUMBER >= 3000
    m_textFilename->SetHint(wxT(""));
#endif

    flexGridSizer2552->Add(m_textFilename, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer2497 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer2471->Add(boxSizer2497, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button2518 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button2518->SetDefault();

    boxSizer2497->Add(m_button2518, 0, wxALL, WXC_FROM_DIP(5));

    m_button2539 =
        new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer2497->Add(m_button2539, 0, wxALL, WXC_FROM_DIP(5));

    SetName(wxT("DuplicateTLWBaseDlg"));
    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_textInheritedName->Bind(wxEVT_SET_FOCUS, &DuplicateTLWBaseDlg::OnInheritedNameFocus, this);
    m_textFilename->Bind(wxEVT_SET_FOCUS, &DuplicateTLWBaseDlg::OnFilenameFocus, this);
}

DuplicateTLWBaseDlg::~DuplicateTLWBaseDlg()
{
    m_textInheritedName->Unbind(wxEVT_SET_FOCUS, &DuplicateTLWBaseDlg::OnInheritedNameFocus, this);
    m_textFilename->Unbind(wxEVT_SET_FOCUS, &DuplicateTLWBaseDlg::OnFilenameFocus, this);
}

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

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

    wxBoxSizer* boxSizer379 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer390->Add(boxSizer379, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrl = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(300, 200)),
                                          wxDV_ROW_LINES | wxDV_SINGLE | wxTRANSPARENT_WINDOW |
                                              get_border_simple_theme_aware_bit());

    boxSizer379->Add(m_dvListCtrl, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrl->AppendTextColumn(_("Bitmap"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                   wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrl->AppendTextColumn(_("Text"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                   wxDATAVIEW_COL_RESIZABLE);
    wxBoxSizer* boxSizer389 = new wxBoxSizer(wxVERTICAL);

    boxSizer379->Add(boxSizer389, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_button392 = new wxButton(this, wxID_NEW, _("&New"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer389->Add(m_button392, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_button394 = new wxButton(this, wxID_EDIT, _("&Edit"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer389->Add(m_button394, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_button396 = new wxButton(this, wxID_DELETE, _("Delete"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer389->Add(m_button396, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer381 = new wxStdDialogButtonSizer();

    boxSizer390->Add(m_stdBtnSizer381, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button383 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button383->SetDefault();
    m_stdBtnSizer381->AddButton(m_button383);

    m_button385 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer381->AddButton(m_button385);
    m_stdBtnSizer381->Realize();

    SetName(wxT("BmpTextSelectorDlgBase"));
    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_dvListCtrl->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, &BmpTextSelectorDlgBase::OnItemActivated, this);
    m_button392->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &BmpTextSelectorDlgBase::OnNew, this);
    m_button394->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &BmpTextSelectorDlgBase::OnEdit, this);
    m_button394->Bind(wxEVT_UPDATE_UI, &BmpTextSelectorDlgBase::OnEditUI, this);
    m_button396->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &BmpTextSelectorDlgBase::OnDelete, this);
    m_button396->Bind(wxEVT_UPDATE_UI, &BmpTextSelectorDlgBase::OnDeleteUI, this);
}

BmpTextSelectorDlgBase::~BmpTextSelectorDlgBase()
{
    m_dvListCtrl->Unbind(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, &BmpTextSelectorDlgBase::OnItemActivated, this);
    m_button392->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &BmpTextSelectorDlgBase::OnNew, this);
    m_button394->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &BmpTextSelectorDlgBase::OnEdit, this);
    m_button394->Unbind(wxEVT_UPDATE_UI, &BmpTextSelectorDlgBase::OnEditUI, this);
    m_button396->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &BmpTextSelectorDlgBase::OnDelete, this);
    m_button396->Unbind(wxEVT_UPDATE_UI, &BmpTextSelectorDlgBase::OnDeleteUI, this);
}

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

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

    wxFlexGridSizer* flexGridSizer408 = new wxFlexGridSizer(0, 3, 0, 0);
    flexGridSizer408->SetFlexibleDirection(wxBOTH);
    flexGridSizer408->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer408->AddGrowableCol(1);

    boxSizer400->Add(flexGridSizer408, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText410 =
        new wxStaticText(this, wxID_ANY, _("Set label:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer408->Add(m_staticText410, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlText = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlText->SetHint(wxT(""));
#endif

    flexGridSizer408->Add(m_textCtrlText, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    flexGridSizer408->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));

    m_staticText414 =
        new wxStaticText(this, wxID_ANY, _("Select bitmap:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer408->Add(m_staticText414, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlBmp = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlBmp->SetHint(wxT(""));
#endif

    flexGridSizer408->Add(m_textCtrlBmp, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_button416 = new wxButton(this, wxID_ANY, _("Select"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer408->Add(m_button416, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_stdBtnSizer402 = new wxStdDialogButtonSizer();

    boxSizer400->Add(m_stdBtnSizer402, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button404 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button404->SetDefault();
    m_stdBtnSizer402->AddButton(m_button404);

    m_button406 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer402->AddButton(m_button406);
    m_stdBtnSizer402->Realize();

    SetName(wxT("SingleBitmapAndTextDlgBase"));
    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_button416->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &SingleBitmapAndTextDlgBase::OnSelectBitmap, this);
    m_button404->Bind(wxEVT_UPDATE_UI, &SingleBitmapAndTextDlgBase::OnOKUI, this);
}

SingleBitmapAndTextDlgBase::~SingleBitmapAndTextDlgBase()
{
    m_button416->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &SingleBitmapAndTextDlgBase::OnSelectBitmap, this);
    m_button404->Unbind(wxEVT_UPDATE_UI, &SingleBitmapAndTextDlgBase::OnOKUI, this);
}
