////////////////////////////////////////////////////////////////////// // 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(); 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 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; } this->Hide(); 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 | wxTRANSPARENT_WINDOW); 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_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_menuItemHide = new wxMenuItem(m_menuFile, XRCID("hide_designer"), _("&Close"), _("Hide the designer"), wxITEM_NORMAL); m_menuFile->Append(m_menuItemHide); 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(!wxPersistenceManager::Get().Find(this)) { wxPersistenceManager::Get().RegisterAndRestore(this); } else { wxPersistenceManager::Get().Restore(this); } // Connect events this->Bind(wxEVT_CLOSE_WINDOW, &MainFrameBase::OnCloseFrame, this); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnFileOpen, this, m_menuItemOpen->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnSave, this, m_menuItemSave->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnSaveUI, this, m_menuItemSave->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnGenerateCode, this, m_menuItemGenerate->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnGenerateCodeUI, this, m_menuItemGenerate->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnBatchGenerateCode, this, m_menuItemBatchGenerate->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnBatchGenerateCodeUI, this, m_menuItemBatchGenerate->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnHide, this, m_menuItemHide->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnPreview, this, m_menuItemPreview->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnPreviewUI, this, m_menuItemPreview->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnDeleteItem, this, m_menuItem74->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnDeleteItemUI, this, m_menuItem74->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnCopy, this, m_menuItemCopy->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnSelectionUI, this, m_menuItemCopy->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnPaste, this, m_menuItemPaste->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnPasteUI, this, m_menuItemPaste->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnCut, this, m_menuItemCut->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnSelectionUI, this, m_menuItemCut->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnUndo, this, m_menuItemUndo->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnUndoUI, this, m_menuItemUndo->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnRedo, this, m_menuItemRedo->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnRedoUI, this, m_menuItemRedo->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnRename, this, m_menuItemRename->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnSettings, this, m_menuItemPreferences->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnOpenFindDialog, this, m_menuItemFind->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnBuild, this, m_menuItemBuild->GetId()); this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnBuildUI, this, m_menuItemBuild->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportFB, this, m_menuItemFB->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportSmith, this, m_menuItemSmith->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportXRC, this, m_menuItemXRC->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnNewCustomControl, this, m_menuItemNewCustomControl->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnEditCustomControl, this, m_menuItemEditCustomControl->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnDeleteCustomControl, this, m_menuItemDeleteCustonControl->GetId()); this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnAbout, this, m_menuItemAbout->GetId()); } MainFrameBase::~MainFrameBase() { this->Unbind(wxEVT_CLOSE_WINDOW, &MainFrameBase::OnCloseFrame, this); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnFileOpen, this, m_menuItemOpen->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnSave, this, m_menuItemSave->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnSaveUI, this, m_menuItemSave->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnGenerateCode, this, m_menuItemGenerate->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnGenerateCodeUI, this, m_menuItemGenerate->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnBatchGenerateCode, this, m_menuItemBatchGenerate->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnBatchGenerateCodeUI, this, m_menuItemBatchGenerate->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnHide, this, m_menuItemHide->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnPreview, this, m_menuItemPreview->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnPreviewUI, this, m_menuItemPreview->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnDeleteItem, this, m_menuItem74->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnDeleteItemUI, this, m_menuItem74->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnCopy, this, m_menuItemCopy->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnSelectionUI, this, m_menuItemCopy->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnPaste, this, m_menuItemPaste->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnPasteUI, this, m_menuItemPaste->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnCut, this, m_menuItemCut->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnSelectionUI, this, m_menuItemCut->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnUndo, this, m_menuItemUndo->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnUndoUI, this, m_menuItemUndo->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnRedo, this, m_menuItemRedo->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnRedoUI, this, m_menuItemRedo->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnRename, this, m_menuItemRename->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnSettings, this, m_menuItemPreferences->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnOpenFindDialog, this, m_menuItemFind->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnBuild, this, m_menuItemBuild->GetId()); this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnBuildUI, this, m_menuItemBuild->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportFB, this, m_menuItemFB->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportSmith, this, m_menuItemSmith->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportXRC, this, m_menuItemXRC->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnNewCustomControl, this, m_menuItemNewCustomControl->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnEditCustomControl, this, m_menuItemEditCustomControl->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnDeleteCustomControl, this, m_menuItemDeleteCustonControl->GetId()); this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnAbout, this, m_menuItemAbout->GetId()); } 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 | wxTRANSPARENT_WINDOW); m_mainSplitter->SetSashGravity(1); m_mainSplitter->SetMinimumPaneSize(10); bSizer13->Add(m_mainSplitter, 1, wxEXPAND, WXC_FROM_DIP(5)); m_panelDesigner = new wxPanel(m_mainSplitter, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainSplitter, wxSize(-1, -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)), 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_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)), 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_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)), 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_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_panel10 = new wxPanel(m_mainSplitter, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainSplitter, wxSize(100, -1)), wxTAB_TRAVERSAL); m_mainSplitter->SplitVertically(m_panelDesigner, m_panel10, -1); wxBoxSizer* bSizer12 = new wxBoxSizer(wxVERTICAL); m_panel10->SetSizer(bSizer12); m_notebook2 = new wxNotebook(m_panel10, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel10, wxSize(-1, -1)), 0); m_notebook2->SetName(wxT("m_notebook2")); bSizer12->Add(m_notebook2, 1, wxALL | wxEXPAND, WXC_FROM_DIP(2)); m_pageProps = new wxPanel(m_notebook2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook2, wxSize(-1, -1)), wxTAB_TRAVERSAL); m_notebook2->AddPage(m_pageProps, _("Properties"), true); wxBoxSizer* boxSizer317 = new wxBoxSizer(wxVERTICAL); m_pageProps->SetSizer(boxSizer317); m_panelProperties = new wxPanel(m_pageProps, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_pageProps, wxSize(-1, -1)), wxTAB_TRAVERSAL); boxSizer317->Add(m_panelProperties, 1, wxEXPAND, WXC_FROM_DIP(2)); wxBoxSizer* bSizer19 = new wxBoxSizer(wxVERTICAL); m_panelProperties->SetSizer(bSizer19); m_panelStyles = new wxPanel(m_notebook2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook2, wxSize(-1, -1)), wxTAB_TRAVERSAL); m_notebook2->AddPage(m_panelStyles, _("Styles"), false); 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->Bind(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, &GUICraftMainPanelBase::OnPageChanged, this); m_notebookCpp->Bind(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, &GUICraftMainPanelBase::OnCppBookPageChanged, this); m_pgMgrStyles->Bind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnStylesChanged, this); m_pgMgrSizerFlags->Bind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnSizerFlagsChanged, this); m_pgMgrSizerFlags->Bind(wxEVT_UPDATE_UI, &GUICraftMainPanelBase::OnSizerFlagsUpdateUI, this); m_pgMgrAuiProperties->Bind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnAuiPaneInfoChanged, this); } GUICraftMainPanelBase::~GUICraftMainPanelBase() { m_mainBook->Unbind(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, &GUICraftMainPanelBase::OnPageChanged, this); m_notebookCpp->Unbind(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, &GUICraftMainPanelBase::OnCppBookPageChanged, this); m_pgMgrStyles->Unbind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnStylesChanged, this); m_pgMgrSizerFlags->Unbind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnSizerFlagsChanged, this); m_pgMgrSizerFlags->Unbind(wxEVT_UPDATE_UI, &GUICraftMainPanelBase::OnSizerFlagsUpdateUI, this); m_pgMgrAuiProperties->Unbind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnAuiPaneInfoChanged, 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)), wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit()); // 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(!wxPersistenceManager::Get().Find(this)) { wxPersistenceManager::Get().RegisterAndRestore(this); } else { wxPersistenceManager::Get().Restore(this); } } 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(!wxPersistenceManager::Get().Find(this)) { wxPersistenceManager::Get().RegisterAndRestore(this); } else { wxPersistenceManager::Get().Restore(this); } } 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(_("")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_SCROLLBAR")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_DESKTOP")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_ACTIVECAPTION")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_INACTIVECAPTION")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_MENU")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_WINDOW")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_WINDOWFRAME")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_MENUTEXT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_WINDOWTEXT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_CAPTIONTEXT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_ACTIVEBORDER")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_INACTIVEBORDER")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_APPWORKSPACE")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_HIGHLIGHT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_HIGHLIGHTTEXT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_BTNFACE")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_BTNSHADOW")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_GRAYTEXT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_BTNTEXT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_INACTIVECAPTIONTEXT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_BTNHIGHLIGHT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_3DDKSHADOW")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_3DLIGHT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_INFOTEXT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_INFOBK")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_LISTBOX")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_HOTLIGHT")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_GRADIENTACTIVECAPTION")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_GRADIENTINACTIVECAPTION")); m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_MENUHILIGHT")); m_choiceStandardColorsArr.Add(_("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(!wxPersistenceManager::Get().Find(this)) { wxPersistenceManager::Get().RegisterAndRestore(this); } else { wxPersistenceManager::Get().Restore(this); } // Connect events m_choiceStandardColors->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &ColourPickerDlgbase::OnStandardColorSelected, this); m_button5->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ColourPickerDlgbase::OnSelectColor, this); m_panelColorPreview->Bind(wxEVT_ERASE_BACKGROUND, &ColourPickerDlgbase::OnErasePreviewColor, this); m_panelColorPreview->Bind(wxEVT_PAINT, &ColourPickerDlgbase::OnPaintPreviewColor, this); } ColourPickerDlgbase::~ColourPickerDlgbase() { m_choiceStandardColors->Unbind(wxEVT_COMMAND_CHOICE_SELECTED, &ColourPickerDlgbase::OnStandardColorSelected, this); m_button5->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &ColourPickerDlgbase::OnSelectColor, this); m_panelColorPreview->Unbind(wxEVT_ERASE_BACKGROUND, &ColourPickerDlgbase::OnErasePreviewColor, this); m_panelColorPreview->Unbind(wxEVT_PAINT, &ColourPickerDlgbase::OnPaintPreviewColor, 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_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(!wxPersistenceManager::Get().Find(this)) { wxPersistenceManager::Get().RegisterAndRestore(this); } else { wxPersistenceManager::Get().Restore(this); } // Connect events m_checkBoxUseTRay->Bind(wxEVT_UPDATE_UI, &wxcSettingsDlgBase::OnMinimizeToTrayUI, this); m_button266->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &wxcSettingsDlgBase::OnOk, this); } wxcSettingsDlgBase::~wxcSettingsDlgBase() { m_checkBoxUseTRay->Unbind(wxEVT_UPDATE_UI, &wxcSettingsDlgBase::OnMinimizeToTrayUI, this); m_button266->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &wxcSettingsDlgBase::OnOk, 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->Bind(wxEVT_PAINT, &CaptionBarBase::OnPaint, this); this->Bind(wxEVT_ERASE_BACKGROUND, &CaptionBarBase::OnEraseBG, this); this->Bind(wxEVT_LEFT_DOWN, &CaptionBarBase::OnLeftDown, this); } CaptionBarBase::~CaptionBarBase() { this->Unbind(wxEVT_PAINT, &CaptionBarBase::OnPaint, this); this->Unbind(wxEVT_ERASE_BACKGROUND, &CaptionBarBase::OnEraseBG, this); this->Unbind(wxEVT_LEFT_DOWN, &CaptionBarBase::OnLeftDown, 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() {}