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

#include "gui.h"

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

static bool bBitmapLoaded = false;

MainFrameBase::MainFrameBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos,
                             const wxSize& size, long style)
    : wxFrame(parent, id, title, pos, size, style)
{
    if(!bBitmapLoaded) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC2AC4InitBitmapResources();
        bBitmapLoaded = true;
    }

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

    m_mainToolbar = new clToolBar(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTB_FLAT);
    m_mainToolbar->SetToolBitmapSize(wxSize(16, 16));

    mainSizer->Add(m_mainToolbar, 0, wxALL | wxEXPAND, WXC_FROM_DIP(0));

    m_MainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(800, 600)), wxTAB_TRAVERSAL);

    mainSizer->Add(m_MainPanel, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer285 = new wxBoxSizer(wxHORIZONTAL);
    m_MainPanel->SetSizer(boxSizer285);

    m_splitterMain =
        new wxSplitterWindow(m_MainPanel, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_MainPanel, wxSize(-1, -1)),
                             wxSP_LIVE_UPDATE | wxSP_NO_XP_THEME | wxSP_3DSASH);
    m_splitterMain->SetSashGravity(0);
    m_splitterMain->SetMinimumPaneSize(10);

    boxSizer285->Add(m_splitterMain, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_splitterPageTreeView = new wxPanel(m_splitterMain, wxID_ANY, wxDefaultPosition,
                                         wxDLG_UNIT(m_splitterMain, wxSize(150, -1)), wxTAB_TRAVERSAL);

    wxBoxSizer* boxSizer297 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageTreeView->SetSizer(boxSizer297);

    m_splitterPageDesigner = new wxPanel(m_splitterMain, wxID_ANY, wxDefaultPosition,
                                         wxDLG_UNIT(m_splitterMain, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_splitterMain->SplitVertically(m_splitterPageTreeView, m_splitterPageDesigner, 150);

    wxBoxSizer* boxSizer299 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageDesigner->SetSizer(boxSizer299);

    m_statusBar = new wxStatusBar(this, wxID_ANY, wxST_SIZEGRIP);
    m_statusBar->SetFieldsCount(1);
    this->SetStatusBar(m_statusBar);

    m_menuBar = new wxMenuBar(0);
    this->SetMenuBar(m_menuBar);

    m_menuFile = new wxMenu();
    m_menuBar->Append(m_menuFile, _("&File"));

    m_menuItemOpen = new wxMenuItem(m_menuFile, wxID_OPEN, _("Open\tCtrl-O"), wxT(""), wxITEM_NORMAL);
    m_menuFile->Append(m_menuItemOpen);

    m_menuItemSave = new wxMenuItem(m_menuFile, wxID_SAVE, _("&Save\tCtrl-S"), wxT(""), wxITEM_NORMAL);
    m_menuFile->Append(m_menuItemSave);

    m_menuFile->AppendSeparator();

    m_menuItemHide =
        new wxMenuItem(m_menuFile, XRCID("hide_designer"), _("&Close"), _("Hide the designer"), wxITEM_NORMAL);
    m_menuFile->Append(m_menuItemHide);

    m_menuFile->AppendSeparator();

    m_menuItemGenerate =
        new wxMenuItem(m_menuFile, ID_GENERATE_CODE, _("Generate Code\tCtrl-G"), wxT(""), wxITEM_NORMAL);
    m_menuFile->Append(m_menuItemGenerate);

    m_menuItemBatchGenerate = new wxMenuItem(m_menuFile, ID_BATCH_GENERATE_CODE,
                                             _("Batch Generate Code...\tCtrl-Shift-G"), wxT(""), wxITEM_NORMAL);
    m_menuFile->Append(m_menuItemBatchGenerate);

    m_menuFile->AppendSeparator();

    m_menuItemBackToCodelite =
        new wxMenuItem(m_menuFile, wxID_BACKWARD, _("Back to codelite\tCtrl-Shift-F12"), wxT(""), wxITEM_NORMAL);
    m_menuFile->Append(m_menuItemBackToCodelite);

    m_menuView = new wxMenu();
    m_menuBar->Append(m_menuView, _("&View"));

    m_menuItemPreview = new wxMenuItem(m_menuView, wxID_PREVIEW, _("Show &Preview\tF5"), wxT(""), wxITEM_NORMAL);
    m_menuView->Append(m_menuItemPreview);

    m_menuEdit = new wxMenu();
    m_menuBar->Append(m_menuEdit, _("&Edit"));

    m_menuItem74 = new wxMenuItem(m_menuEdit, wxID_DELETE, _("Delete\tDEL"), wxT(""), wxITEM_NORMAL);
    m_menuEdit->Append(m_menuItem74);

    m_menuEdit->AppendSeparator();

    m_menuItemCopy = new wxMenuItem(m_menuEdit, wxID_COPY, _("Copy\tCtrl-C"), wxT(""), wxITEM_NORMAL);
    m_menuEdit->Append(m_menuItemCopy);

    m_menuItemPaste = new wxMenuItem(m_menuEdit, wxID_PASTE, _("Paste\tCtrl-V"), wxT(""), wxITEM_NORMAL);
    m_menuEdit->Append(m_menuItemPaste);

    m_menuItemCut = new wxMenuItem(m_menuEdit, wxID_CUT, _("Cut\tCtrl-X"), wxT(""), wxITEM_NORMAL);
    m_menuEdit->Append(m_menuItemCut);

    m_menuEdit->AppendSeparator();

    m_menuItemUndo = new wxMenuItem(m_menuEdit, wxID_UNDO, _("Undo\tCtrl-Z"), wxT(""), wxITEM_NORMAL);
    m_menuEdit->Append(m_menuItemUndo);

    m_menuItemRedo = new wxMenuItem(m_menuEdit, wxID_REDO, _("Redo\tCtrl-Y"), wxT(""), wxITEM_NORMAL);
    m_menuEdit->Append(m_menuItemRedo);

    m_menuItemLabelCurrentState = new wxMenuItem(m_menuEdit, XRCID("label_current_state"),
                                                 _("Set label for current state"), wxT(""), wxITEM_NORMAL);
    m_menuEdit->Append(m_menuItemLabelCurrentState);

    m_menuEdit->AppendSeparator();

    m_menuItemRename = new wxMenuItem(m_menuEdit, XRCID("ID_RENAME"), _("Rename\tF2"), _("Rename item"), wxITEM_NORMAL);
    m_menuEdit->Append(m_menuItemRename);

    m_menuEdit->AppendSeparator();

    m_menuItemPreferences = new wxMenuItem(m_menuEdit, XRCID("wxc_settings"), _("Settings..."), wxT(""), wxITEM_NORMAL);
    m_menuEdit->Append(m_menuItemPreferences);

    m_menuSearch = new wxMenu();
    m_menuBar->Append(m_menuSearch, _("&Search"));

    m_menuItemFind = new wxMenuItem(m_menuSearch, wxID_FIND, _("Find...\tCtrl-F"), _("Find"), wxITEM_NORMAL);
    m_menuSearch->Append(m_menuItemFind);

    m_menuBuild = new wxMenu();
    m_menuBar->Append(m_menuBuild, _("&Build"));

    m_menuItemBuild =
        new wxMenuItem(m_menuBuild, XRCID("ID_BUILD"), _("Build Active Project\tF7"), wxT(""), wxITEM_NORMAL);
    m_menuBuild->Append(m_menuItemBuild);

    m_menuImport = new wxMenu();
    m_menuBar->Append(m_menuImport, _("&Import"));

    m_menuItemFB = new wxMenuItem(m_menuImport, XRCID("import_wxFB_project"), _("Import wx&FormBuilder Project"),
                                  wxT(""), wxITEM_NORMAL);
    m_menuImport->Append(m_menuItemFB);

    m_menuItemSmith = new wxMenuItem(m_menuImport, XRCID("import_wxSmith_project"), _("Import wx&Smith File"), wxT(""),
                                     wxITEM_NORMAL);
    m_menuImport->Append(m_menuItemSmith);

    m_menuItemXRC =
        new wxMenuItem(m_menuImport, XRCID("import_XRC_project"), _("Import &XRC File"), wxT(""), wxITEM_NORMAL);
    m_menuImport->Append(m_menuItemXRC);

    m_menuCustomControl = new wxMenu();
    m_menuBar->Append(m_menuCustomControl, _("Custom Controls"));

    m_menuItemNewCustomControl =
        new wxMenuItem(m_menuCustomControl, ID_CUSTOM_CONTROL_NEW, _("New Custom Control..."), wxT(""), wxITEM_NORMAL);
    m_menuCustomControl->Append(m_menuItemNewCustomControl);

    m_menuItemEditCustomControl = new wxMenuItem(m_menuCustomControl, ID_CUSTOM_CONTROL_EDIT,
                                                 _("Edit Custom Control..."), wxT(""), wxITEM_NORMAL);
    m_menuCustomControl->Append(m_menuItemEditCustomControl);

    m_menuItemDeleteCustonControl = new wxMenuItem(m_menuCustomControl, ID_CUSTOM_CONTROL_DELETE,
                                                   _("Delete Custom Control"), wxT(""), wxITEM_NORMAL);
    m_menuCustomControl->Append(m_menuItemDeleteCustonControl);

    m_menuHelp = new wxMenu();
    m_menuBar->Append(m_menuHelp, _("&Help"));

    m_menuItemAbout = new wxMenuItem(m_menuHelp, wxID_ABOUT, _("&About..."), wxT(""), wxITEM_NORMAL);
    m_menuHelp->Append(m_menuItemAbout);

    SetName(wxT("MainFrameBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    if(GetParent()) {
        CentreOnParent(wxHORIZONTAL);
    } else {
        CentreOnScreen(wxHORIZONTAL);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(MainFrameBase::OnCloseFrame), NULL, this);
    this->Connect(m_menuItemOpen->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnFileOpen), NULL, this);
    this->Connect(m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnSave),
                  NULL, this);
    this->Connect(m_menuItemSave->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnSaveUI), NULL,
                  this);
    this->Connect(m_menuItemHide->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnHide),
                  NULL, this);
    this->Connect(m_menuItemGenerate->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnGenerateCode), NULL, this);
    this->Connect(m_menuItemGenerate->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnGenerateCodeUI),
                  NULL, this);
    this->Connect(m_menuItemBatchGenerate->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnBatchGenerateCode), NULL, this);
    this->Connect(m_menuItemBatchGenerate->GetId(), wxEVT_UPDATE_UI,
                  wxUpdateUIEventHandler(MainFrameBase::OnBatchGenerateCodeUI), NULL, this);
    this->Connect(m_menuItemBackToCodelite->GetId(), wxEVT_UPDATE_UI,
                  wxUpdateUIEventHandler(MainFrameBase::OnSwitchToCodeliteUI), NULL, this);
    this->Connect(m_menuItemPreview->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnPreview), NULL, this);
    this->Connect(m_menuItemPreview->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnPreviewUI), NULL,
                  this);
    this->Connect(m_menuItem74->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnDeleteItem), NULL, this);
    this->Connect(m_menuItem74->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnDeleteItemUI), NULL,
                  this);
    this->Connect(m_menuItemCopy->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnCopy),
                  NULL, this);
    this->Connect(m_menuItemCopy->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnSelectionUI), NULL,
                  this);
    this->Connect(m_menuItemPaste->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnPaste),
                  NULL, this);
    this->Connect(m_menuItemPaste->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnPasteUI), NULL,
                  this);
    this->Connect(m_menuItemCut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnCut),
                  NULL, this);
    this->Connect(m_menuItemCut->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnSelectionUI), NULL,
                  this);
    this->Connect(m_menuItemUndo->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnUndo),
                  NULL, this);
    this->Connect(m_menuItemUndo->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnUndoUI), NULL,
                  this);
    this->Connect(m_menuItemRedo->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnRedo),
                  NULL, this);
    this->Connect(m_menuItemRedo->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnRedoUI), NULL,
                  this);
    this->Connect(m_menuItemRename->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnRename), NULL, this);
    this->Connect(m_menuItemPreferences->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnSettings), NULL, this);
    this->Connect(m_menuItemFind->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnOpenFindDialog), NULL, this);
    this->Connect(m_menuItemBuild->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnBuild),
                  NULL, this);
    this->Connect(m_menuItemBuild->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnBuildUI), NULL,
                  this);
    this->Connect(m_menuItemFB->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnImportFB),
                  NULL, this);
    this->Connect(m_menuItemSmith->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnImportSmith), NULL, this);
    this->Connect(m_menuItemXRC->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnImportXRC), NULL, this);
    this->Connect(m_menuItemNewCustomControl->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnNewCustomControl), NULL, this);
    this->Connect(m_menuItemEditCustomControl->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnEditCustomControl), NULL, this);
    this->Connect(m_menuItemDeleteCustonControl->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                  wxCommandEventHandler(MainFrameBase::OnDeleteCustomControl), NULL, this);
    this->Connect(m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnAbout),
                  NULL, this);
}

