| 1 |
////////////////////////////////////////////////////////////////////// |
| 2 |
// This file was auto-generated by codelite's wxCrafter Plugin |
| 3 |
// wxCrafter project file: gui.wxcp |
| 4 |
// Do not modify this file by hand! |
| 5 |
////////////////////////////////////////////////////////////////////// |
| 6 |
|
| 7 |
#include "gui.h" |
| 8 |
|
| 9 |
// Declare the bitmap loading function |
| 10 |
extern void wxC2AC4InitBitmapResources(); |
| 11 |
|
| 12 |
namespace |
| 13 |
{ |
| 14 |
// return the wxBORDER_SIMPLE that matches the current application theme |
| 15 |
wxBorder get_border_simple_theme_aware_bit() |
| 16 |
{ |
| 17 |
#if wxVERSION_NUMBER >= 3300 && defined(__WXMSW__) |
| 18 |
return wxSystemSettings::GetAppearance().IsDark() ? wxBORDER_SIMPLE : wxBORDER_STATIC; |
| 19 |
#else |
| 20 |
return wxBORDER_DEFAULT; |
| 21 |
#endif |
| 22 |
} // DoGetBorderSimpleBit |
| 23 |
bool bBitmapLoaded = false; |
| 24 |
} // namespace |
| 25 |
|
| 26 |
MainFrameBase::MainFrameBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, |
| 27 |
const wxSize& size, long style) |
| 28 |
: wxFrame(parent, id, title, pos, size, style) |
| 29 |
{ |
| 30 |
if(!bBitmapLoaded) { |
| 31 |
// We need to initialise the default bitmap handler |
| 32 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 33 |
wxC2AC4InitBitmapResources(); |
| 34 |
bBitmapLoaded = true; |
| 35 |
} |
| 36 |
this->Hide(); |
| 37 |
|
| 38 |
wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL); |
| 39 |
this->SetSizer(mainSizer); |
| 40 |
|
| 41 |
m_mainToolbar = new clToolBar(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTB_FLAT); |
| 42 |
m_mainToolbar->SetToolBitmapSize(wxSize(16, 16)); |
| 43 |
|
| 44 |
mainSizer->Add(m_mainToolbar, 0, wxALL | wxEXPAND, WXC_FROM_DIP(0)); |
| 45 |
|
| 46 |
m_MainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(800, 600)), wxTAB_TRAVERSAL); |
| 47 |
|
| 48 |
mainSizer->Add(m_MainPanel, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 49 |
|
| 50 |
wxBoxSizer* boxSizer285 = new wxBoxSizer(wxHORIZONTAL); |
| 51 |
m_MainPanel->SetSizer(boxSizer285); |
| 52 |
|
| 53 |
m_splitterMain = |
| 54 |
new wxSplitterWindow(m_MainPanel, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_MainPanel, wxSize(-1, -1)), |
| 55 |
wxSP_LIVE_UPDATE | wxSP_NO_XP_THEME | wxTRANSPARENT_WINDOW); |
| 56 |
m_splitterMain->SetSashGravity(0); |
| 57 |
m_splitterMain->SetMinimumPaneSize(10); |
| 58 |
|
| 59 |
boxSizer285->Add(m_splitterMain, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 60 |
|
| 61 |
m_splitterPageTreeView = new wxPanel(m_splitterMain, wxID_ANY, wxDefaultPosition, |
| 62 |
wxDLG_UNIT(m_splitterMain, wxSize(150, -1)), wxTAB_TRAVERSAL); |
| 63 |
|
| 64 |
wxBoxSizer* boxSizer297 = new wxBoxSizer(wxVERTICAL); |
| 65 |
m_splitterPageTreeView->SetSizer(boxSizer297); |
| 66 |
|
| 67 |
m_splitterPageDesigner = new wxPanel(m_splitterMain, wxID_ANY, wxDefaultPosition, |
| 68 |
wxDLG_UNIT(m_splitterMain, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 69 |
m_splitterMain->SplitVertically(m_splitterPageTreeView, m_splitterPageDesigner, 150); |
| 70 |
|
| 71 |
wxBoxSizer* boxSizer299 = new wxBoxSizer(wxVERTICAL); |
| 72 |
m_splitterPageDesigner->SetSizer(boxSizer299); |
| 73 |
|
| 74 |
m_statusBar = new wxStatusBar(this, wxID_ANY, wxST_SIZEGRIP); |
| 75 |
m_statusBar->SetFieldsCount(1); |
| 76 |
this->SetStatusBar(m_statusBar); |
| 77 |
|
| 78 |
m_menuBar = new wxMenuBar(0); |
| 79 |
this->SetMenuBar(m_menuBar); |
| 80 |
|
| 81 |
m_menuFile = new wxMenu(); |
| 82 |
m_menuBar->Append(m_menuFile, _("&File")); |
| 83 |
|
| 84 |
m_menuItemOpen = new wxMenuItem(m_menuFile, wxID_OPEN, _("Open\tCtrl-O"), wxT(""), wxITEM_NORMAL); |
| 85 |
m_menuFile->Append(m_menuItemOpen); |
| 86 |
|
| 87 |
m_menuItemSave = new wxMenuItem(m_menuFile, wxID_SAVE, _("&Save\tCtrl-S"), wxT(""), wxITEM_NORMAL); |
| 88 |
m_menuFile->Append(m_menuItemSave); |
| 89 |
|
| 90 |
m_menuFile->AppendSeparator(); |
| 91 |
|
| 92 |
m_menuItemGenerate = |
| 93 |
new wxMenuItem(m_menuFile, ID_GENERATE_CODE, _("Generate Code\tCtrl-G"), wxT(""), wxITEM_NORMAL); |
| 94 |
m_menuFile->Append(m_menuItemGenerate); |
| 95 |
|
| 96 |
m_menuItemBatchGenerate = new wxMenuItem(m_menuFile, ID_BATCH_GENERATE_CODE, |
| 97 |
_("Batch Generate Code...\tCtrl-Shift-G"), wxT(""), wxITEM_NORMAL); |
| 98 |
m_menuFile->Append(m_menuItemBatchGenerate); |
| 99 |
|
| 100 |
m_menuFile->AppendSeparator(); |
| 101 |
|
| 102 |
m_menuItemHide = |
| 103 |
new wxMenuItem(m_menuFile, XRCID("hide_designer"), _("&Close"), _("Hide the designer"), wxITEM_NORMAL); |
| 104 |
m_menuFile->Append(m_menuItemHide); |
| 105 |
|
| 106 |
m_menuView = new wxMenu(); |
| 107 |
m_menuBar->Append(m_menuView, _("&View")); |
| 108 |
|
| 109 |
m_menuItemPreview = new wxMenuItem(m_menuView, wxID_PREVIEW, _("Show &Preview\tF5"), wxT(""), wxITEM_NORMAL); |
| 110 |
m_menuView->Append(m_menuItemPreview); |
| 111 |
|
| 112 |
m_menuEdit = new wxMenu(); |
| 113 |
m_menuBar->Append(m_menuEdit, _("&Edit")); |
| 114 |
|
| 115 |
m_menuItem74 = new wxMenuItem(m_menuEdit, wxID_DELETE, _("Delete\tDEL"), wxT(""), wxITEM_NORMAL); |
| 116 |
m_menuEdit->Append(m_menuItem74); |
| 117 |
|
| 118 |
m_menuEdit->AppendSeparator(); |
| 119 |
|
| 120 |
m_menuItemCopy = new wxMenuItem(m_menuEdit, wxID_COPY, _("Copy\tCtrl-C"), wxT(""), wxITEM_NORMAL); |
| 121 |
m_menuEdit->Append(m_menuItemCopy); |
| 122 |
|
| 123 |
m_menuItemPaste = new wxMenuItem(m_menuEdit, wxID_PASTE, _("Paste\tCtrl-V"), wxT(""), wxITEM_NORMAL); |
| 124 |
m_menuEdit->Append(m_menuItemPaste); |
| 125 |
|
| 126 |
m_menuItemCut = new wxMenuItem(m_menuEdit, wxID_CUT, _("Cut\tCtrl-X"), wxT(""), wxITEM_NORMAL); |
| 127 |
m_menuEdit->Append(m_menuItemCut); |
| 128 |
|
| 129 |
m_menuEdit->AppendSeparator(); |
| 130 |
|
| 131 |
m_menuItemUndo = new wxMenuItem(m_menuEdit, wxID_UNDO, _("Undo\tCtrl-Z"), wxT(""), wxITEM_NORMAL); |
| 132 |
m_menuEdit->Append(m_menuItemUndo); |
| 133 |
|
| 134 |
m_menuItemRedo = new wxMenuItem(m_menuEdit, wxID_REDO, _("Redo\tCtrl-Y"), wxT(""), wxITEM_NORMAL); |
| 135 |
m_menuEdit->Append(m_menuItemRedo); |
| 136 |
|
| 137 |
m_menuItemLabelCurrentState = new wxMenuItem(m_menuEdit, XRCID("label_current_state"), |
| 138 |
_("Set label for current state"), wxT(""), wxITEM_NORMAL); |
| 139 |
m_menuEdit->Append(m_menuItemLabelCurrentState); |
| 140 |
|
| 141 |
m_menuEdit->AppendSeparator(); |
| 142 |
|
| 143 |
m_menuItemRename = new wxMenuItem(m_menuEdit, XRCID("ID_RENAME"), _("Rename\tF2"), _("Rename item"), wxITEM_NORMAL); |
| 144 |
m_menuEdit->Append(m_menuItemRename); |
| 145 |
|
| 146 |
m_menuEdit->AppendSeparator(); |
| 147 |
|
| 148 |
m_menuItemPreferences = new wxMenuItem(m_menuEdit, XRCID("wxc_settings"), _("Settings..."), wxT(""), wxITEM_NORMAL); |
| 149 |
m_menuEdit->Append(m_menuItemPreferences); |
| 150 |
|
| 151 |
m_menuSearch = new wxMenu(); |
| 152 |
m_menuBar->Append(m_menuSearch, _("&Search")); |
| 153 |
|
| 154 |
m_menuItemFind = new wxMenuItem(m_menuSearch, wxID_FIND, _("Find...\tCtrl-F"), _("Find"), wxITEM_NORMAL); |
| 155 |
m_menuSearch->Append(m_menuItemFind); |
| 156 |
|
| 157 |
m_menuBuild = new wxMenu(); |
| 158 |
m_menuBar->Append(m_menuBuild, _("&Build")); |
| 159 |
|
| 160 |
m_menuItemBuild = |
| 161 |
new wxMenuItem(m_menuBuild, XRCID("ID_BUILD"), _("Build Active Project\tF7"), wxT(""), wxITEM_NORMAL); |
| 162 |
m_menuBuild->Append(m_menuItemBuild); |
| 163 |
|
| 164 |
m_menuImport = new wxMenu(); |
| 165 |
m_menuBar->Append(m_menuImport, _("&Import")); |
| 166 |
|
| 167 |
m_menuItemFB = new wxMenuItem(m_menuImport, XRCID("import_wxFB_project"), _("Import wx&FormBuilder Project"), |
| 168 |
wxT(""), wxITEM_NORMAL); |
| 169 |
m_menuImport->Append(m_menuItemFB); |
| 170 |
|
| 171 |
m_menuItemSmith = new wxMenuItem(m_menuImport, XRCID("import_wxSmith_project"), _("Import wx&Smith File"), wxT(""), |
| 172 |
wxITEM_NORMAL); |
| 173 |
m_menuImport->Append(m_menuItemSmith); |
| 174 |
|
| 175 |
m_menuItemXRC = |
| 176 |
new wxMenuItem(m_menuImport, XRCID("import_XRC_project"), _("Import &XRC File"), wxT(""), wxITEM_NORMAL); |
| 177 |
m_menuImport->Append(m_menuItemXRC); |
| 178 |
|
| 179 |
m_menuCustomControl = new wxMenu(); |
| 180 |
m_menuBar->Append(m_menuCustomControl, _("Custom Controls")); |
| 181 |
|
| 182 |
m_menuItemNewCustomControl = |
| 183 |
new wxMenuItem(m_menuCustomControl, ID_CUSTOM_CONTROL_NEW, _("New Custom Control..."), wxT(""), wxITEM_NORMAL); |
| 184 |
m_menuCustomControl->Append(m_menuItemNewCustomControl); |
| 185 |
|
| 186 |
m_menuItemEditCustomControl = new wxMenuItem(m_menuCustomControl, ID_CUSTOM_CONTROL_EDIT, |
| 187 |
_("Edit Custom Control..."), wxT(""), wxITEM_NORMAL); |
| 188 |
m_menuCustomControl->Append(m_menuItemEditCustomControl); |
| 189 |
|
| 190 |
m_menuItemDeleteCustonControl = new wxMenuItem(m_menuCustomControl, ID_CUSTOM_CONTROL_DELETE, |
| 191 |
_("Delete Custom Control"), wxT(""), wxITEM_NORMAL); |
| 192 |
m_menuCustomControl->Append(m_menuItemDeleteCustonControl); |
| 193 |
|
| 194 |
m_menuHelp = new wxMenu(); |
| 195 |
m_menuBar->Append(m_menuHelp, _("&Help")); |
| 196 |
|
| 197 |
m_menuItemAbout = new wxMenuItem(m_menuHelp, wxID_ABOUT, _("&About..."), wxT(""), wxITEM_NORMAL); |
| 198 |
m_menuHelp->Append(m_menuItemAbout); |
| 199 |
|
| 200 |
SetName(wxT("MainFrameBase")); |
| 201 |
SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); |
| 202 |
if(GetSizer()) { |
| 203 |
GetSizer()->Fit(this); |
| 204 |
} |
| 205 |
if(GetParent()) { |
| 206 |
CentreOnParent(wxHORIZONTAL); |
| 207 |
} else { |
| 208 |
CentreOnScreen(wxHORIZONTAL); |
| 209 |
} |
| 210 |
if(!wxPersistenceManager::Get().Find(this)) { |
| 211 |
wxPersistenceManager::Get().RegisterAndRestore(this); |
| 212 |
} else { |
| 213 |
wxPersistenceManager::Get().Restore(this); |
| 214 |
} |
| 215 |
// Connect events |
| 216 |
this->Bind(wxEVT_CLOSE_WINDOW, &MainFrameBase::OnCloseFrame, this); |
| 217 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnFileOpen, this, m_menuItemOpen->GetId()); |
| 218 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnSave, this, m_menuItemSave->GetId()); |
| 219 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnSaveUI, this, m_menuItemSave->GetId()); |
| 220 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnGenerateCode, this, m_menuItemGenerate->GetId()); |
| 221 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnGenerateCodeUI, this, m_menuItemGenerate->GetId()); |
| 222 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnBatchGenerateCode, this, |
| 223 |
m_menuItemBatchGenerate->GetId()); |
| 224 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnBatchGenerateCodeUI, this, m_menuItemBatchGenerate->GetId()); |
| 225 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnHide, this, m_menuItemHide->GetId()); |
| 226 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnPreview, this, m_menuItemPreview->GetId()); |
| 227 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnPreviewUI, this, m_menuItemPreview->GetId()); |
| 228 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnDeleteItem, this, m_menuItem74->GetId()); |
| 229 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnDeleteItemUI, this, m_menuItem74->GetId()); |
| 230 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnCopy, this, m_menuItemCopy->GetId()); |
| 231 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnSelectionUI, this, m_menuItemCopy->GetId()); |
| 232 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnPaste, this, m_menuItemPaste->GetId()); |
| 233 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnPasteUI, this, m_menuItemPaste->GetId()); |
| 234 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnCut, this, m_menuItemCut->GetId()); |
| 235 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnSelectionUI, this, m_menuItemCut->GetId()); |
| 236 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnUndo, this, m_menuItemUndo->GetId()); |
| 237 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnUndoUI, this, m_menuItemUndo->GetId()); |
| 238 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnRedo, this, m_menuItemRedo->GetId()); |
| 239 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnRedoUI, this, m_menuItemRedo->GetId()); |
| 240 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnRename, this, m_menuItemRename->GetId()); |
| 241 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnSettings, this, m_menuItemPreferences->GetId()); |
| 242 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnOpenFindDialog, this, m_menuItemFind->GetId()); |
| 243 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnBuild, this, m_menuItemBuild->GetId()); |
| 244 |
this->Bind(wxEVT_UPDATE_UI, &MainFrameBase::OnBuildUI, this, m_menuItemBuild->GetId()); |
| 245 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportFB, this, m_menuItemFB->GetId()); |
| 246 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportSmith, this, m_menuItemSmith->GetId()); |
| 247 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportXRC, this, m_menuItemXRC->GetId()); |
| 248 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnNewCustomControl, this, |
| 249 |
m_menuItemNewCustomControl->GetId()); |
| 250 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnEditCustomControl, this, |
| 251 |
m_menuItemEditCustomControl->GetId()); |
| 252 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnDeleteCustomControl, this, |
| 253 |
m_menuItemDeleteCustonControl->GetId()); |
| 254 |
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnAbout, this, m_menuItemAbout->GetId()); |
| 255 |
} |
| 256 |
|
| 257 |
MainFrameBase::~MainFrameBase() |
| 258 |
{ |
| 259 |
this->Unbind(wxEVT_CLOSE_WINDOW, &MainFrameBase::OnCloseFrame, this); |
| 260 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnFileOpen, this, m_menuItemOpen->GetId()); |
| 261 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnSave, this, m_menuItemSave->GetId()); |
| 262 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnSaveUI, this, m_menuItemSave->GetId()); |
| 263 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnGenerateCode, this, m_menuItemGenerate->GetId()); |
| 264 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnGenerateCodeUI, this, m_menuItemGenerate->GetId()); |
| 265 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnBatchGenerateCode, this, |
| 266 |
m_menuItemBatchGenerate->GetId()); |
| 267 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnBatchGenerateCodeUI, this, m_menuItemBatchGenerate->GetId()); |
| 268 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnHide, this, m_menuItemHide->GetId()); |
| 269 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnPreview, this, m_menuItemPreview->GetId()); |
| 270 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnPreviewUI, this, m_menuItemPreview->GetId()); |
| 271 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnDeleteItem, this, m_menuItem74->GetId()); |
| 272 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnDeleteItemUI, this, m_menuItem74->GetId()); |
| 273 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnCopy, this, m_menuItemCopy->GetId()); |
| 274 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnSelectionUI, this, m_menuItemCopy->GetId()); |
| 275 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnPaste, this, m_menuItemPaste->GetId()); |
| 276 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnPasteUI, this, m_menuItemPaste->GetId()); |
| 277 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnCut, this, m_menuItemCut->GetId()); |
| 278 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnSelectionUI, this, m_menuItemCut->GetId()); |
| 279 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnUndo, this, m_menuItemUndo->GetId()); |
| 280 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnUndoUI, this, m_menuItemUndo->GetId()); |
| 281 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnRedo, this, m_menuItemRedo->GetId()); |
| 282 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnRedoUI, this, m_menuItemRedo->GetId()); |
| 283 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnRename, this, m_menuItemRename->GetId()); |
| 284 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnSettings, this, m_menuItemPreferences->GetId()); |
| 285 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnOpenFindDialog, this, m_menuItemFind->GetId()); |
| 286 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnBuild, this, m_menuItemBuild->GetId()); |
| 287 |
this->Unbind(wxEVT_UPDATE_UI, &MainFrameBase::OnBuildUI, this, m_menuItemBuild->GetId()); |
| 288 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportFB, this, m_menuItemFB->GetId()); |
| 289 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportSmith, this, m_menuItemSmith->GetId()); |
| 290 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnImportXRC, this, m_menuItemXRC->GetId()); |
| 291 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnNewCustomControl, this, |
| 292 |
m_menuItemNewCustomControl->GetId()); |
| 293 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnEditCustomControl, this, |
| 294 |
m_menuItemEditCustomControl->GetId()); |
| 295 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnDeleteCustomControl, this, |
| 296 |
m_menuItemDeleteCustonControl->GetId()); |
| 297 |
this->Unbind(wxEVT_COMMAND_MENU_SELECTED, &MainFrameBase::OnAbout, this, m_menuItemAbout->GetId()); |
| 298 |
} |
| 299 |
|
| 300 |
GUICraftMainPanelBase::GUICraftMainPanelBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, |
| 301 |
long style) |
| 302 |
: wxPanel(parent, id, pos, size, style) |
| 303 |
{ |
| 304 |
if(!bBitmapLoaded) { |
| 305 |
// We need to initialise the default bitmap handler |
| 306 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 307 |
wxC2AC4InitBitmapResources(); |
| 308 |
bBitmapLoaded = true; |
| 309 |
} |
| 310 |
|
| 311 |
wxBoxSizer* bSizer2 = new wxBoxSizer(wxVERTICAL); |
| 312 |
this->SetSizer(bSizer2); |
| 313 |
|
| 314 |
m_panelRightSidebar = |
| 315 |
new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 316 |
|
| 317 |
bSizer2->Add(m_panelRightSidebar, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 318 |
|
| 319 |
wxBoxSizer* bSizer13 = new wxBoxSizer(wxVERTICAL); |
| 320 |
m_panelRightSidebar->SetSizer(bSizer13); |
| 321 |
|
| 322 |
m_mainSplitter = new wxSplitterWindow(m_panelRightSidebar, wxID_ANY, wxDefaultPosition, |
| 323 |
wxDLG_UNIT(m_panelRightSidebar, wxSize(-1, -1)), |
| 324 |
wxSP_LIVE_UPDATE | wxSP_NO_XP_THEME | wxTRANSPARENT_WINDOW); |
| 325 |
m_mainSplitter->SetSashGravity(1); |
| 326 |
m_mainSplitter->SetMinimumPaneSize(10); |
| 327 |
|
| 328 |
bSizer13->Add(m_mainSplitter, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 329 |
|
| 330 |
m_panelDesigner = new wxPanel(m_mainSplitter, wxID_ANY, wxDefaultPosition, |
| 331 |
wxDLG_UNIT(m_mainSplitter, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 332 |
|
| 333 |
wxBoxSizer* bSizer30 = new wxBoxSizer(wxVERTICAL); |
| 334 |
m_panelDesigner->SetSizer(bSizer30); |
| 335 |
|
| 336 |
m_mainBook = new OutputNBook(m_panelDesigner, wxID_ANY, wxDefaultPosition, |
| 337 |
wxDLG_UNIT(m_panelDesigner, wxSize(-1, -1)), wxBK_DEFAULT); |
| 338 |
m_mainBook->SetName(wxT("m_mainBook")); |
| 339 |
|
| 340 |
bSizer30->Add(m_mainBook, 1, wxEXPAND, WXC_FROM_DIP(2)); |
| 341 |
|
| 342 |
m_designerNBPage = |
| 343 |
new wxPanel(m_mainBook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainBook, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 344 |
m_mainBook->AddPage(m_designerNBPage, _("Designer"), true); |
| 345 |
|
| 346 |
wxBoxSizer* boxSizer10 = new wxBoxSizer(wxVERTICAL); |
| 347 |
m_designerNBPage->SetSizer(boxSizer10); |
| 348 |
|
| 349 |
m_panelToolBox = new wxPanel(m_designerNBPage, wxID_ANY, wxDefaultPosition, |
| 350 |
wxDLG_UNIT(m_designerNBPage, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 351 |
|
| 352 |
boxSizer10->Add(m_panelToolBox, 0, wxEXPAND, WXC_FROM_DIP(2)); |
| 353 |
|
| 354 |
wxBoxSizer* bSizer301 = new wxBoxSizer(wxVERTICAL); |
| 355 |
m_panelToolBox->SetSizer(bSizer301); |
| 356 |
|
| 357 |
m_toolbar = |
| 358 |
new wxAuiToolBar(m_designerNBPage, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_designerNBPage, wxSize(-1, -1)), |
| 359 |
wxAUI_TB_PLAIN_BACKGROUND | wxAUI_TB_DEFAULT_STYLE); |
| 360 |
m_toolbar->SetToolBitmapSize(wxSize(16, 16)); |
| 361 |
|
| 362 |
boxSizer10->Add(m_toolbar, 0, wxLEFT | wxRIGHT | wxEXPAND, WXC_FROM_DIP(2)); |
| 363 |
|
| 364 |
m_dp = new DesignerPanel(m_designerNBPage, wxID_ANY, wxDefaultPosition, |
| 365 |
wxDLG_UNIT(m_designerNBPage, wxSize(-1, -1)), wxTAB_TRAVERSAL | wxHSCROLL | wxVSCROLL); |
| 366 |
m_dp->SetScrollRate(5, 5); |
| 367 |
|
| 368 |
boxSizer10->Add(m_dp, 1, wxLEFT | wxRIGHT | wxEXPAND, WXC_FROM_DIP(2)); |
| 369 |
|
| 370 |
m_cppNBPage = |
| 371 |
new wxPanel(m_mainBook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainBook, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 372 |
m_mainBook->AddPage(m_cppNBPage, _("C++"), false); |
| 373 |
|
| 374 |
wxBoxSizer* boxSizer29 = new wxBoxSizer(wxVERTICAL); |
| 375 |
m_cppNBPage->SetSizer(boxSizer29); |
| 376 |
|
| 377 |
m_notebookCpp = |
| 378 |
new wxNotebook(m_cppNBPage, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_cppNBPage, wxSize(-1, -1)), wxBK_DEFAULT); |
| 379 |
m_notebookCpp->SetName(wxT("m_notebookCpp")); |
| 380 |
|
| 381 |
boxSizer29->Add(m_notebookCpp, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 382 |
|
| 383 |
m_cppPage = new wxPanel(m_notebookCpp, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookCpp, wxSize(-1, -1)), |
| 384 |
wxTAB_TRAVERSAL); |
| 385 |
m_notebookCpp->AddPage(m_cppPage, _("Source"), true); |
| 386 |
|
| 387 |
wxBoxSizer* boxSizer19 = new wxBoxSizer(wxVERTICAL); |
| 388 |
m_cppPage->SetSizer(boxSizer19); |
| 389 |
|
| 390 |
m_textCtrlCppSource = |
| 391 |
new wxStyledTextCtrl(m_cppPage, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_cppPage, wxSize(-1, -1)), |
| 392 |
wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit()); |
| 393 |
#ifdef __WXMSW__ |
| 394 |
// To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to |
| 395 |
// wxFONTFAMILY_TELETYPE |
| 396 |
wxFont m_textCtrlCppSourceFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); |
| 397 |
m_textCtrlCppSourceFont.SetFamily(wxFONTFAMILY_TELETYPE); |
| 398 |
#else |
| 399 |
wxFont m_textCtrlCppSourceFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); |
| 400 |
m_textCtrlCppSourceFont.SetFamily(wxFONTFAMILY_TELETYPE); |
| 401 |
#endif |
| 402 |
m_textCtrlCppSource->SetFont(m_textCtrlCppSourceFont); |
| 403 |
// Configure the fold margin |
| 404 |
m_textCtrlCppSource->SetMarginType(4, wxSTC_MARGIN_SYMBOL); |
| 405 |
m_textCtrlCppSource->SetMarginMask(4, wxSTC_MASK_FOLDERS); |
| 406 |
m_textCtrlCppSource->SetMarginSensitive(4, true); |
| 407 |
m_textCtrlCppSource->SetMarginWidth(4, 0); |
| 408 |
|
| 409 |
// Configure the tracker margin |
| 410 |
m_textCtrlCppSource->SetMarginWidth(1, 0); |
| 411 |
|
| 412 |
// Configure the symbol margin |
| 413 |
m_textCtrlCppSource->SetMarginType(2, wxSTC_MARGIN_SYMBOL); |
| 414 |
m_textCtrlCppSource->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS)); |
| 415 |
m_textCtrlCppSource->SetMarginWidth(2, 0); |
| 416 |
m_textCtrlCppSource->SetMarginSensitive(2, true); |
| 417 |
|
| 418 |
// Configure the line numbers margin |
| 419 |
int m_textCtrlCppSource_PixelWidth = 4 + 5 * m_textCtrlCppSource->TextWidth(wxSTC_STYLE_LINENUMBER, wxT("9")); |
| 420 |
m_textCtrlCppSource->SetMarginType(0, wxSTC_MARGIN_NUMBER); |
| 421 |
m_textCtrlCppSource->SetMarginWidth(0, m_textCtrlCppSource_PixelWidth); |
| 422 |
|
| 423 |
// Configure the line symbol margin |
| 424 |
m_textCtrlCppSource->SetMarginType(3, wxSTC_MARGIN_FORE); |
| 425 |
m_textCtrlCppSource->SetMarginMask(3, 0); |
| 426 |
m_textCtrlCppSource->SetMarginWidth(3, 1); |
| 427 |
// Select the lexer |
| 428 |
m_textCtrlCppSource->SetLexer(wxSTC_LEX_CPP); |
| 429 |
// Set default font / styles |
| 430 |
m_textCtrlCppSource->StyleClearAll(); |
| 431 |
for(int i = 0; i < wxSTC_STYLE_MAX; ++i) { |
| 432 |
m_textCtrlCppSource->StyleSetFont(i, m_textCtrlCppSourceFont); |
| 433 |
} |
| 434 |
m_textCtrlCppSource->SetWrapMode(0); |
| 435 |
m_textCtrlCppSource->SetIndentationGuides(3); |
| 436 |
m_textCtrlCppSource->SetEOLMode(2); |
| 437 |
m_textCtrlCppSource->SetKeyWords( |
| 438 |
0, wxT("and and_eq asm auto bitand bitor bool break case catch char class compl const const_cast continue " |
| 439 |
"default delete do double dynamic_cast else enum explicit export extern false float for friend goto if " |
| 440 |
"inline int long mutable namespace new not not_eq operator or or_eq private protected public register " |
| 441 |
"reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true " |
| 442 |
"try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq " |
| 443 |
"alignas alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local")); |
| 444 |
m_textCtrlCppSource->SetKeyWords(1, wxT("")); |
| 445 |
m_textCtrlCppSource->SetKeyWords(2, wxT("")); |
| 446 |
m_textCtrlCppSource->SetKeyWords(3, wxT("")); |
| 447 |
m_textCtrlCppSource->SetKeyWords(4, wxT("")); |
| 448 |
|
| 449 |
boxSizer19->Add(m_textCtrlCppSource, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 450 |
|
| 451 |
m_headerPage = new wxPanel(m_notebookCpp, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookCpp, wxSize(-1, -1)), |
| 452 |
wxTAB_TRAVERSAL); |
| 453 |
m_notebookCpp->AddPage(m_headerPage, _("Header"), false); |
| 454 |
|
| 455 |
wxBoxSizer* boxSizer21 = new wxBoxSizer(wxVERTICAL); |
| 456 |
m_headerPage->SetSizer(boxSizer21); |
| 457 |
|
| 458 |
m_textCtrlHeaderSource = |
| 459 |
new wxStyledTextCtrl(m_headerPage, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_headerPage, wxSize(-1, -1)), |
| 460 |
wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit()); |
| 461 |
#ifdef __WXMSW__ |
| 462 |
// To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to |
| 463 |
// wxFONTFAMILY_TELETYPE |
| 464 |
wxFont m_textCtrlHeaderSourceFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); |
| 465 |
m_textCtrlHeaderSourceFont.SetFamily(wxFONTFAMILY_TELETYPE); |
| 466 |
#else |
| 467 |
wxFont m_textCtrlHeaderSourceFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); |
| 468 |
m_textCtrlHeaderSourceFont.SetFamily(wxFONTFAMILY_TELETYPE); |
| 469 |
#endif |
| 470 |
m_textCtrlHeaderSource->SetFont(m_textCtrlHeaderSourceFont); |
| 471 |
// Configure the fold margin |
| 472 |
m_textCtrlHeaderSource->SetMarginType(4, wxSTC_MARGIN_SYMBOL); |
| 473 |
m_textCtrlHeaderSource->SetMarginMask(4, wxSTC_MASK_FOLDERS); |
| 474 |
m_textCtrlHeaderSource->SetMarginSensitive(4, true); |
| 475 |
m_textCtrlHeaderSource->SetMarginWidth(4, 0); |
| 476 |
|
| 477 |
// Configure the tracker margin |
| 478 |
m_textCtrlHeaderSource->SetMarginWidth(1, 0); |
| 479 |
|
| 480 |
// Configure the symbol margin |
| 481 |
m_textCtrlHeaderSource->SetMarginType(2, wxSTC_MARGIN_SYMBOL); |
| 482 |
m_textCtrlHeaderSource->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS)); |
| 483 |
m_textCtrlHeaderSource->SetMarginWidth(2, 0); |
| 484 |
m_textCtrlHeaderSource->SetMarginSensitive(2, true); |
| 485 |
|
| 486 |
// Configure the line numbers margin |
| 487 |
int m_textCtrlHeaderSource_PixelWidth = 4 + 5 * m_textCtrlHeaderSource->TextWidth(wxSTC_STYLE_LINENUMBER, wxT("9")); |
| 488 |
m_textCtrlHeaderSource->SetMarginType(0, wxSTC_MARGIN_NUMBER); |
| 489 |
m_textCtrlHeaderSource->SetMarginWidth(0, m_textCtrlHeaderSource_PixelWidth); |
| 490 |
|
| 491 |
// Configure the line symbol margin |
| 492 |
m_textCtrlHeaderSource->SetMarginType(3, wxSTC_MARGIN_FORE); |
| 493 |
m_textCtrlHeaderSource->SetMarginMask(3, 0); |
| 494 |
m_textCtrlHeaderSource->SetMarginWidth(3, 1); |
| 495 |
// Select the lexer |
| 496 |
m_textCtrlHeaderSource->SetLexer(wxSTC_LEX_CPP); |
| 497 |
// Set default font / styles |
| 498 |
m_textCtrlHeaderSource->StyleClearAll(); |
| 499 |
for(int i = 0; i < wxSTC_STYLE_MAX; ++i) { |
| 500 |
m_textCtrlHeaderSource->StyleSetFont(i, m_textCtrlHeaderSourceFont); |
| 501 |
} |
| 502 |
m_textCtrlHeaderSource->SetWrapMode(0); |
| 503 |
m_textCtrlHeaderSource->SetIndentationGuides(0); |
| 504 |
m_textCtrlHeaderSource->SetEOLMode(2); |
| 505 |
m_textCtrlHeaderSource->SetKeyWords( |
| 506 |
0, wxT("and and_eq asm auto bitand bitor bool break case catch char class compl const const_cast continue " |
| 507 |
"default delete do double dynamic_cast else enum explicit export extern false float for friend goto if " |
| 508 |
"inline int long mutable namespace new not not_eq operator or or_eq private protected public register " |
| 509 |
"reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true " |
| 510 |
"try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq " |
| 511 |
"alignas alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local")); |
| 512 |
m_textCtrlHeaderSource->SetKeyWords(1, wxT("")); |
| 513 |
m_textCtrlHeaderSource->SetKeyWords(2, wxT("")); |
| 514 |
m_textCtrlHeaderSource->SetKeyWords(3, wxT("")); |
| 515 |
m_textCtrlHeaderSource->SetKeyWords(4, wxT("")); |
| 516 |
|
| 517 |
boxSizer21->Add(m_textCtrlHeaderSource, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 518 |
|
| 519 |
m_xrcNBPage = |
| 520 |
new wxPanel(m_mainBook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainBook, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 521 |
m_mainBook->AddPage(m_xrcNBPage, _("XRC"), false); |
| 522 |
|
| 523 |
wxBoxSizer* boxSizer15 = new wxBoxSizer(wxVERTICAL); |
| 524 |
m_xrcNBPage->SetSizer(boxSizer15); |
| 525 |
|
| 526 |
m_textCtrlXrc = |
| 527 |
new wxStyledTextCtrl(m_xrcNBPage, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_xrcNBPage, wxSize(-1, -1)), |
| 528 |
wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit()); |
| 529 |
#ifdef __WXMSW__ |
| 530 |
// To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to |
| 531 |
// wxFONTFAMILY_TELETYPE |
| 532 |
wxFont m_textCtrlXrcFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); |
| 533 |
m_textCtrlXrcFont.SetFamily(wxFONTFAMILY_TELETYPE); |
| 534 |
#else |
| 535 |
wxFont m_textCtrlXrcFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); |
| 536 |
m_textCtrlXrcFont.SetFamily(wxFONTFAMILY_TELETYPE); |
| 537 |
#endif |
| 538 |
m_textCtrlXrc->SetFont(m_textCtrlXrcFont); |
| 539 |
// Configure the fold margin |
| 540 |
m_textCtrlXrc->SetMarginType(4, wxSTC_MARGIN_SYMBOL); |
| 541 |
m_textCtrlXrc->SetMarginMask(4, wxSTC_MASK_FOLDERS); |
| 542 |
m_textCtrlXrc->SetMarginSensitive(4, true); |
| 543 |
m_textCtrlXrc->SetMarginWidth(4, 0); |
| 544 |
|
| 545 |
// Configure the tracker margin |
| 546 |
m_textCtrlXrc->SetMarginWidth(1, 0); |
| 547 |
|
| 548 |
// Configure the symbol margin |
| 549 |
m_textCtrlXrc->SetMarginType(2, wxSTC_MARGIN_SYMBOL); |
| 550 |
m_textCtrlXrc->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS)); |
| 551 |
m_textCtrlXrc->SetMarginWidth(2, 0); |
| 552 |
m_textCtrlXrc->SetMarginSensitive(2, true); |
| 553 |
|
| 554 |
// Configure the line numbers margin |
| 555 |
int m_textCtrlXrc_PixelWidth = 4 + 5 * m_textCtrlXrc->TextWidth(wxSTC_STYLE_LINENUMBER, wxT("9")); |
| 556 |
m_textCtrlXrc->SetMarginType(0, wxSTC_MARGIN_NUMBER); |
| 557 |
m_textCtrlXrc->SetMarginWidth(0, m_textCtrlXrc_PixelWidth); |
| 558 |
|
| 559 |
// Configure the line symbol margin |
| 560 |
m_textCtrlXrc->SetMarginType(3, wxSTC_MARGIN_FORE); |
| 561 |
m_textCtrlXrc->SetMarginMask(3, 0); |
| 562 |
m_textCtrlXrc->SetMarginWidth(3, 1); |
| 563 |
// Select the lexer |
| 564 |
m_textCtrlXrc->SetLexer(wxSTC_LEX_XML); |
| 565 |
// Set default font / styles |
| 566 |
m_textCtrlXrc->StyleClearAll(); |
| 567 |
for(int i = 0; i < wxSTC_STYLE_MAX; ++i) { |
| 568 |
m_textCtrlXrc->StyleSetFont(i, m_textCtrlXrcFont); |
| 569 |
} |
| 570 |
m_textCtrlXrc->SetWrapMode(0); |
| 571 |
m_textCtrlXrc->SetIndentationGuides(0); |
| 572 |
m_textCtrlXrc->SetKeyWords(0, wxT("")); |
| 573 |
m_textCtrlXrc->SetKeyWords(1, wxT("")); |
| 574 |
m_textCtrlXrc->SetKeyWords(2, wxT("")); |
| 575 |
m_textCtrlXrc->SetKeyWords(3, wxT("")); |
| 576 |
m_textCtrlXrc->SetKeyWords(4, wxT("")); |
| 577 |
|
| 578 |
boxSizer15->Add(m_textCtrlXrc, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 579 |
|
| 580 |
m_panel10 = new wxPanel(m_mainSplitter, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainSplitter, wxSize(100, -1)), |
| 581 |
wxTAB_TRAVERSAL); |
| 582 |
m_mainSplitter->SplitVertically(m_panelDesigner, m_panel10, -1); |
| 583 |
|
| 584 |
wxBoxSizer* bSizer12 = new wxBoxSizer(wxVERTICAL); |
| 585 |
m_panel10->SetSizer(bSizer12); |
| 586 |
|
| 587 |
m_notebook2 = new wxNotebook(m_panel10, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel10, wxSize(-1, -1)), 0); |
| 588 |
m_notebook2->SetName(wxT("m_notebook2")); |
| 589 |
|
| 590 |
bSizer12->Add(m_notebook2, 1, wxALL | wxEXPAND, WXC_FROM_DIP(2)); |
| 591 |
|
| 592 |
m_pageProps = |
| 593 |
new wxPanel(m_notebook2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook2, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 594 |
m_notebook2->AddPage(m_pageProps, _("Properties"), true); |
| 595 |
|
| 596 |
wxBoxSizer* boxSizer317 = new wxBoxSizer(wxVERTICAL); |
| 597 |
m_pageProps->SetSizer(boxSizer317); |
| 598 |
|
| 599 |
m_panelProperties = |
| 600 |
new wxPanel(m_pageProps, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_pageProps, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 601 |
|
| 602 |
boxSizer317->Add(m_panelProperties, 1, wxEXPAND, WXC_FROM_DIP(2)); |
| 603 |
|
| 604 |
wxBoxSizer* bSizer19 = new wxBoxSizer(wxVERTICAL); |
| 605 |
m_panelProperties->SetSizer(bSizer19); |
| 606 |
|
| 607 |
m_panelStyles = |
| 608 |
new wxPanel(m_notebook2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook2, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 609 |
m_notebook2->AddPage(m_panelStyles, _("Styles"), false); |
| 610 |
|
| 611 |
wxBoxSizer* bSizer11 = new wxBoxSizer(wxHORIZONTAL); |
| 612 |
m_panelStyles->SetSizer(bSizer11); |
| 613 |
|
| 614 |
wxArrayString m_pgMgrStylesArr; |
| 615 |
wxUnusedVar(m_pgMgrStylesArr); |
| 616 |
wxArrayInt m_pgMgrStylesIntArr; |
| 617 |
wxUnusedVar(m_pgMgrStylesIntArr); |
| 618 |
m_pgMgrStyles = |
| 619 |
new wxPropertyGridManager(m_panelStyles, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelStyles, wxSize(-1, -1)), |
| 620 |
wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED); |
| 621 |
|
| 622 |
bSizer11->Add(m_pgMgrStyles, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 623 |
|
| 624 |
m_panelSizerFlags = |
| 625 |
new wxPanel(m_notebook2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook2, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 626 |
m_notebook2->AddPage(m_panelSizerFlags, _("Sizer Flags"), false); |
| 627 |
|
| 628 |
wxBoxSizer* bSizer101 = new wxBoxSizer(wxVERTICAL); |
| 629 |
m_panelSizerFlags->SetSizer(bSizer101); |
| 630 |
|
| 631 |
wxArrayString m_pgMgrSizerFlagsArr; |
| 632 |
wxUnusedVar(m_pgMgrSizerFlagsArr); |
| 633 |
wxArrayInt m_pgMgrSizerFlagsIntArr; |
| 634 |
wxUnusedVar(m_pgMgrSizerFlagsIntArr); |
| 635 |
m_pgMgrSizerFlags = new wxPropertyGridManager(m_panelSizerFlags, wxID_ANY, wxDefaultPosition, |
| 636 |
wxDLG_UNIT(m_panelSizerFlags, wxSize(-1, -1)), |
| 637 |
wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED); |
| 638 |
|
| 639 |
bSizer101->Add(m_pgMgrSizerFlags, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 640 |
|
| 641 |
m_panelAuiPaneInfo = |
| 642 |
new wxPanel(m_notebook2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook2, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 643 |
m_notebook2->AddPage(m_panelAuiPaneInfo, _("wxAuiPaneInfo"), false); |
| 644 |
|
| 645 |
wxBoxSizer* bSizer25 = new wxBoxSizer(wxVERTICAL); |
| 646 |
m_panelAuiPaneInfo->SetSizer(bSizer25); |
| 647 |
|
| 648 |
wxArrayString m_pgMgrAuiPropertiesArr; |
| 649 |
wxUnusedVar(m_pgMgrAuiPropertiesArr); |
| 650 |
wxArrayInt m_pgMgrAuiPropertiesIntArr; |
| 651 |
wxUnusedVar(m_pgMgrAuiPropertiesIntArr); |
| 652 |
m_pgMgrAuiProperties = new wxPropertyGridManager(m_panelAuiPaneInfo, wxID_ANY, wxDefaultPosition, |
| 653 |
wxDLG_UNIT(m_panelAuiPaneInfo, wxSize(-1, -1)), |
| 654 |
wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED); |
| 655 |
|
| 656 |
bSizer25->Add(m_pgMgrAuiProperties, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 657 |
|
| 658 |
SetName(wxT("GUICraftMainPanelBase")); |
| 659 |
SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); |
| 660 |
if(GetSizer()) { |
| 661 |
GetSizer()->Fit(this); |
| 662 |
} |
| 663 |
// Connect events |
| 664 |
m_mainBook->Bind(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, &GUICraftMainPanelBase::OnPageChanged, this); |
| 665 |
m_notebookCpp->Bind(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, &GUICraftMainPanelBase::OnCppBookPageChanged, this); |
| 666 |
m_pgMgrStyles->Bind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnStylesChanged, this); |
| 667 |
m_pgMgrSizerFlags->Bind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnSizerFlagsChanged, this); |
| 668 |
m_pgMgrSizerFlags->Bind(wxEVT_UPDATE_UI, &GUICraftMainPanelBase::OnSizerFlagsUpdateUI, this); |
| 669 |
m_pgMgrAuiProperties->Bind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnAuiPaneInfoChanged, this); |
| 670 |
} |
| 671 |
|
| 672 |
GUICraftMainPanelBase::~GUICraftMainPanelBase() |
| 673 |
{ |
| 674 |
m_mainBook->Unbind(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, &GUICraftMainPanelBase::OnPageChanged, this); |
| 675 |
m_notebookCpp->Unbind(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, &GUICraftMainPanelBase::OnCppBookPageChanged, this); |
| 676 |
m_pgMgrStyles->Unbind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnStylesChanged, this); |
| 677 |
m_pgMgrSizerFlags->Unbind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnSizerFlagsChanged, this); |
| 678 |
m_pgMgrSizerFlags->Unbind(wxEVT_UPDATE_UI, &GUICraftMainPanelBase::OnSizerFlagsUpdateUI, this); |
| 679 |
m_pgMgrAuiProperties->Unbind(wxEVT_PG_CHANGED, &GUICraftMainPanelBase::OnAuiPaneInfoChanged, this); |
| 680 |
} |
| 681 |
|
| 682 |
PropertiesSheetBase::PropertiesSheetBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, |
| 683 |
long style) |
| 684 |
: wxPanel(parent, id, pos, size, style) |
| 685 |
{ |
| 686 |
if(!bBitmapLoaded) { |
| 687 |
// We need to initialise the default bitmap handler |
| 688 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 689 |
wxC2AC4InitBitmapResources(); |
| 690 |
bBitmapLoaded = true; |
| 691 |
} |
| 692 |
|
| 693 |
wxBoxSizer* bSizer10 = new wxBoxSizer(wxVERTICAL); |
| 694 |
this->SetSizer(bSizer10); |
| 695 |
|
| 696 |
m_mainPanel = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), |
| 697 |
wxTAB_TRAVERSAL | wxHSCROLL | wxVSCROLL); |
| 698 |
m_mainPanel->SetScrollRate(5, 5); |
| 699 |
|
| 700 |
bSizer10->Add(m_mainPanel, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 701 |
|
| 702 |
wxFlexGridSizer* fgSizer2 = new wxFlexGridSizer(0, 2, 0, 0); |
| 703 |
fgSizer2->SetFlexibleDirection(wxBOTH); |
| 704 |
fgSizer2->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED); |
| 705 |
fgSizer2->AddGrowableCol(1); |
| 706 |
m_mainPanel->SetSizer(fgSizer2); |
| 707 |
|
| 708 |
SetName(wxT("PropertiesSheetBase")); |
| 709 |
SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); |
| 710 |
if(GetSizer()) { |
| 711 |
GetSizer()->Fit(this); |
| 712 |
} |
| 713 |
} |
| 714 |
|
| 715 |
PropertiesSheetBase::~PropertiesSheetBase() {} |
| 716 |
|
| 717 |
EnterStringsDlgBase::EnterStringsDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, |
| 718 |
const wxSize& size, long style) |
| 719 |
: wxDialog(parent, id, title, pos, size, style) |
| 720 |
{ |
| 721 |
if(!bBitmapLoaded) { |
| 722 |
// We need to initialise the default bitmap handler |
| 723 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 724 |
wxC2AC4InitBitmapResources(); |
| 725 |
bBitmapLoaded = true; |
| 726 |
} |
| 727 |
|
| 728 |
wxBoxSizer* bSizer14 = new wxBoxSizer(wxVERTICAL); |
| 729 |
this->SetSizer(bSizer14); |
| 730 |
|
| 731 |
wxBoxSizer* bSizer16 = new wxBoxSizer(wxVERTICAL); |
| 732 |
|
| 733 |
bSizer14->Add(bSizer16, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 734 |
|
| 735 |
m_staticTextMessage = |
| 736 |
new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 737 |
|
| 738 |
bSizer16->Add(m_staticTextMessage, 0, wxALL | wxEXPAND, WXC_FROM_DIP(2)); |
| 739 |
|
| 740 |
m_stc = new wxStyledTextCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), |
| 741 |
wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit()); |
| 742 |
// Configure the fold margin |
| 743 |
m_stc->SetMarginType(4, wxSTC_MARGIN_SYMBOL); |
| 744 |
m_stc->SetMarginMask(4, wxSTC_MASK_FOLDERS); |
| 745 |
m_stc->SetMarginSensitive(4, true); |
| 746 |
m_stc->SetMarginWidth(4, 0); |
| 747 |
|
| 748 |
// Configure the tracker margin |
| 749 |
m_stc->SetMarginWidth(1, 0); |
| 750 |
|
| 751 |
// Configure the symbol margin |
| 752 |
m_stc->SetMarginType(2, wxSTC_MARGIN_SYMBOL); |
| 753 |
m_stc->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS)); |
| 754 |
m_stc->SetMarginWidth(2, 0); |
| 755 |
m_stc->SetMarginSensitive(2, true); |
| 756 |
|
| 757 |
// Configure the line numbers margin |
| 758 |
m_stc->SetMarginType(0, wxSTC_MARGIN_NUMBER); |
| 759 |
m_stc->SetMarginWidth(0, 0); |
| 760 |
|
| 761 |
// Configure the line symbol margin |
| 762 |
m_stc->SetMarginType(3, wxSTC_MARGIN_FORE); |
| 763 |
m_stc->SetMarginMask(3, 0); |
| 764 |
m_stc->SetMarginWidth(3, 0); |
| 765 |
// Select the lexer |
| 766 |
m_stc->SetLexer(wxSTC_LEX_NULL); |
| 767 |
// Set default font / styles |
| 768 |
m_stc->StyleClearAll(); |
| 769 |
m_stc->SetWrapMode(0); |
| 770 |
m_stc->SetIndentationGuides(0); |
| 771 |
m_stc->SetEOLMode(2); |
| 772 |
m_stc->SetKeyWords(0, wxT("")); |
| 773 |
m_stc->SetKeyWords(1, wxT("")); |
| 774 |
m_stc->SetKeyWords(2, wxT("")); |
| 775 |
m_stc->SetKeyWords(3, wxT("")); |
| 776 |
m_stc->SetKeyWords(4, wxT("")); |
| 777 |
|
| 778 |
bSizer16->Add(m_stc, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 779 |
|
| 780 |
m_stdBtnSizer234 = new wxStdDialogButtonSizer(); |
| 781 |
|
| 782 |
bSizer14->Add(m_stdBtnSizer234, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5)); |
| 783 |
|
| 784 |
m_button236 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 785 |
m_button236->SetDefault(); |
| 786 |
m_stdBtnSizer234->AddButton(m_button236); |
| 787 |
|
| 788 |
m_button238 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 789 |
m_stdBtnSizer234->AddButton(m_button238); |
| 790 |
m_stdBtnSizer234->Realize(); |
| 791 |
|
| 792 |
SetName(wxT("EnterStringsDlgBase")); |
| 793 |
SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); |
| 794 |
if(GetSizer()) { |
| 795 |
GetSizer()->Fit(this); |
| 796 |
} |
| 797 |
if(GetParent()) { |
| 798 |
CentreOnParent(wxBOTH); |
| 799 |
} else { |
| 800 |
CentreOnScreen(wxBOTH); |
| 801 |
} |
| 802 |
if(!wxPersistenceManager::Get().Find(this)) { |
| 803 |
wxPersistenceManager::Get().RegisterAndRestore(this); |
| 804 |
} else { |
| 805 |
wxPersistenceManager::Get().Restore(this); |
| 806 |
} |
| 807 |
} |
| 808 |
|
| 809 |
EnterStringsDlgBase::~EnterStringsDlgBase() {} |
| 810 |
|
| 811 |
ColorPaletteDlgBase::ColorPaletteDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, |
| 812 |
const wxSize& size, long style) |
| 813 |
: wxDialog(parent, id, title, pos, size, style) |
| 814 |
{ |
| 815 |
if(!bBitmapLoaded) { |
| 816 |
// We need to initialise the default bitmap handler |
| 817 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 818 |
wxC2AC4InitBitmapResources(); |
| 819 |
bBitmapLoaded = true; |
| 820 |
} |
| 821 |
|
| 822 |
wxBoxSizer* bSizer23 = new wxBoxSizer(wxVERTICAL); |
| 823 |
this->SetSizer(bSizer23); |
| 824 |
|
| 825 |
m_panel11 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 826 |
|
| 827 |
bSizer23->Add(m_panel11, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 828 |
|
| 829 |
wxGridSizer* gSizer1 = new wxGridSizer(0, 2, 0, 0); |
| 830 |
m_panel11->SetSizer(gSizer1); |
| 831 |
|
| 832 |
wxBoxSizer* bSizer24 = new wxBoxSizer(wxHORIZONTAL); |
| 833 |
|
| 834 |
bSizer23->Add(bSizer24, 0, wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5)); |
| 835 |
|
| 836 |
m_button6 = new wxButton(this, wxID_CANCEL, _("&OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 837 |
m_button6->SetDefault(); |
| 838 |
|
| 839 |
bSizer24->Add(m_button6, 0, wxALL, WXC_FROM_DIP(5)); |
| 840 |
|
| 841 |
m_button7 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 842 |
|
| 843 |
bSizer24->Add(m_button7, 0, wxALL, WXC_FROM_DIP(5)); |
| 844 |
|
| 845 |
SetName(wxT("ColorPaletteDlgBase")); |
| 846 |
SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); |
| 847 |
if(GetSizer()) { |
| 848 |
GetSizer()->Fit(this); |
| 849 |
} |
| 850 |
if(GetParent()) { |
| 851 |
CentreOnParent(wxBOTH); |
| 852 |
} else { |
| 853 |
CentreOnScreen(wxBOTH); |
| 854 |
} |
| 855 |
if(!wxPersistenceManager::Get().Find(this)) { |
| 856 |
wxPersistenceManager::Get().RegisterAndRestore(this); |
| 857 |
} else { |
| 858 |
wxPersistenceManager::Get().Restore(this); |
| 859 |
} |
| 860 |
} |
| 861 |
|
| 862 |
ColorPaletteDlgBase::~ColorPaletteDlgBase() {} |
| 863 |
|
| 864 |
ColourPickerDlgbase::ColourPickerDlgbase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, |
| 865 |
const wxSize& size, long style) |
| 866 |
: wxDialog(parent, id, title, pos, size, style) |
| 867 |
{ |
| 868 |
if(!bBitmapLoaded) { |
| 869 |
// We need to initialise the default bitmap handler |
| 870 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 871 |
wxC2AC4InitBitmapResources(); |
| 872 |
bBitmapLoaded = true; |
| 873 |
} |
| 874 |
|
| 875 |
wxBoxSizer* bSizer21 = new wxBoxSizer(wxVERTICAL); |
| 876 |
this->SetSizer(bSizer21); |
| 877 |
|
| 878 |
wxBoxSizer* bSizer25 = new wxBoxSizer(wxHORIZONTAL); |
| 879 |
|
| 880 |
bSizer21->Add(bSizer25, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 881 |
|
| 882 |
wxArrayString m_choiceStandardColorsArr; |
| 883 |
m_choiceStandardColorsArr.Add(_("<Default>")); |
| 884 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_SCROLLBAR")); |
| 885 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_DESKTOP")); |
| 886 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_ACTIVECAPTION")); |
| 887 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_INACTIVECAPTION")); |
| 888 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_MENU")); |
| 889 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_WINDOW")); |
| 890 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_WINDOWFRAME")); |
| 891 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_MENUTEXT")); |
| 892 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_WINDOWTEXT")); |
| 893 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_CAPTIONTEXT")); |
| 894 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_ACTIVEBORDER")); |
| 895 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_INACTIVEBORDER")); |
| 896 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_APPWORKSPACE")); |
| 897 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_HIGHLIGHT")); |
| 898 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_HIGHLIGHTTEXT")); |
| 899 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_BTNFACE")); |
| 900 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_BTNSHADOW")); |
| 901 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_GRAYTEXT")); |
| 902 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_BTNTEXT")); |
| 903 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_INACTIVECAPTIONTEXT")); |
| 904 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_BTNHIGHLIGHT")); |
| 905 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_3DDKSHADOW")); |
| 906 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_3DLIGHT")); |
| 907 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_INFOTEXT")); |
| 908 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_INFOBK")); |
| 909 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_LISTBOX")); |
| 910 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_HOTLIGHT")); |
| 911 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_GRADIENTACTIVECAPTION")); |
| 912 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_GRADIENTINACTIVECAPTION")); |
| 913 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_MENUHILIGHT")); |
| 914 |
m_choiceStandardColorsArr.Add(_("wxSYS_COLOUR_MENUBAR")); |
| 915 |
m_choiceStandardColors = |
| 916 |
new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceStandardColorsArr, 0); |
| 917 |
m_choiceStandardColors->SetToolTip(_("Select a standard color from the list below")); |
| 918 |
m_choiceStandardColors->SetSelection(0); |
| 919 |
|
| 920 |
bSizer25->Add(m_choiceStandardColors, 1, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); |
| 921 |
|
| 922 |
m_button5 = new wxButton(this, wxID_ANY, _("Custom Colour..."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), |
| 923 |
wxBU_EXACTFIT); |
| 924 |
m_button5->SetToolTip(_("Select custom color...")); |
| 925 |
|
| 926 |
bSizer25->Add(m_button5, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); |
| 927 |
|
| 928 |
m_panelColorPreview = |
| 929 |
new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, 24)), wxTAB_TRAVERSAL); |
| 930 |
|
| 931 |
bSizer21->Add(m_panelColorPreview, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 932 |
|
| 933 |
wxBoxSizer* bSizer26 = new wxBoxSizer(wxHORIZONTAL); |
| 934 |
|
| 935 |
bSizer21->Add(bSizer26, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5)); |
| 936 |
|
| 937 |
m_button8 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 938 |
m_button8->SetDefault(); |
| 939 |
|
| 940 |
bSizer26->Add(m_button8, 0, wxALL, WXC_FROM_DIP(5)); |
| 941 |
|
| 942 |
m_button11 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 943 |
|
| 944 |
bSizer26->Add(m_button11, 0, wxALL, WXC_FROM_DIP(5)); |
| 945 |
|
| 946 |
SetName(wxT("ColourPickerDlgbase")); |
| 947 |
SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); |
| 948 |
if(GetSizer()) { |
| 949 |
GetSizer()->Fit(this); |
| 950 |
} |
| 951 |
if(GetParent()) { |
| 952 |
CentreOnParent(wxBOTH); |
| 953 |
} else { |
| 954 |
CentreOnScreen(wxBOTH); |
| 955 |
} |
| 956 |
if(!wxPersistenceManager::Get().Find(this)) { |
| 957 |
wxPersistenceManager::Get().RegisterAndRestore(this); |
| 958 |
} else { |
| 959 |
wxPersistenceManager::Get().Restore(this); |
| 960 |
} |
| 961 |
// Connect events |
| 962 |
m_choiceStandardColors->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &ColourPickerDlgbase::OnStandardColorSelected, this); |
| 963 |
m_button5->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ColourPickerDlgbase::OnSelectColor, this); |
| 964 |
m_panelColorPreview->Bind(wxEVT_ERASE_BACKGROUND, &ColourPickerDlgbase::OnErasePreviewColor, this); |
| 965 |
m_panelColorPreview->Bind(wxEVT_PAINT, &ColourPickerDlgbase::OnPaintPreviewColor, this); |
| 966 |
} |
| 967 |
|
| 968 |
ColourPickerDlgbase::~ColourPickerDlgbase() |
| 969 |
{ |
| 970 |
m_choiceStandardColors->Unbind(wxEVT_COMMAND_CHOICE_SELECTED, &ColourPickerDlgbase::OnStandardColorSelected, this); |
| 971 |
m_button5->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &ColourPickerDlgbase::OnSelectColor, this); |
| 972 |
m_panelColorPreview->Unbind(wxEVT_ERASE_BACKGROUND, &ColourPickerDlgbase::OnErasePreviewColor, this); |
| 973 |
m_panelColorPreview->Unbind(wxEVT_PAINT, &ColourPickerDlgbase::OnPaintPreviewColor, this); |
| 974 |
} |
| 975 |
|
| 976 |
wxcSettingsDlgBase::wxcSettingsDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, |
| 977 |
const wxSize& size, long style) |
| 978 |
: wxDialog(parent, id, title, pos, size, style) |
| 979 |
{ |
| 980 |
if(!bBitmapLoaded) { |
| 981 |
// We need to initialise the default bitmap handler |
| 982 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 983 |
wxC2AC4InitBitmapResources(); |
| 984 |
bBitmapLoaded = true; |
| 985 |
} |
| 986 |
|
| 987 |
wxBoxSizer* boxSizer122 = new wxBoxSizer(wxVERTICAL); |
| 988 |
this->SetSizer(boxSizer122); |
| 989 |
|
| 990 |
wxBoxSizer* boxSizer145 = new wxBoxSizer(wxVERTICAL); |
| 991 |
|
| 992 |
boxSizer122->Add(boxSizer145, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 993 |
|
| 994 |
wxStaticBoxSizer* staticBoxSizer150 = |
| 995 |
new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("General:")), wxVERTICAL); |
| 996 |
|
| 997 |
boxSizer145->Add(staticBoxSizer150, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 998 |
|
| 999 |
m_checkBoxUseTRay = new wxCheckBox(this, wxID_ANY, _("Close button minimizes wxCrafter to the tray"), |
| 1000 |
wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 1001 |
m_checkBoxUseTRay->SetValue(false); |
| 1002 |
m_checkBoxUseTRay->SetToolTip(_("Close button minimizes wxCrafter to the tray")); |
| 1003 |
|
| 1004 |
staticBoxSizer150->Add(m_checkBoxUseTRay, 0, wxALL, WXC_FROM_DIP(5)); |
| 1005 |
|
| 1006 |
wxStaticBoxSizer* staticBoxSizer152 = |
| 1007 |
new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Code Generation:")), wxVERTICAL); |
| 1008 |
|
| 1009 |
boxSizer145->Add(staticBoxSizer152, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 1010 |
|
| 1011 |
m_checkBoxFormatInheritedFiles = new wxCheckBox(this, wxID_ANY, _("Format inherited files"), wxDefaultPosition, |
| 1012 |
wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 1013 |
m_checkBoxFormatInheritedFiles->SetValue(false); |
| 1014 |
m_checkBoxFormatInheritedFiles->SetToolTip( |
| 1015 |
_("When e.g. a new eventhandler is added, wxCrafter helpfully adds an empty handler to the derived class as " |
| 1016 |
"well as to the generated base-class. If this box is ticked, the whole of the inherited header and " |
| 1017 |
"implementation files will be formatted each time this is done.")); |
| 1018 |
|
| 1019 |
staticBoxSizer152->Add(m_checkBoxFormatInheritedFiles, 0, wxALL, WXC_FROM_DIP(5)); |
| 1020 |
|
| 1021 |
wxStaticBoxSizer* staticBoxSizer15212 = |
| 1022 |
new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Duplicating and Pasting:")), wxVERTICAL); |
| 1023 |
|
| 1024 |
boxSizer145->Add(staticBoxSizer15212, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 1025 |
|
| 1026 |
m_staticText215 = new wxStaticText(this, wxID_ANY, |
| 1027 |
_("What should happen when duplicating or pasting a top-level window,\nor " |
| 1028 |
"pasting some contents from one top-level window to another?"), |
| 1029 |
wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 1030 |
|
| 1031 |
staticBoxSizer15212->Add(m_staticText215, 0, wxALL, WXC_FROM_DIP(5)); |
| 1032 |
|
| 1033 |
m_checkBoxKeepAllUsersetNames = |
| 1034 |
new wxCheckBox(this, wxID_ANY, _("Leave unchanged any user-set names of child controls"), wxDefaultPosition, |
| 1035 |
wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 1036 |
m_checkBoxKeepAllUsersetNames->SetValue(false); |
| 1037 |
m_checkBoxKeepAllUsersetNames->SetToolTip( |
| 1038 |
_("You can't have two top-level windows with the same name, but you can have FooBase::m_textEntry and " |
| 1039 |
"BarBase::m_textEntry.\nTick this box if you want to keep such names the same, convenient if you already " |
| 1040 |
"have Foo code that references them that you want to copy to Bar; but you don't need to keep autogenerated " |
| 1041 |
"names like m_text153.")); |
| 1042 |
|
| 1043 |
staticBoxSizer15212->Add(m_checkBoxKeepAllUsersetNames, 0, wxALL, WXC_FROM_DIP(5)); |
| 1044 |
|
| 1045 |
m_checkBoxKeepAllPossibleNames = |
| 1046 |
new wxCheckBox(this, wxID_ANY, _("Leave unchanged the names of all child controls"), wxDefaultPosition, |
| 1047 |
wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 1048 |
m_checkBoxKeepAllPossibleNames->SetValue(false); |
| 1049 |
m_checkBoxKeepAllPossibleNames->SetToolTip( |
| 1050 |
_("You can't have two top-level windows with the same name, but you can have FooBase::m_text123 and " |
| 1051 |
"BarBase::m_text123.\nTick this box if you want to keep such names the same; convenient if you already have " |
| 1052 |
"Foo code that references them that you want to copy to Bar.")); |
| 1053 |
|
| 1054 |
staticBoxSizer15212->Add(m_checkBoxKeepAllPossibleNames, 0, wxALL, WXC_FROM_DIP(5)); |
| 1055 |
|
| 1056 |
m_checkBoxCopyEventhandlerToo = new wxCheckBox(this, wxID_ANY, _("Copy any event-handlers too"), wxDefaultPosition, |
| 1057 |
wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 1058 |
m_checkBoxCopyEventhandlerToo->SetValue(false); |
| 1059 |
m_checkBoxCopyEventhandlerToo->SetToolTip( |
| 1060 |
_("If the class that you're duplicating has e.g. a wxTextCtrl with a wxEVT_COMMAND_TEXT_ENTER event-handler " |
| 1061 |
"set, if this box is ticked the textctrl in duplicate class will also have that event-handler.")); |
| 1062 |
|
| 1063 |
staticBoxSizer15212->Add(m_checkBoxCopyEventhandlerToo, 0, wxALL, WXC_FROM_DIP(5)); |
| 1064 |
|
| 1065 |
m_stdBtnSizer264 = new wxStdDialogButtonSizer(); |
| 1066 |
|
| 1067 |
boxSizer122->Add(m_stdBtnSizer264, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5)); |
| 1068 |
|
| 1069 |
m_button266 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 1070 |
m_button266->SetDefault(); |
| 1071 |
m_stdBtnSizer264->AddButton(m_button266); |
| 1072 |
|
| 1073 |
m_button268 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 1074 |
m_stdBtnSizer264->AddButton(m_button268); |
| 1075 |
m_stdBtnSizer264->Realize(); |
| 1076 |
|
| 1077 |
SetName(wxT("wxcSettingsDlgBase")); |
| 1078 |
SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); |
| 1079 |
if(GetSizer()) { |
| 1080 |
GetSizer()->Fit(this); |
| 1081 |
} |
| 1082 |
if(GetParent()) { |
| 1083 |
CentreOnParent(wxBOTH); |
| 1084 |
} else { |
| 1085 |
CentreOnScreen(wxBOTH); |
| 1086 |
} |
| 1087 |
if(!wxPersistenceManager::Get().Find(this)) { |
| 1088 |
wxPersistenceManager::Get().RegisterAndRestore(this); |
| 1089 |
} else { |
| 1090 |
wxPersistenceManager::Get().Restore(this); |
| 1091 |
} |
| 1092 |
// Connect events |
| 1093 |
m_checkBoxUseTRay->Bind(wxEVT_UPDATE_UI, &wxcSettingsDlgBase::OnMinimizeToTrayUI, this); |
| 1094 |
m_button266->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &wxcSettingsDlgBase::OnOk, this); |
| 1095 |
} |
| 1096 |
|
| 1097 |
wxcSettingsDlgBase::~wxcSettingsDlgBase() |
| 1098 |
{ |
| 1099 |
m_checkBoxUseTRay->Unbind(wxEVT_UPDATE_UI, &wxcSettingsDlgBase::OnMinimizeToTrayUI, this); |
| 1100 |
m_button266->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &wxcSettingsDlgBase::OnOk, this); |
| 1101 |
} |
| 1102 |
|
| 1103 |
CaptionBarBase::CaptionBarBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) |
| 1104 |
: wxPanel(parent, id, pos, size, style) |
| 1105 |
{ |
| 1106 |
if(!bBitmapLoaded) { |
| 1107 |
// We need to initialise the default bitmap handler |
| 1108 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 1109 |
wxC2AC4InitBitmapResources(); |
| 1110 |
bBitmapLoaded = true; |
| 1111 |
} |
| 1112 |
|
| 1113 |
SetName(wxT("CaptionBarBase")); |
| 1114 |
SetSize(wxDLG_UNIT(this, wxSize(150, 24))); |
| 1115 |
if(GetSizer()) { |
| 1116 |
GetSizer()->Fit(this); |
| 1117 |
} |
| 1118 |
// Connect events |
| 1119 |
this->Bind(wxEVT_PAINT, &CaptionBarBase::OnPaint, this); |
| 1120 |
this->Bind(wxEVT_ERASE_BACKGROUND, &CaptionBarBase::OnEraseBG, this); |
| 1121 |
this->Bind(wxEVT_LEFT_DOWN, &CaptionBarBase::OnLeftDown, this); |
| 1122 |
} |
| 1123 |
|
| 1124 |
CaptionBarBase::~CaptionBarBase() |
| 1125 |
{ |
| 1126 |
this->Unbind(wxEVT_PAINT, &CaptionBarBase::OnPaint, this); |
| 1127 |
this->Unbind(wxEVT_ERASE_BACKGROUND, &CaptionBarBase::OnEraseBG, this); |
| 1128 |
this->Unbind(wxEVT_LEFT_DOWN, &CaptionBarBase::OnLeftDown, this); |
| 1129 |
} |
| 1130 |
|
| 1131 |
wxcImages::wxcImages() |
| 1132 |
: wxImageList(16, 16, true) |
| 1133 |
, m_imagesWidth(16) |
| 1134 |
, m_imagesHeight(16) |
| 1135 |
{ |
| 1136 |
if(!bBitmapLoaded) { |
| 1137 |
// We need to initialise the default bitmap handler |
| 1138 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 1139 |
wxC2AC4InitBitmapResources(); |
| 1140 |
bBitmapLoaded = true; |
| 1141 |
} |
| 1142 |
|
| 1143 |
{ |
| 1144 |
wxBitmap bmp; |
| 1145 |
wxIcon icn; |
| 1146 |
bmp = wxXmlResource::Get()->LoadBitmap(wxT("button_close")); |
| 1147 |
if(bmp.IsOk()) { |
| 1148 |
if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())) { |
| 1149 |
icn.CopyFromBitmap(bmp); |
| 1150 |
this->Add(icn); |
| 1151 |
} |
| 1152 |
m_bitmaps.insert(std::make_pair(wxT("button_close"), bmp)); |
| 1153 |
} |
| 1154 |
} |
| 1155 |
|
| 1156 |
{ |
| 1157 |
wxBitmap bmp; |
| 1158 |
wxIcon icn; |
| 1159 |
bmp = wxXmlResource::Get()->LoadBitmap(wxT("button_minimize")); |
| 1160 |
if(bmp.IsOk()) { |
| 1161 |
if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())) { |
| 1162 |
icn.CopyFromBitmap(bmp); |
| 1163 |
this->Add(icn); |
| 1164 |
} |
| 1165 |
m_bitmaps.insert(std::make_pair(wxT("button_minimize"), bmp)); |
| 1166 |
} |
| 1167 |
} |
| 1168 |
|
| 1169 |
{ |
| 1170 |
wxBitmap bmp; |
| 1171 |
wxIcon icn; |
| 1172 |
bmp = wxXmlResource::Get()->LoadBitmap(wxT("button_maximize")); |
| 1173 |
if(bmp.IsOk()) { |
| 1174 |
if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())) { |
| 1175 |
icn.CopyFromBitmap(bmp); |
| 1176 |
this->Add(icn); |
| 1177 |
} |
| 1178 |
m_bitmaps.insert(std::make_pair(wxT("button_maximize"), bmp)); |
| 1179 |
} |
| 1180 |
} |
| 1181 |
|
| 1182 |
{ |
| 1183 |
wxBitmap bmp; |
| 1184 |
wxIcon icn; |
| 1185 |
bmp = wxXmlResource::Get()->LoadBitmap(wxT("wxc_icon")); |
| 1186 |
if(bmp.IsOk()) { |
| 1187 |
if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())) { |
| 1188 |
icn.CopyFromBitmap(bmp); |
| 1189 |
this->Add(icn); |
| 1190 |
} |
| 1191 |
m_bitmaps.insert(std::make_pair(wxT("wxc_icon"), bmp)); |
| 1192 |
} |
| 1193 |
} |
| 1194 |
} |
| 1195 |
|
| 1196 |
wxcImages::~wxcImages() {} |