1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
|
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: workspacesettingsbase.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#include "workspacesettingsbase.h"
// Declare the bitmap loading function
extern void wxC3C39InitBitmapResources();
static bool bBitmapLoaded = false;
WorkspaceSettingsBase::WorkspaceSettingsBase(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);
wxC3C39InitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
this->SetSizer(mainSizer);
m_notebook1 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), 0);
m_notebook1->SetName(wxT("m_notebook1"));
mainSizer->Add(m_notebook1, 1, wxALL|wxEXPAND, 5);
m_panelEnv = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
m_notebook1->AddPage(m_panelEnv, _("Environment"), false);
wxBoxSizer* bSizer81 = new wxBoxSizer(wxVERTICAL);
m_panelEnv->SetSizer(bSizer81);
wxStaticBoxSizer* sbSizer3 = new wxStaticBoxSizer( new wxStaticBox(m_panelEnv, wxID_ANY, wxT("")), wxVERTICAL);
bSizer81->Add(sbSizer3, 0, wxALL, 5);
m_staticText3 = new wxStaticText(m_panelEnv, wxID_ANY, _("By default, CodeLite uses the current active environment variables set as defined in the Settings > Environment Variables dialog.\nHowever, you may choose a different set to become the active set when this workspace is loaded selecting it here."), wxDefaultPosition, wxSize(-1, -1), 0);
sbSizer3->Add(m_staticText3, 0, wxALL, 5);
m_staticText4 = new wxStaticText(m_panelEnv, wxID_ANY, _("Environment sets:"), wxDefaultPosition, wxSize(-1, -1), 0);
bSizer81->Add(m_staticText4, 0, wxALL|wxEXPAND, 5);
wxArrayString m_choiceEnvSetsArr;
m_choiceEnvSetsArr.Add(wxT("Default"));
m_choiceEnvSets = new wxChoice(m_panelEnv, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_choiceEnvSetsArr, 0);
m_choiceEnvSets->SetSelection(0);
bSizer81->Add(m_choiceEnvSets, 0, wxALL|wxEXPAND, 5);
m_staticline2 = new wxStaticLine(m_panelEnv, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL);
bSizer81->Add(m_staticline2, 0, wxALL|wxEXPAND, 5);
m_staticText6 = new wxStaticText(m_panelEnv, wxID_ANY, _("Specify here an additional environment variables that will be shared with other people who are using this workspace:"), wxDefaultPosition, wxSize(-1, -1), 0);
bSizer81->Add(m_staticText6, 0, wxALL|wxEXPAND, 5);
m_textCtrlWspEnvVars = new wxTextCtrl(m_panelEnv, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_MULTILINE);
#ifdef __WXMSW__
// To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE
wxFont m_textCtrlWspEnvVarsFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
m_textCtrlWspEnvVarsFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
wxFont m_textCtrlWspEnvVarsFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
m_textCtrlWspEnvVarsFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
m_textCtrlWspEnvVars->SetFont(m_textCtrlWspEnvVarsFont);
bSizer81->Add(m_textCtrlWspEnvVars, 1, wxALL|wxEXPAND, 5);
m_staticline1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL);
mainSizer->Add(m_staticline1, 0, wxALL|wxEXPAND, 5);
wxBoxSizer* buttonSizer = new wxBoxSizer(wxHORIZONTAL);
mainSizer->Add(buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5);
m_buttonOk = new wxButton(this, wxID_OK, _("&Ok"), wxDefaultPosition, wxSize(-1, -1), 0);
m_buttonOk->SetDefault();
buttonSizer->Add(m_buttonOk, 0, wxALL, 5);
m_buttonCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
buttonSizer->Add(m_buttonCancel, 0, wxALL, 5);
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(m_notebook1)){
wxPersistenceManager::Get().RegisterAndRestore(m_notebook1);
} else {
wxPersistenceManager::Get().Restore(m_notebook1);
}
#endif
SetName(wxT("WorkspaceSettingsBase"));
SetSize(-1,-1);
if (GetSizer()) {
GetSizer()->Fit(this);
}
if(GetParent()) {
CentreOnParent(wxBOTH);
} else {
CentreOnScreen(wxBOTH);
}
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(this)) {
wxPersistenceManager::Get().RegisterAndRestore(this);
} else {
wxPersistenceManager::Get().Restore(this);
}
#endif
// Connect events
m_choiceEnvSets->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(WorkspaceSettingsBase::OnEnvSelected), NULL, this);
m_buttonOk->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WorkspaceSettingsBase::OnButtonOK), NULL, this);
}
WorkspaceSettingsBase::~WorkspaceSettingsBase()
{
m_choiceEnvSets->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(WorkspaceSettingsBase::OnEnvSelected), NULL, this);
m_buttonOk->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WorkspaceSettingsBase::OnButtonOK), NULL, this);
}
CodeCompletionBasePage::CodeCompletionBasePage(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);
wxC3C39InitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* bSizer9 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(bSizer9);
m_splitter1 = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
m_splitter1->SetSashGravity(0.5);
m_splitter1->SetMinimumPaneSize(1);
bSizer9->Add(m_splitter1, 1, wxEXPAND, 5);
m_panel8 = new wxPanel(m_splitter1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
wxBoxSizer* bSizer24 = new wxBoxSizer(wxVERTICAL);
m_panel8->SetSizer(bSizer24);
m_staticText5 = new wxStaticText(m_panel8, wxID_ANY, _("Search paths:"), wxDefaultPosition, wxSize(-1, -1), 0);
bSizer24->Add(m_staticText5, 0, wxLEFT|wxRIGHT|wxTOP, 5);
m_textCtrlSearchPaths = new wxTextCtrl(m_panel8, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_MULTILINE);
#ifdef __WXMSW__
// To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE
wxFont m_textCtrlSearchPathsFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
m_textCtrlSearchPathsFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
wxFont m_textCtrlSearchPathsFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
m_textCtrlSearchPathsFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
m_textCtrlSearchPaths->SetFont(m_textCtrlSearchPathsFont);
m_textCtrlSearchPaths->SetToolTip(_("Add here search paths used by clang / ctags for locating include files"));
bSizer24->Add(m_textCtrlSearchPaths, 1, wxALL|wxEXPAND, 5);
m_panel6 = new wxPanel(m_splitter1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
m_splitter1->SplitHorizontally(m_panel8, m_panel6, 0);
wxBoxSizer* bSizer221 = new wxBoxSizer(wxVERTICAL);
m_panel6->SetSizer(bSizer221);
m_staticText12 = new wxStaticText(m_panel6, wxID_ANY, _("Macros (clang):"), wxDefaultPosition, wxSize(-1, -1), 0);
bSizer221->Add(m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5);
m_textCtrlMacros = new wxTextCtrl(m_panel6, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_MULTILINE);
#ifdef __WXMSW__
// To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE
wxFont m_textCtrlMacrosFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
m_textCtrlMacrosFont.SetFamily(wxFONTFAMILY_TELETYPE);
#else
wxFont m_textCtrlMacrosFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
m_textCtrlMacrosFont.SetFamily(wxFONTFAMILY_TELETYPE);
#endif
m_textCtrlMacros->SetFont(m_textCtrlMacrosFont);
m_textCtrlMacros->SetToolTip(_("Add here macros to pass to clang when generating PCH files\nOne macro per line"));
bSizer221->Add(m_textCtrlMacros, 1, wxALL|wxEXPAND, 5);
wxBoxSizer* boxSizer3 = new wxBoxSizer(wxHORIZONTAL);
bSizer221->Add(boxSizer3, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
m_checkBoxCpp11 = new wxCheckBox(m_panel6, wxID_ANY, _("Enable C++11 Standard"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxCpp11->SetValue(false);
boxSizer3->Add(m_checkBoxCpp11, 0, wxALL, 5);
m_checkBoxCpp14 = new wxCheckBox(m_panel6, wxID_ANY, _("Enable C++14 Standard"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxCpp14->SetValue(false);
boxSizer3->Add(m_checkBoxCpp14, 0, wxALL, 5);
m_checkBoxCpp17 = new wxCheckBox(m_panel6, wxID_ANY, _("Enable C++17 Standard"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxCpp17->SetValue(false);
boxSizer3->Add(m_checkBoxCpp17, 0, wxALL, 5);
m_checkBoxSWTLW = new wxCheckBox(m_panel6, wxID_ANY, _("Sync to Workspace File"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxSWTLW->SetValue(false);
m_checkBoxSWTLW->SetToolTip(_("When enabled search paths folders for Code Completion will be synced between the Workspace file and the local search paths database."));
boxSizer3->Add(m_checkBoxSWTLW, 0, wxALL, 5);
SetName(wxT("CodeCompletionBasePage"));
SetSize(500,300);
if (GetSizer()) {
GetSizer()->Fit(this);
}
// Connect events
m_textCtrlSearchPaths->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(CodeCompletionBasePage::OnCCContentModified), NULL, this);
m_textCtrlMacros->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(CodeCompletionBasePage::OnCCContentModified), NULL, this);
}
CodeCompletionBasePage::~CodeCompletionBasePage()
{
m_textCtrlSearchPaths->Disconnect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(CodeCompletionBasePage::OnCCContentModified), NULL, this);
m_textCtrlMacros->Disconnect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(CodeCompletionBasePage::OnCCContentModified), NULL, this);
}
|