MainFrameBase::~MainFrameBase()
{
    this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(MainFrameBase::OnCloseFrame), NULL, this);
    this->Disconnect(m_menuItemOpen->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnFileOpen), NULL, this);
    this->Disconnect(m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnSave),
                     NULL, this);
    this->Disconnect(m_menuItemSave->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnSaveUI), NULL,
                     this);
    this->Disconnect(m_menuItemHide->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnHide),
                     NULL, this);
    this->Disconnect(m_menuItemGenerate->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnGenerateCode), NULL, this);
    this->Disconnect(m_menuItemGenerate->GetId(), wxEVT_UPDATE_UI,
                     wxUpdateUIEventHandler(MainFrameBase::OnGenerateCodeUI), NULL, this);
    this->Disconnect(m_menuItemBatchGenerate->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnBatchGenerateCode), NULL, this);
    this->Disconnect(m_menuItemBatchGenerate->GetId(), wxEVT_UPDATE_UI,
                     wxUpdateUIEventHandler(MainFrameBase::OnBatchGenerateCodeUI), NULL, this);
    this->Disconnect(m_menuItemBackToCodelite->GetId(), wxEVT_UPDATE_UI,
                     wxUpdateUIEventHandler(MainFrameBase::OnSwitchToCodeliteUI), NULL, this);
    this->Disconnect(m_menuItemPreview->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnPreview), NULL, this);
    this->Disconnect(m_menuItemPreview->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnPreviewUI),
                     NULL, this);
    this->Disconnect(m_menuItem74->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnDeleteItem), NULL, this);
    this->Disconnect(m_menuItem74->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnDeleteItemUI),
                     NULL, this);
    this->Disconnect(m_menuItemCopy->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnCopy),
                     NULL, this);
    this->Disconnect(m_menuItemCopy->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnSelectionUI),
                     NULL, this);
    this->Disconnect(m_menuItemPaste->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnPaste), NULL, this);
    this->Disconnect(m_menuItemPaste->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnPasteUI), NULL,
                     this);
    this->Disconnect(m_menuItemCut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnCut),
                     NULL, this);
    this->Disconnect(m_menuItemCut->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnSelectionUI),
                     NULL, this);
    this->Disconnect(m_menuItemUndo->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnUndo),
                     NULL, this);
    this->Disconnect(m_menuItemUndo->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnUndoUI), NULL,
                     this);
    this->Disconnect(m_menuItemRedo->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBase::OnRedo),
                     NULL, this);
    this->Disconnect(m_menuItemRedo->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnRedoUI), NULL,
                     this);
    this->Disconnect(m_menuItemRename->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnRename), NULL, this);
    this->Disconnect(m_menuItemPreferences->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnSettings), NULL, this);
    this->Disconnect(m_menuItemFind->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnOpenFindDialog), NULL, this);
    this->Disconnect(m_menuItemBuild->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnBuild), NULL, this);
    this->Disconnect(m_menuItemBuild->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBase::OnBuildUI), NULL,
                     this);
    this->Disconnect(m_menuItemFB->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnImportFB), NULL, this);
    this->Disconnect(m_menuItemSmith->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnImportSmith), NULL, this);
    this->Disconnect(m_menuItemXRC->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnImportXRC), NULL, this);
    this->Disconnect(m_menuItemNewCustomControl->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnNewCustomControl), NULL, this);
    this->Disconnect(m_menuItemEditCustomControl->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnEditCustomControl), NULL, this);
    this->Disconnect(m_menuItemDeleteCustonControl->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnDeleteCustomControl), NULL, this);
    this->Disconnect(m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED,
                     wxCommandEventHandler(MainFrameBase::OnAbout), NULL, this);
}

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

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

    m_panelRightSidebar =
        new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    bSizer2->Add(m_panelRightSidebar, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer13 = new wxBoxSizer(wxVERTICAL);
    m_panelRightSidebar->SetSizer(bSizer13);

    m_mainSplitter = new wxSplitterWindow(m_panelRightSidebar, wxID_ANY, wxDefaultPosition,
                                          wxDLG_UNIT(m_panelRightSidebar, wxSize(-1, -1)),
                                          wxSP_LIVE_UPDATE | wxSP_NO_XP_THEME | wxSP_3DSASH);
    m_mainSplitter->SetSashGravity(1);
    m_mainSplitter->SetMinimumPaneSize(100);

    bSizer13->Add(m_mainSplitter, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panelDesigner = new wxPanel(m_mainSplitter, wxID_ANY, wxDefaultPosition,
                                  wxDLG_UNIT(m_mainSplitter, wxSize(400, -1)), wxTAB_TRAVERSAL);

    wxBoxSizer* bSizer30 = new wxBoxSizer(wxVERTICAL);
    m_panelDesigner->SetSizer(bSizer30);

    m_mainBook = new OutputNBook(m_panelDesigner, wxID_ANY, wxDefaultPosition,
                                 wxDLG_UNIT(m_panelDesigner, wxSize(-1, -1)), wxBK_DEFAULT);
    m_mainBook->SetName(wxT("m_mainBook"));

    bSizer30->Add(m_mainBook, 1, wxEXPAND, WXC_FROM_DIP(2));

    m_designerNBPage =
        new wxPanel(m_mainBook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainBook, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_mainBook->AddPage(m_designerNBPage, _("Designer"), true);

    wxBoxSizer* boxSizer10 = new wxBoxSizer(wxVERTICAL);
    m_designerNBPage->SetSizer(boxSizer10);

    m_panelToolBox = new wxPanel(m_designerNBPage, wxID_ANY, wxDefaultPosition,
                                 wxDLG_UNIT(m_designerNBPage, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    boxSizer10->Add(m_panelToolBox, 0, wxEXPAND, WXC_FROM_DIP(2));

    wxBoxSizer* bSizer301 = new wxBoxSizer(wxVERTICAL);
    m_panelToolBox->SetSizer(bSizer301);

    m_toolbar =
        new wxAuiToolBar(m_designerNBPage, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_designerNBPage, wxSize(-1, -1)),
                         wxAUI_TB_PLAIN_BACKGROUND | wxAUI_TB_DEFAULT_STYLE);
    m_toolbar->SetToolBitmapSize(wxSize(16, 16));

    boxSizer10->Add(m_toolbar, 0, wxLEFT | wxRIGHT | wxEXPAND, WXC_FROM_DIP(2));

    m_dp = new DesignerPanel(m_designerNBPage, wxID_ANY, wxDefaultPosition,
                             wxDLG_UNIT(m_designerNBPage, wxSize(-1, -1)), wxTAB_TRAVERSAL | wxHSCROLL | wxVSCROLL);
    m_dp->SetScrollRate(5, 5);

    boxSizer10->Add(m_dp, 1, wxLEFT | wxRIGHT | wxEXPAND, WXC_FROM_DIP(2));

    m_cppNBPage =
        new wxPanel(m_mainBook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainBook, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_mainBook->AddPage(m_cppNBPage, _("C++"), false);

    wxBoxSizer* boxSizer29 = new wxBoxSizer(wxVERTICAL);
    m_cppNBPage->SetSizer(boxSizer29);

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

    boxSizer29->Add(m_notebookCpp, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_cppPage = new wxPanel(m_notebookCpp, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookCpp, wxSize(-1, -1)),
                            wxTAB_TRAVERSAL);
    m_notebookCpp->AddPage(m_cppPage, _("Source"), true);

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

    m_textCtrlCppSource =
        new wxStyledTextCtrl(m_cppPage, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_cppPage, 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_textCtrlCppSourceFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlCppSourceFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_textCtrlCppSourceFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlCppSourceFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_textCtrlCppSource->SetFont(m_textCtrlCppSourceFont);
    // Configure the fold margin
    m_textCtrlCppSource->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_textCtrlCppSource->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_textCtrlCppSource->SetMarginSensitive(4, true);
    m_textCtrlCppSource->SetMarginWidth(4, 0);

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

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

    // Configure the line numbers margin
    int m_textCtrlCppSource_PixelWidth = 4 + 5 * m_textCtrlCppSource->TextWidth(wxSTC_STYLE_LINENUMBER, wxT("9"));
    m_textCtrlCppSource->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_textCtrlCppSource->SetMarginWidth(0, m_textCtrlCppSource_PixelWidth);

    // Configure the line symbol margin
    m_textCtrlCppSource->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_textCtrlCppSource->SetMarginMask(3, 0);
    m_textCtrlCppSource->SetMarginWidth(3, 1);
    // Select the lexer
    m_textCtrlCppSource->SetLexer(wxSTC_LEX_CPP);
    // Set default font / styles
    m_textCtrlCppSource->StyleClearAll();
    for(int i = 0; i < wxSTC_STYLE_MAX; ++i) {
        m_textCtrlCppSource->StyleSetFont(i, m_textCtrlCppSourceFont);
    }
    m_textCtrlCppSource->SetWrapMode(0);
    m_textCtrlCppSource->SetIndentationGuides(3);
    m_textCtrlCppSource->SetEOLMode(2);
    m_textCtrlCppSource->SetKeyWords(
        0, wxT("and and_eq asm auto bitand bitor bool break case catch char class compl const const_cast continue "
               "default delete do double dynamic_cast else enum explicit export extern false float for friend goto if "
               "inline int long mutable namespace new not not_eq operator or or_eq private protected public register "
               "reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true "
               "try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq "
               "alignas alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local"));
    m_textCtrlCppSource->SetKeyWords(1, wxT(""));
    m_textCtrlCppSource->SetKeyWords(2, wxT(""));
    m_textCtrlCppSource->SetKeyWords(3, wxT(""));
    m_textCtrlCppSource->SetKeyWords(4, wxT(""));

    boxSizer19->Add(m_textCtrlCppSource, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_headerPage = new wxPanel(m_notebookCpp, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookCpp, wxSize(-1, -1)),
                               wxTAB_TRAVERSAL);
    m_notebookCpp->AddPage(m_headerPage, _("Header"), false);

    wxBoxSizer* boxSizer21 = new wxBoxSizer(wxVERTICAL);
    m_headerPage->SetSizer(boxSizer21);

    m_textCtrlHeaderSource =
        new wxStyledTextCtrl(m_headerPage, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_headerPage, 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_textCtrlHeaderSourceFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlHeaderSourceFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_textCtrlHeaderSourceFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlHeaderSourceFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_textCtrlHeaderSource->SetFont(m_textCtrlHeaderSourceFont);
    // Configure the fold margin
    m_textCtrlHeaderSource->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_textCtrlHeaderSource->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_textCtrlHeaderSource->SetMarginSensitive(4, true);
    m_textCtrlHeaderSource->SetMarginWidth(4, 0);

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

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

    // Configure the line numbers margin
    int m_textCtrlHeaderSource_PixelWidth = 4 + 5 * m_textCtrlHeaderSource->TextWidth(wxSTC_STYLE_LINENUMBER, wxT("9"));
    m_textCtrlHeaderSource->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_textCtrlHeaderSource->SetMarginWidth(0, m_textCtrlHeaderSource_PixelWidth);

    // Configure the line symbol margin
    m_textCtrlHeaderSource->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_textCtrlHeaderSource->SetMarginMask(3, 0);
    m_textCtrlHeaderSource->SetMarginWidth(3, 1);
    // Select the lexer
    m_textCtrlHeaderSource->SetLexer(wxSTC_LEX_CPP);
    // Set default font / styles
    m_textCtrlHeaderSource->StyleClearAll();
    for(int i = 0; i < wxSTC_STYLE_MAX; ++i) {
        m_textCtrlHeaderSource->StyleSetFont(i, m_textCtrlHeaderSourceFont);
    }
    m_textCtrlHeaderSource->SetWrapMode(0);
    m_textCtrlHeaderSource->SetIndentationGuides(0);
    m_textCtrlHeaderSource->SetEOLMode(2);
    m_textCtrlHeaderSource->SetKeyWords(
        0, wxT("and and_eq asm auto bitand bitor bool break case catch char class compl const const_cast continue "
               "default delete do double dynamic_cast else enum explicit export extern false float for friend goto if "
               "inline int long mutable namespace new not not_eq operator or or_eq private protected public register "
               "reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true "
               "try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq "
               "alignas alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local"));
    m_textCtrlHeaderSource->SetKeyWords(1, wxT(""));
    m_textCtrlHeaderSource->SetKeyWords(2, wxT(""));
    m_textCtrlHeaderSource->SetKeyWords(3, wxT(""));
    m_textCtrlHeaderSource->SetKeyWords(4, wxT(""));

    boxSizer21->Add(m_textCtrlHeaderSource, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_xrcNBPage =
        new wxPanel(m_mainBook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainBook, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_mainBook->AddPage(m_xrcNBPage, _("XRC"), false);

    wxBoxSizer* boxSizer15 = new wxBoxSizer(wxVERTICAL);
    m_xrcNBPage->SetSizer(boxSizer15);

    m_textCtrlXrc =
        new wxStyledTextCtrl(m_xrcNBPage, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_xrcNBPage, 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_textCtrlXrcFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlXrcFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
    wxFont m_textCtrlXrcFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlXrcFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
    m_textCtrlXrc->SetFont(m_textCtrlXrcFont);
    // Configure the fold margin
    m_textCtrlXrc->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_textCtrlXrc->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_textCtrlXrc->SetMarginSensitive(4, true);
    m_textCtrlXrc->SetMarginWidth(4, 0);

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

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

    // Configure the line numbers margin
    int m_textCtrlXrc_PixelWidth = 4 + 5 * m_textCtrlXrc->TextWidth(wxSTC_STYLE_LINENUMBER, wxT("9"));
    m_textCtrlXrc->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_textCtrlXrc->SetMarginWidth(0, m_textCtrlXrc_PixelWidth);

    // Configure the line symbol margin
    m_textCtrlXrc->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_textCtrlXrc->SetMarginMask(3, 0);
    m_textCtrlXrc->SetMarginWidth(3, 1);
    // Select the lexer
    m_textCtrlXrc->SetLexer(wxSTC_LEX_XML);
    // Set default font / styles
    m_textCtrlXrc->StyleClearAll();
    for(int i = 0; i < wxSTC_STYLE_MAX; ++i) {
        m_textCtrlXrc->StyleSetFont(i, m_textCtrlXrcFont);
    }
    m_textCtrlXrc->SetWrapMode(0);
    m_textCtrlXrc->SetIndentationGuides(0);
    m_textCtrlXrc->SetKeyWords(0, wxT(""));
    m_textCtrlXrc->SetKeyWords(1, wxT(""));
    m_textCtrlXrc->SetKeyWords(2, wxT(""));
    m_textCtrlXrc->SetKeyWords(3, wxT(""));
    m_textCtrlXrc->SetKeyWords(4, wxT(""));

    boxSizer15->Add(m_textCtrlXrc, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_infobarLicense = new wxInfoBar(m_panelDesigner, wxID_ANY);
    m_infobarLicense->SetSize(wxDLG_UNIT(m_panelDesigner, wxSize(0, 0)));
    m_infobarLicense->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
    m_infobarLicense->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));

    bSizer30->Add(m_infobarLicense, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_infobarLicense->AddButton(ID_DOWNLOAD, _("Register"));

    m_infobarLicense->AddButton(wxID_CLOSE, _("Close"));

    m_panel10 = new wxPanel(m_mainSplitter, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainSplitter, wxSize(150, -1)),
                            wxTAB_TRAVERSAL);
    m_mainSplitter->SplitVertically(m_panelDesigner, m_panel10, -1);

    wxBoxSizer* bSizer12 = new wxBoxSizer(wxVERTICAL);
    m_panel10->SetSizer(bSizer12);

    m_secondarySash =
        new wxSplitterWindow(m_panel10, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel10, wxSize(-1, -1)),
                             wxSP_LIVE_UPDATE | wxSP_NO_XP_THEME | wxSP_3DSASH | wxTAB_TRAVERSAL);
    m_secondarySash->SetSashGravity(0.5);
    m_secondarySash->SetMinimumPaneSize(50);

    bSizer12->Add(m_secondarySash, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panel14 = new wxPanel(m_secondarySash, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_secondarySash, wxSize(150, 100)),
                            wxTAB_TRAVERSAL);

    wxBoxSizer* bSizer29 = new wxBoxSizer(wxVERTICAL);
    m_panel14->SetSizer(bSizer29);

    m_panelProperties =
        new wxPanel(m_panel14, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel14, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    bSizer29->Add(m_panelProperties, 1, wxALL | wxEXPAND, WXC_FROM_DIP(2));

    wxBoxSizer* bSizer19 = new wxBoxSizer(wxVERTICAL);
    m_panelProperties->SetSizer(bSizer19);

    m_panel15 = new wxPanel(m_secondarySash, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_secondarySash, wxSize(150, -1)),
                            wxTAB_TRAVERSAL);
    m_secondarySash->SplitHorizontally(m_panel14, m_panel15, 0);

    wxBoxSizer* bSizer16 = new wxBoxSizer(wxVERTICAL);
    m_panel15->SetSizer(bSizer16);

    m_notebook2 = new wxNotebook(m_panel15, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel15, wxSize(-1, -1)), 0);
    m_notebook2->SetName(wxT("m_notebook2"));

    bSizer16->Add(m_notebook2, 1, wxALL | wxEXPAND, WXC_FROM_DIP(2));

    m_panelStyles =
        new wxPanel(m_notebook2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook2, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook2->AddPage(m_panelStyles, _("Styles"), true);

    wxBoxSizer* bSizer11 = new wxBoxSizer(wxHORIZONTAL);
    m_panelStyles->SetSizer(bSizer11);

    wxArrayString m_pgMgrStylesArr;
    wxUnusedVar(m_pgMgrStylesArr);
    wxArrayInt m_pgMgrStylesIntArr;
    wxUnusedVar(m_pgMgrStylesIntArr);
    m_pgMgrStyles =
        new wxPropertyGridManager(m_panelStyles, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelStyles, wxSize(-1, -1)),
                                  wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED);

    bSizer11->Add(m_pgMgrStyles, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panelSizerFlags =
        new wxPanel(m_notebook2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook2, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook2->AddPage(m_panelSizerFlags, _("Sizer Flags"), false);

    wxBoxSizer* bSizer101 = new wxBoxSizer(wxVERTICAL);
    m_panelSizerFlags->SetSizer(bSizer101);

    wxArrayString m_pgMgrSizerFlagsArr;
    wxUnusedVar(m_pgMgrSizerFlagsArr);
    wxArrayInt m_pgMgrSizerFlagsIntArr;
    wxUnusedVar(m_pgMgrSizerFlagsIntArr);
    m_pgMgrSizerFlags = new wxPropertyGridManager(m_panelSizerFlags, wxID_ANY, wxDefaultPosition,
                                                  wxDLG_UNIT(m_panelSizerFlags, wxSize(-1, -1)),
                                                  wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED);

    bSizer101->Add(m_pgMgrSizerFlags, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panelAuiPaneInfo =
        new wxPanel(m_notebook2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook2, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebook2->AddPage(m_panelAuiPaneInfo, _("wxAuiPaneInfo"), false);

    wxBoxSizer* bSizer25 = new wxBoxSizer(wxVERTICAL);
    m_panelAuiPaneInfo->SetSizer(bSizer25);

    wxArrayString m_pgMgrAuiPropertiesArr;
    wxUnusedVar(m_pgMgrAuiPropertiesArr);
    wxArrayInt m_pgMgrAuiPropertiesIntArr;
    wxUnusedVar(m_pgMgrAuiPropertiesIntArr);
    m_pgMgrAuiProperties = new wxPropertyGridManager(m_panelAuiPaneInfo, wxID_ANY, wxDefaultPosition,
                                                     wxDLG_UNIT(m_panelAuiPaneInfo, wxSize(-1, -1)),
                                                     wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED);

    bSizer25->Add(m_pgMgrAuiProperties, 1, wxEXPAND, WXC_FROM_DIP(5));

    SetName(wxT("GUICraftMainPanelBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    // Connect events
    m_mainBook->Connect(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
                        wxBookCtrlEventHandler(GUICraftMainPanelBase::OnPageChanged), NULL, this);
    m_notebookCpp->Connect(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
                           wxBookCtrlEventHandler(GUICraftMainPanelBase::OnCppBookPageChanged), NULL, this);
    m_infobarLicense->Connect(ID_DOWNLOAD, wxEVT_COMMAND_BUTTON_CLICKED,
                              wxCommandEventHandler(GUICraftMainPanelBase::OnRegisterWxCrafter), NULL, this);
    m_infobarLicense->Connect(wxID_CLOSE, wxEVT_COMMAND_BUTTON_CLICKED,
                              wxCommandEventHandler(GUICraftMainPanelBase::OnCloseLicenseMessage), NULL, this);
    m_pgMgrStyles->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(GUICraftMainPanelBase::OnStylesChanged), NULL,
                           this);
    m_pgMgrSizerFlags->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(GUICraftMainPanelBase::OnSizerFlagsChanged),
                               NULL, this);
    m_pgMgrSizerFlags->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GUICraftMainPanelBase::OnSizerFlagsUpdateUI),
                               NULL, this);
    m_pgMgrAuiProperties->Connect(wxEVT_PG_CHANGED,
                                  wxPropertyGridEventHandler(GUICraftMainPanelBase::OnAuiPaneInfoChanged), NULL, this);
}

GUICraftMainPanelBase::~GUICraftMainPanelBase()
{
    m_mainBook->Disconnect(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
                           wxBookCtrlEventHandler(GUICraftMainPanelBase::OnPageChanged), NULL, this);
    m_notebookCpp->Disconnect(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
                              wxBookCtrlEventHandler(GUICraftMainPanelBase::OnCppBookPageChanged), NULL, this);
    m_infobarLicense->Disconnect(ID_DOWNLOAD, wxEVT_COMMAND_BUTTON_CLICKED,
                                 wxCommandEventHandler(GUICraftMainPanelBase::OnRegisterWxCrafter), NULL, this);
    m_infobarLicense->Disconnect(wxID_CLOSE, wxEVT_COMMAND_BUTTON_CLICKED,
                                 wxCommandEventHandler(GUICraftMainPanelBase::OnCloseLicenseMessage), NULL, this);
    m_pgMgrStyles->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(GUICraftMainPanelBase::OnStylesChanged),
                              NULL, this);
    m_pgMgrSizerFlags->Disconnect(wxEVT_PG_CHANGED,
                                  wxPropertyGridEventHandler(GUICraftMainPanelBase::OnSizerFlagsChanged), NULL, this);
    m_pgMgrSizerFlags->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GUICraftMainPanelBase::OnSizerFlagsUpdateUI),
                                  NULL, this);
    m_pgMgrAuiProperties->Disconnect(
        wxEVT_PG_CHANGED, wxPropertyGridEventHandler(GUICraftMainPanelBase::OnAuiPaneInfoChanged), NULL, this);
}

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

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

    m_mainPanel = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                       wxTAB_TRAVERSAL | wxHSCROLL | wxVSCROLL);
    m_mainPanel->SetScrollRate(5, 5);

    bSizer10->Add(m_mainPanel, 1, wxEXPAND, WXC_FROM_DIP(5));

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

    SetName(wxT("PropertiesSheetBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
}

PropertiesSheetBase::~PropertiesSheetBase() {}

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

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

    wxBoxSizer* bSizer16 = new wxBoxSizer(wxVERTICAL);

    bSizer14->Add(bSizer16, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    bSizer16->Add(m_staticTextMessage, 0, wxALL | wxEXPAND, WXC_FROM_DIP(2));

    m_stc = new wxStyledTextCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    // Configure the fold margin
    m_stc->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_stc->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_stc->SetMarginSensitive(4, true);
    m_stc->SetMarginWidth(4, 0);

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

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

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

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

    bSizer16->Add(m_stc, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer234 = new wxStdDialogButtonSizer();

    bSizer14->Add(m_stdBtnSizer234, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

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

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

    SetName(wxT("EnterStringsDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
}

EnterStringsDlgBase::~EnterStringsDlgBase() {}

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

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

    m_panel11 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    bSizer23->Add(m_panel11, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxGridSizer* gSizer1 = new wxGridSizer(0, 2, 0, 0);
    m_panel11->SetSizer(gSizer1);

    wxBoxSizer* bSizer24 = new wxBoxSizer(wxHORIZONTAL);

    bSizer23->Add(bSizer24, 0, wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

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

    bSizer24->Add(m_button6, 0, wxALL, WXC_FROM_DIP(5));

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

    bSizer24->Add(m_button7, 0, wxALL, WXC_FROM_DIP(5));

    SetName(wxT("ColorPaletteDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
}

ColorPaletteDlgBase::~ColorPaletteDlgBase() {}

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

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

    wxBoxSizer* bSizer25 = new wxBoxSizer(wxHORIZONTAL);

    bSizer21->Add(bSizer25, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxArrayString m_choiceStandardColorsArr;
    m_choiceStandardColorsArr.Add(wxT("<Default>"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_SCROLLBAR"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_DESKTOP"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_ACTIVECAPTION"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_INACTIVECAPTION"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_MENU"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_WINDOW"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_WINDOWFRAME"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_MENUTEXT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_WINDOWTEXT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_CAPTIONTEXT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_ACTIVEBORDER"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_INACTIVEBORDER"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_APPWORKSPACE"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_HIGHLIGHT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_HIGHLIGHTTEXT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_BTNFACE"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_BTNSHADOW"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_GRAYTEXT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_BTNTEXT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_INACTIVECAPTIONTEXT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_BTNHIGHLIGHT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_3DDKSHADOW"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_3DLIGHT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_INFOTEXT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_INFOBK"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_LISTBOX"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_HOTLIGHT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_GRADIENTACTIVECAPTION"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_GRADIENTINACTIVECAPTION"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_MENUHILIGHT"));
    m_choiceStandardColorsArr.Add(wxT("wxSYS_COLOUR_MENUBAR"));
    m_choiceStandardColors =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceStandardColorsArr, 0);
    m_choiceStandardColors->SetToolTip(_("Select a standard color from the list below"));
    m_choiceStandardColors->SetSelection(0);

    bSizer25->Add(m_choiceStandardColors, 1, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_button5 = new wxButton(this, wxID_ANY, _("Custom Colour..."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                             wxBU_EXACTFIT);
    m_button5->SetToolTip(_("Select custom color..."));

    bSizer25->Add(m_button5, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_panelColorPreview =
        new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, 24)), wxTAB_TRAVERSAL);

    bSizer21->Add(m_panelColorPreview, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer26 = new wxBoxSizer(wxHORIZONTAL);

    bSizer21->Add(bSizer26, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

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

    bSizer26->Add(m_button8, 0, wxALL, WXC_FROM_DIP(5));

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

    bSizer26->Add(m_button11, 0, wxALL, WXC_FROM_DIP(5));

    SetName(wxT("ColourPickerDlgbase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_choiceStandardColors->Connect(wxEVT_COMMAND_CHOICE_SELECTED,
                                    wxCommandEventHandler(ColourPickerDlgbase::OnStandardColorSelected), NULL, this);
    m_button5->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ColourPickerDlgbase::OnSelectColor), NULL,
                       this);
    m_panelColorPreview->Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(ColourPickerDlgbase::OnErasePreviewColor),
                                 NULL, this);
    m_panelColorPreview->Connect(wxEVT_PAINT, wxPaintEventHandler(ColourPickerDlgbase::OnPaintPreviewColor), NULL,
                                 this);
}

ColourPickerDlgbase::~ColourPickerDlgbase()
{
    m_choiceStandardColors->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED,
                                       wxCommandEventHandler(ColourPickerDlgbase::OnStandardColorSelected), NULL, this);
    m_button5->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ColourPickerDlgbase::OnSelectColor), NULL,
                          this);
    m_panelColorPreview->Disconnect(wxEVT_ERASE_BACKGROUND,
                                    wxEraseEventHandler(ColourPickerDlgbase::OnErasePreviewColor), NULL, this);
    m_panelColorPreview->Disconnect(wxEVT_PAINT, wxPaintEventHandler(ColourPickerDlgbase::OnPaintPreviewColor), NULL,
                                    this);
}

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

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

    wxBoxSizer* boxSizer145 = new wxBoxSizer(wxVERTICAL);

    boxSizer122->Add(boxSizer145, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxStaticBoxSizer* staticBoxSizer150 =
        new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("General:")), wxVERTICAL);

    boxSizer145->Add(staticBoxSizer150, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxUseTRay = new wxCheckBox(this, wxID_ANY, _("Close button minimizes wxCrafter to the tray"),
                                       wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxUseTRay->SetValue(false);
    m_checkBoxUseTRay->SetToolTip(_("Close button minimizes wxCrafter to the tray"));

    staticBoxSizer150->Add(m_checkBoxUseTRay, 0, wxALL, WXC_FROM_DIP(5));

    wxStaticBoxSizer* staticBoxSizer152 =
        new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Code Generation:")), wxVERTICAL);

    boxSizer145->Add(staticBoxSizer152, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxSizersAsMembers = new wxCheckBox(this, wxID_ANY, _("Keep wxSizers as class members"), wxDefaultPosition,
                                               wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxSizersAsMembers->SetValue(false);

    staticBoxSizer152->Add(m_checkBoxSizersAsMembers, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxFormatInheritedFiles = new wxCheckBox(this, wxID_ANY, _("Format inherited files"), wxDefaultPosition,
                                                    wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxFormatInheritedFiles->SetValue(false);
    m_checkBoxFormatInheritedFiles->SetToolTip(
        _("When e.g. a new eventhandler is added, wxCrafter helpfully adds an empty handler to the derived class as "
          "well as to the generated base-class. If this box is ticked, the whole of the inherited header and "
          "implementation files will be formatted each time this is done."));

    staticBoxSizer152->Add(m_checkBoxFormatInheritedFiles, 0, wxALL, WXC_FROM_DIP(5));

    wxStaticBoxSizer* staticBoxSizer15212 =
        new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Duplicating and Pasting:")), wxVERTICAL);

    boxSizer145->Add(staticBoxSizer15212, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText215 = new wxStaticText(this, wxID_ANY,
                                       _("What should happen when duplicating or pasting a top-level window,\nor "
                                         "pasting some contents from one top-level window to another?"),
                                       wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    staticBoxSizer15212->Add(m_staticText215, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxKeepAllUsersetNames =
        new wxCheckBox(this, wxID_ANY, _("Leave unchanged any user-set names of child controls"), wxDefaultPosition,
                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxKeepAllUsersetNames->SetValue(false);
    m_checkBoxKeepAllUsersetNames->SetToolTip(
        _("You can't have two top-level windows with the same name, but you can have FooBase::m_textEntry and "
          "BarBase::m_textEntry.\nTick this box if you want to keep such names the same, convenient if you already "
          "have Foo code that references them that you want to copy to Bar; but you don't need to keep autogenerated "
          "names like m_text153."));

    staticBoxSizer15212->Add(m_checkBoxKeepAllUsersetNames, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxKeepAllPossibleNames =
        new wxCheckBox(this, wxID_ANY, _("Leave unchanged the names of all child controls"), wxDefaultPosition,
                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxKeepAllPossibleNames->SetValue(false);
    m_checkBoxKeepAllPossibleNames->SetToolTip(
        _("You can't have two top-level windows with the same name, but you can have FooBase::m_text123 and "
          "BarBase::m_text123.\nTick this box if you want to keep such names the same; convenient if you already have "
          "Foo code that references them that you want to copy to Bar."));

    staticBoxSizer15212->Add(m_checkBoxKeepAllPossibleNames, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxCopyEventhandlerToo = new wxCheckBox(this, wxID_ANY, _("Copy any event-handlers too"), wxDefaultPosition,
                                                   wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxCopyEventhandlerToo->SetValue(false);
    m_checkBoxCopyEventhandlerToo->SetToolTip(
        _("If the class that you're duplicating has e.g. a wxTextCtrl with a  wxEVT_COMMAND_TEXT_ENTER event-handler "
          "set, if this box is ticked the textctrl in duplicate class will also have that event-handler."));

    staticBoxSizer15212->Add(m_checkBoxCopyEventhandlerToo, 0, wxALL, WXC_FROM_DIP(5));

    m_stdBtnSizer264 = new wxStdDialogButtonSizer();

    boxSizer122->Add(m_stdBtnSizer264, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

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

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

    SetName(wxT("wxcSettingsDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_checkBoxUseTRay->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxcSettingsDlgBase::OnMinimizeToTrayUI), NULL,
                               this);
    m_button266->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxcSettingsDlgBase::OnOk), NULL, this);
}

wxcSettingsDlgBase::~wxcSettingsDlgBase()
{
    m_checkBoxUseTRay->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxcSettingsDlgBase::OnMinimizeToTrayUI), NULL,
                                  this);
    m_button266->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxcSettingsDlgBase::OnOk), NULL, this);
}

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

    SetName(wxT("CaptionBarBase"));
    SetSize(wxDLG_UNIT(this, wxSize(150, 24)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    // Connect events
    this->Connect(wxEVT_PAINT, wxPaintEventHandler(CaptionBarBase::OnPaint), NULL, this);
    this->Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(CaptionBarBase::OnEraseBG), NULL, this);
    this->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(CaptionBarBase::OnLeftDown), NULL, this);
}

CaptionBarBase::~CaptionBarBase()
{
    this->Disconnect(wxEVT_PAINT, wxPaintEventHandler(CaptionBarBase::OnPaint), NULL, this);
    this->Disconnect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(CaptionBarBase::OnEraseBG), NULL, this);
    this->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(CaptionBarBase::OnLeftDown), NULL, this);
}

wxcImages::wxcImages()
    : wxImageList(16, 16, true)
    , m_imagesWidth(16)
    , m_imagesHeight(16)
{
    if(!bBitmapLoaded) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC2AC4InitBitmapResources();
        bBitmapLoaded = true;
    }

    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("button_close"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())) {
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("button_close"), bmp));
        }
    }

    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("button_minimize"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())) {
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("button_minimize"), bmp));
        }
    }

    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("button_maximize"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())) {
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("button_maximize"), bmp));
        }
    }

    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("wxc_icon"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())) {
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("wxc_icon"), bmp));
        }
    }
}

wxcImages::~wxcImages() {}

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

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

    m_staticText270 = new wxStaticText(
        this, wxID_ANY,
        _("wxCrafter may be evaluated for free\nHowever, a license must be purchased for continued use."),
        wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer250->Add(m_staticText270, 0, wxALL | wxEXPAND, WXC_FROM_DIP(10));

    m_cmdLnkBtnPurchase = new wxCommandLinkButton(this, wxID_ANY, _("Purchase"), _("Purchase wxCrafter"),
                                                  wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer250->Add(m_cmdLnkBtnPurchase, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_cmdLnkBtnCancel = new wxCommandLinkButton(this, wxID_ANY, _("Evaluate"), _("Continue with trial version"),
                                                wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer250->Add(m_cmdLnkBtnCancel, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    SetName(wxT("FreeTrialVersionDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_cmdLnkBtnPurchase->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
                                 wxCommandEventHandler(FreeTrialVersionDlgBase::OnPurchase), NULL, this);
    m_cmdLnkBtnCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FreeTrialVersionDlgBase::OnTrial),
                               NULL, this);
}

FreeTrialVersionDlgBase::~FreeTrialVersionDlgBase()
{
    m_cmdLnkBtnPurchase->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
                                    wxCommandEventHandler(FreeTrialVersionDlgBase::OnPurchase), NULL, this);
    m_cmdLnkBtnCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FreeTrialVersionDlgBase::OnTrial),
                                  NULL, this);
}
