| 1 |
////////////////////////////////////////////////////////////////////// |
| 2 |
// This file was auto-generated by codelite's wxCrafter Plugin |
| 3 |
// wxCrafter project file: cppchecksettingsdlg.wxcp |
| 4 |
// Do not modify this file by hand! |
| 5 |
////////////////////////////////////////////////////////////////////// |
| 6 |
|
| 7 |
#include "cppchecksettingsdlgbase.h" |
| 8 |
|
| 9 |
|
| 10 |
// Declare the bitmap loading function |
| 11 |
extern void wxCrafterRo2g8MInitBitmapResources(); |
| 12 |
|
| 13 |
static bool bBitmapLoaded = false; |
| 14 |
|
| 15 |
|
| 16 |
CppCheckSettingsDialogBase::CppCheckSettingsDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) |
| 17 |
: wxDialog(parent, id, title, pos, size, style) |
| 18 |
{ |
| 19 |
if ( !bBitmapLoaded ) { |
| 20 |
// We need to initialise the default bitmap handler |
| 21 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 22 |
wxCrafterRo2g8MInitBitmapResources(); |
| 23 |
bBitmapLoaded = true; |
| 24 |
} |
| 25 |
|
| 26 |
wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL); |
| 27 |
this->SetSizer(bSizer1); |
| 28 |
|
| 29 |
m_notebook1 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), 0); |
| 30 |
m_notebook1->SetName(wxT("m_notebook1")); |
| 31 |
|
| 32 |
bSizer1->Add(m_notebook1, 1, wxALL|wxEXPAND, 5); |
| 33 |
|
| 34 |
m_ChecksPanel = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); |
| 35 |
m_notebook1->AddPage(m_ChecksPanel, _("Checks"), false); |
| 36 |
|
| 37 |
wxBoxSizer* bSizer3 = new wxBoxSizer(wxVERTICAL); |
| 38 |
m_ChecksPanel->SetSizer(bSizer3); |
| 39 |
|
| 40 |
m_staticText5 = new wxStaticText(m_ChecksPanel, wxID_ANY, _("Run the following extra checks:"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 41 |
|
| 42 |
bSizer3->Add(m_staticText5, 0, wxALL, 5); |
| 43 |
|
| 44 |
wxBoxSizer* bSizer511 = new wxBoxSizer(wxHORIZONTAL); |
| 45 |
|
| 46 |
bSizer3->Add(bSizer511, 1, wxEXPAND, 5); |
| 47 |
|
| 48 |
wxArrayString m_checkListExtraWarningsArr; |
| 49 |
m_checkListExtraWarningsArr.Add(_("Coding style")); |
| 50 |
m_checkListExtraWarningsArr.Add(_("Performance")); |
| 51 |
m_checkListExtraWarningsArr.Add(_("Portability")); |
| 52 |
m_checkListExtraWarningsArr.Add(_("Unused functions")); |
| 53 |
m_checkListExtraWarningsArr.Add(_("Missing includes")); |
| 54 |
m_checkListExtraWarningsArr.Add(_("Output informative messages")); |
| 55 |
m_checkListExtraWarningsArr.Add(_("Posix standards")); |
| 56 |
m_checkListExtraWarningsArr.Add(_("C99 standards")); |
| 57 |
m_checkListExtraWarningsArr.Add(_("C++11 standards")); |
| 58 |
m_checkListExtraWarnings = new wxCheckListBox(m_ChecksPanel, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_checkListExtraWarningsArr, wxLB_SINGLE); |
| 59 |
|
| 60 |
bSizer511->Add(m_checkListExtraWarnings, 1, wxALL|wxEXPAND, 5); |
| 61 |
|
| 62 |
wxBoxSizer* bSizer611 = new wxBoxSizer(wxVERTICAL); |
| 63 |
|
| 64 |
bSizer511->Add(bSizer611, 0, wxEXPAND, 5); |
| 65 |
|
| 66 |
m_buttonAllChecks = new wxButton(m_ChecksPanel, wxID_ANY, _("Tick All"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 67 |
m_buttonAllChecks->SetToolTip(_("Tick all the boxes")); |
| 68 |
|
| 69 |
bSizer611->Add(m_buttonAllChecks, 0, wxALL, 5); |
| 70 |
|
| 71 |
m_buttonClearChecks = new wxButton(m_ChecksPanel, wxID_ANY, _("Untick All"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 72 |
m_buttonClearChecks->SetToolTip(_("Untick all the boxes")); |
| 73 |
|
| 74 |
bSizer611->Add(m_buttonClearChecks, 0, wxALL, 5); |
| 75 |
|
| 76 |
wxBoxSizer* boxSizer36 = new wxBoxSizer(wxVERTICAL); |
| 77 |
|
| 78 |
bSizer3->Add(boxSizer36, 0, wxALL|wxEXPAND, 10); |
| 79 |
|
| 80 |
m_cbOptionForce = new wxCheckBox(m_ChecksPanel, wxID_ANY, _("Force checking unlimited numbers of configurations"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 81 |
m_cbOptionForce->SetValue(false); |
| 82 |
m_cbOptionForce->SetToolTip(_("By default the maximum number of configurations checked per file is 12. If that might not be enough, tick this box.")); |
| 83 |
|
| 84 |
boxSizer36->Add(m_cbOptionForce, 0, wxALL|wxEXPAND, 5); |
| 85 |
|
| 86 |
wxBoxSizer* boxSizer38 = new wxBoxSizer(wxHORIZONTAL); |
| 87 |
|
| 88 |
boxSizer36->Add(boxSizer38, 0, 0, 5); |
| 89 |
|
| 90 |
m_cbJobs = new wxCheckBox(m_ChecksPanel, wxID_ANY, _("Multiple jobs (-j)"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 91 |
m_cbJobs->SetValue(false); |
| 92 |
m_cbJobs->SetToolTip(_("Tell Cppcheck to use 'n' CPUs. NB this is incompatible with 'unusedFunction', and may give false-positive warnings for e.g. 'Unmatched suppression' .")); |
| 93 |
|
| 94 |
boxSizer38->Add(m_cbJobs, 0, wxALL|wxEXPAND, 5); |
| 95 |
|
| 96 |
m_spinCtrlJobs = new wxSpinCtrl(m_ChecksPanel, wxID_ANY, wxT("1"), wxDefaultPosition, wxSize(50,-1), wxSP_ARROW_KEYS); |
| 97 |
m_spinCtrlJobs->SetToolTip(_("Number of jobs to try to run in parallel")); |
| 98 |
m_spinCtrlJobs->SetRange(1, 100); |
| 99 |
m_spinCtrlJobs->SetValue(1); |
| 100 |
|
| 101 |
boxSizer38->Add(m_spinCtrlJobs, 0, wxALL, 5); |
| 102 |
|
| 103 |
m_cbCheckConfig = new wxCheckBox(m_ChecksPanel, wxID_ANY, _("Check configuration (turns off other checks)"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 104 |
m_cbCheckConfig->SetValue(false); |
| 105 |
m_cbCheckConfig->SetToolTip(_("Pass --check-config to Cppchecker. This is useful if you get a 'Cppcheck cannot find all the include files' warning: it lets you see which #include aren't being located. However it turns off other checks.")); |
| 106 |
|
| 107 |
boxSizer36->Add(m_cbCheckConfig, 0, wxALL|wxEXPAND, 5); |
| 108 |
|
| 109 |
m_ExcludePanel = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); |
| 110 |
m_notebook1->AddPage(m_ExcludePanel, _("Exclude"), false); |
| 111 |
|
| 112 |
wxBoxSizer* bSizer8 = new wxBoxSizer(wxVERTICAL); |
| 113 |
m_ExcludePanel->SetSizer(bSizer8); |
| 114 |
|
| 115 |
m_staticText1 = new wxStaticText(m_ExcludePanel, wxID_ANY, _("Files to exclude from CppCheck test:"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 116 |
|
| 117 |
bSizer8->Add(m_staticText1, 0, wxALL, 5); |
| 118 |
|
| 119 |
wxBoxSizer* bSizer5 = new wxBoxSizer(wxHORIZONTAL); |
| 120 |
|
| 121 |
bSizer8->Add(bSizer5, 1, wxEXPAND, 5); |
| 122 |
|
| 123 |
wxArrayString m_listBoxExcludelistArr; |
| 124 |
m_listBoxExcludelist = new wxListBox(m_ExcludePanel, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_listBoxExcludelistArr, 0); |
| 125 |
|
| 126 |
bSizer5->Add(m_listBoxExcludelist, 1, wxALL|wxEXPAND, 5); |
| 127 |
|
| 128 |
wxBoxSizer* bSizer6 = new wxBoxSizer(wxVERTICAL); |
| 129 |
|
| 130 |
bSizer5->Add(bSizer6, 0, wxEXPAND, 5); |
| 131 |
|
| 132 |
m_buttonAdd = new wxButton(m_ExcludePanel, wxID_ANY, _("Add"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 133 |
m_buttonAdd->SetToolTip(_("Add file(s) to the excluded files list")); |
| 134 |
|
| 135 |
bSizer6->Add(m_buttonAdd, 0, wxALL, 5); |
| 136 |
|
| 137 |
m_buttonRemove = new wxButton(m_ExcludePanel, wxID_ANY, _("Remove"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 138 |
m_buttonRemove->SetToolTip(_("Remove the selected file from the excluded file list")); |
| 139 |
|
| 140 |
bSizer6->Add(m_buttonRemove, 0, wxALL, 5); |
| 141 |
|
| 142 |
m_buttonClearList = new wxButton(m_ExcludePanel, wxID_ANY, _("Clear"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 143 |
m_buttonClearList->SetToolTip(_("Clear the excluded files list")); |
| 144 |
|
| 145 |
bSizer6->Add(m_buttonClearList, 0, wxALL, 5); |
| 146 |
|
| 147 |
m_SuppressPanel = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); |
| 148 |
m_notebook1->AddPage(m_SuppressPanel, _("Suppress"), false); |
| 149 |
|
| 150 |
wxBoxSizer* bSizer81 = new wxBoxSizer(wxVERTICAL); |
| 151 |
m_SuppressPanel->SetSizer(bSizer81); |
| 152 |
|
| 153 |
m_staticText11 = new wxStaticText(m_SuppressPanel, wxID_ANY, _("Types of warnings NOT to display:"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 154 |
|
| 155 |
bSizer81->Add(m_staticText11, 0, wxALL, 5); |
| 156 |
|
| 157 |
wxBoxSizer* bSizer51 = new wxBoxSizer(wxHORIZONTAL); |
| 158 |
|
| 159 |
bSizer81->Add(bSizer51, 1, wxEXPAND, 5); |
| 160 |
|
| 161 |
wxArrayString m_checkListSuppressArr; |
| 162 |
m_checkListSuppress = new wxCheckListBox(m_SuppressPanel, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_checkListSuppressArr, wxLB_SINGLE); |
| 163 |
|
| 164 |
bSizer51->Add(m_checkListSuppress, 1, wxALL|wxEXPAND, 5); |
| 165 |
|
| 166 |
wxBoxSizer* bSizer61 = new wxBoxSizer(wxVERTICAL); |
| 167 |
|
| 168 |
bSizer51->Add(bSizer61, 0, wxEXPAND, 5); |
| 169 |
|
| 170 |
m_buttonAddSuppression = new wxButton(m_SuppressPanel, wxID_ANY, _("Add"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 171 |
m_buttonAddSuppression->SetToolTip(_("Add an extra check to suppress. You'll need to know its id...")); |
| 172 |
|
| 173 |
bSizer61->Add(m_buttonAddSuppression, 0, wxALL, 5); |
| 174 |
|
| 175 |
m_buttonRemoveSuppression = new wxButton(m_SuppressPanel, wxID_ANY, _("Remove"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 176 |
m_buttonRemoveSuppression->SetToolTip(_("Remove the selected suppression from the list")); |
| 177 |
|
| 178 |
bSizer61->Add(m_buttonRemoveSuppression, 0, wxALL, 5); |
| 179 |
|
| 180 |
bSizer61->Add(0, 0, 0, wxTOP, 15); |
| 181 |
|
| 182 |
m_buttonSuppressAll = new wxButton(m_SuppressPanel, wxID_ANY, _("Tick All"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 183 |
m_buttonSuppressAll->SetToolTip(_("Tick all the boxes")); |
| 184 |
|
| 185 |
bSizer61->Add(m_buttonSuppressAll, 0, wxALL, 5); |
| 186 |
|
| 187 |
m_buttonClearSuppressions = new wxButton(m_SuppressPanel, wxID_ANY, _("Untick All"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 188 |
m_buttonClearSuppressions->SetToolTip(_("Untick all the boxes")); |
| 189 |
|
| 190 |
bSizer61->Add(m_buttonClearSuppressions, 0, wxALL, 5); |
| 191 |
|
| 192 |
m_checkBoxSerialise = new wxCheckBox(m_SuppressPanel, wxID_ANY, _("Remember these settings"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 193 |
m_checkBoxSerialise->SetValue(false); |
| 194 |
m_checkBoxSerialise->SetToolTip(_("If ticked, these settings will be saved and be applied in the future. Otherwise the warnings will be back when you restart CodeLite, which may be what you should want.")); |
| 195 |
|
| 196 |
bSizer81->Add(m_checkBoxSerialise, 0, wxALL, 10); |
| 197 |
|
| 198 |
m_IncludeDirs = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); |
| 199 |
m_notebook1->AddPage(m_IncludeDirs, _("Include Dirs"), false); |
| 200 |
|
| 201 |
wxBoxSizer* bSizer812 = new wxBoxSizer(wxVERTICAL); |
| 202 |
m_IncludeDirs->SetSizer(bSizer812); |
| 203 |
|
| 204 |
m_staticText113 = new wxStaticText(m_IncludeDirs, wxID_ANY, _("If the 'Missing Includes' check is enabled, add here any extra\ndirectories where Cppcheck should search for #includes"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 205 |
|
| 206 |
bSizer812->Add(m_staticText113, 0, wxALL, 5); |
| 207 |
|
| 208 |
wxBoxSizer* bSizer514 = new wxBoxSizer(wxHORIZONTAL); |
| 209 |
|
| 210 |
bSizer812->Add(bSizer514, 1, wxEXPAND, 5); |
| 211 |
|
| 212 |
wxArrayString m_listBoxIncludeDirsArr; |
| 213 |
m_listBoxIncludeDirs = new wxListBox(m_IncludeDirs, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_listBoxIncludeDirsArr, wxLB_SINGLE); |
| 214 |
|
| 215 |
bSizer514->Add(m_listBoxIncludeDirs, 1, wxALL|wxEXPAND, 5); |
| 216 |
|
| 217 |
wxBoxSizer* bSizer616 = new wxBoxSizer(wxVERTICAL); |
| 218 |
|
| 219 |
bSizer514->Add(bSizer616, 0, wxEXPAND, 5); |
| 220 |
|
| 221 |
m_buttonAddIncludeDir = new wxButton(m_IncludeDirs, wxID_ANY, _("Add"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 222 |
m_buttonAddIncludeDir->SetToolTip(_("Add the full path to a directory to search for #includes")); |
| 223 |
|
| 224 |
bSizer616->Add(m_buttonAddIncludeDir, 0, wxALL, 5); |
| 225 |
|
| 226 |
m_buttonRemoveIncludeDir = new wxButton(m_IncludeDirs, wxID_ANY, _("Remove"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 227 |
|
| 228 |
bSizer616->Add(m_buttonRemoveIncludeDir, 0, wxALL, 5); |
| 229 |
|
| 230 |
bSizer616->Add(0, 0, 0, wxTOP, 15); |
| 231 |
|
| 232 |
m_checkBoxSuppressSystemIncludes = new wxCheckBox(m_IncludeDirs, wxID_ANY, _("Suppress warnings about 'system' includes"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 233 |
m_checkBoxSuppressSystemIncludes->SetValue(true); |
| 234 |
m_checkBoxSuppressSystemIncludes->SetToolTip(_("If ticked, the 'missingIncludeSystem' suppression is passed to Cppcheck. This stops it complaining about a missing #include <foo>, while still detecting a missing #include \"bar\"")); |
| 235 |
|
| 236 |
bSizer812->Add(m_checkBoxSuppressSystemIncludes, 0, wxALL, 10); |
| 237 |
|
| 238 |
m_checkBoxSerialiseIncludeDirs = new wxCheckBox(m_IncludeDirs, wxID_ANY, _("Remember these settings"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 239 |
m_checkBoxSerialiseIncludeDirs->SetValue(false); |
| 240 |
m_checkBoxSerialiseIncludeDirs->SetToolTip(_("If ticked, these settings will be saved and be applied in the future. Otherwise the warnings will be back when you restart CodeLite, which may be what you want.")); |
| 241 |
|
| 242 |
bSizer812->Add(m_checkBoxSerialiseIncludeDirs, 0, wxALL, 10); |
| 243 |
|
| 244 |
m_DefinesPanel = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); |
| 245 |
m_notebook1->AddPage(m_DefinesPanel, _("Command-line Definitions"), false); |
| 246 |
|
| 247 |
wxBoxSizer* bSizer813 = new wxBoxSizer(wxVERTICAL); |
| 248 |
m_DefinesPanel->SetSizer(bSizer813); |
| 249 |
|
| 250 |
m_staticText11428 = new wxStaticText(m_DefinesPanel, wxID_ANY, _("Here you can pass 'configurations' to cppcheck\ne.g. \"Only test code branches where FOO is defined\" or\n\"Don't test code branches where the value of FOO is 2\""), wxDefaultPosition, wxSize(-1, -1), 0); |
| 251 |
|
| 252 |
bSizer813->Add(m_staticText11428, 0, wxALL, 5); |
| 253 |
|
| 254 |
m_staticLine18 = new wxStaticLine(m_DefinesPanel, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLI_HORIZONTAL); |
| 255 |
|
| 256 |
bSizer813->Add(m_staticLine18, 0, wxALL|wxEXPAND, 5); |
| 257 |
|
| 258 |
m_staticText11429 = new wxStaticText(m_DefinesPanel, wxID_ANY, _("Defines to pass e.g. FOO or FOO=1:"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 259 |
|
| 260 |
bSizer813->Add(m_staticText11429, 0, wxLEFT|wxRIGHT|wxTOP, 5); |
| 261 |
|
| 262 |
wxBoxSizer* bSizer51521 = new wxBoxSizer(wxHORIZONTAL); |
| 263 |
|
| 264 |
bSizer813->Add(bSizer51521, 1, wxEXPAND, 5); |
| 265 |
|
| 266 |
wxArrayString m_listBoxDefinelistArr; |
| 267 |
m_listBoxDefinelist = new wxListBox(m_DefinesPanel, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_listBoxDefinelistArr, 0); |
| 268 |
m_listBoxDefinelist->SetToolTip(_("Add here definitions of code branches you want to be checked e.g. 'FOO' or 'BAR=2'. Each will be passed to Cppcheck as '-DFOO' or -D'BAR=2' (so don't write the -D yourself).")); |
| 269 |
|
| 270 |
bSizer51521->Add(m_listBoxDefinelist, 1, wxALL|wxEXPAND, 5); |
| 271 |
|
| 272 |
wxBoxSizer* bSizer61723 = new wxBoxSizer(wxVERTICAL); |
| 273 |
|
| 274 |
bSizer51521->Add(bSizer61723, 0, wxEXPAND, 5); |
| 275 |
|
| 276 |
m_buttonAdd1824 = new wxButton(m_DefinesPanel, wxID_ANY, _("Add"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 277 |
m_buttonAdd1824->SetToolTip(_("Add file(s) to the excluded files list")); |
| 278 |
|
| 279 |
bSizer61723->Add(m_buttonAdd1824, 0, wxALL, 5); |
| 280 |
|
| 281 |
m_buttonRemove1925 = new wxButton(m_DefinesPanel, wxID_ANY, _("Remove"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 282 |
m_buttonRemove1925->SetToolTip(_("Remove the selected file from the excluded file list")); |
| 283 |
|
| 284 |
bSizer61723->Add(m_buttonRemove1925, 0, wxALL, 5); |
| 285 |
|
| 286 |
m_buttonClearList2026 = new wxButton(m_DefinesPanel, wxID_ANY, _("Clear"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 287 |
m_buttonClearList2026->SetToolTip(_("Clear the excluded files list")); |
| 288 |
|
| 289 |
bSizer61723->Add(m_buttonClearList2026, 0, wxALL, 5); |
| 290 |
|
| 291 |
m_staticText114 = new wxStaticText(m_DefinesPanel, wxID_ANY, _("Undefines to pass:"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 292 |
|
| 293 |
bSizer813->Add(m_staticText114, 0, wxLEFT|wxRIGHT|wxTOP, 5); |
| 294 |
|
| 295 |
wxBoxSizer* bSizer515 = new wxBoxSizer(wxHORIZONTAL); |
| 296 |
|
| 297 |
bSizer813->Add(bSizer515, 1, wxEXPAND, 5); |
| 298 |
|
| 299 |
wxArrayString m_listBoxUndefineListArr; |
| 300 |
m_listBoxUndefineList = new wxListBox(m_DefinesPanel, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_listBoxUndefineListArr, 0); |
| 301 |
m_listBoxUndefineList->SetToolTip(_("Here you can add undefines (branches you don't want to be checked) e.g. 'FOO' or 'BAR=2'. Each will be passed to Cppcheck as '-UFOO' or -U'BAR=2' (so don't write the -U yourself).")); |
| 302 |
|
| 303 |
bSizer515->Add(m_listBoxUndefineList, 1, wxALL|wxEXPAND, 5); |
| 304 |
|
| 305 |
wxBoxSizer* bSizer617 = new wxBoxSizer(wxVERTICAL); |
| 306 |
|
| 307 |
bSizer515->Add(bSizer617, 0, wxEXPAND, 5); |
| 308 |
|
| 309 |
m_buttonAdd18 = new wxButton(m_DefinesPanel, wxID_ANY, _("Add"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 310 |
m_buttonAdd18->SetToolTip(_("Add file(s) to the excluded files list")); |
| 311 |
|
| 312 |
bSizer617->Add(m_buttonAdd18, 0, wxALL, 5); |
| 313 |
|
| 314 |
m_buttonRemove19 = new wxButton(m_DefinesPanel, wxID_ANY, _("Remove"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 315 |
m_buttonRemove19->SetToolTip(_("Remove the selected file from the excluded file list")); |
| 316 |
|
| 317 |
bSizer617->Add(m_buttonRemove19, 0, wxALL, 5); |
| 318 |
|
| 319 |
m_buttonClearList20 = new wxButton(m_DefinesPanel, wxID_ANY, _("Clear"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 320 |
m_buttonClearList20->SetToolTip(_("Clear the excluded files list")); |
| 321 |
|
| 322 |
bSizer617->Add(m_buttonClearList20, 0, wxALL, 5); |
| 323 |
|
| 324 |
m_staticline1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL); |
| 325 |
|
| 326 |
bSizer1->Add(m_staticline1, 0, wxALL|wxEXPAND, 5); |
| 327 |
|
| 328 |
wxBoxSizer* bSizer2 = new wxBoxSizer(wxHORIZONTAL); |
| 329 |
|
| 330 |
bSizer1->Add(bSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); |
| 331 |
|
| 332 |
m_BtmOK = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 333 |
m_BtmOK->SetDefault(); |
| 334 |
|
| 335 |
bSizer2->Add(m_BtmOK, 0, wxALL, 5); |
| 336 |
|
| 337 |
m_BtnCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 338 |
|
| 339 |
bSizer2->Add(m_BtnCancel, 0, wxALL, 5); |
| 340 |
|
| 341 |
|
| 342 |
#if wxVERSION_NUMBER >= 2900 |
| 343 |
if(!wxPersistenceManager::Get().Find(m_notebook1)){ |
| 344 |
wxPersistenceManager::Get().RegisterAndRestore(m_notebook1); |
| 345 |
} else { |
| 346 |
wxPersistenceManager::Get().Restore(m_notebook1); |
| 347 |
} |
| 348 |
#endif |
| 349 |
|
| 350 |
SetName(wxT("CppCheckSettingsDialogBase")); |
| 351 |
SetSize(-1,-1); |
| 352 |
if (GetSizer()) { |
| 353 |
GetSizer()->Fit(this); |
| 354 |
} |
| 355 |
if(GetParent()) { |
| 356 |
CentreOnParent(); |
| 357 |
} else { |
| 358 |
CentreOnScreen(); |
| 359 |
} |
| 360 |
#if wxVERSION_NUMBER >= 2900 |
| 361 |
if(!wxPersistenceManager::Get().Find(this)) { |
| 362 |
wxPersistenceManager::Get().RegisterAndRestore(this); |
| 363 |
} else { |
| 364 |
wxPersistenceManager::Get().Restore(this); |
| 365 |
} |
| 366 |
#endif |
| 367 |
// Connect events |
| 368 |
m_buttonAllChecks->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnChecksTickAll), NULL, this); |
| 369 |
m_buttonAllChecks->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnChecksTickAllUI), NULL, this); |
| 370 |
m_buttonClearChecks->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnChecksUntickAll), NULL, this); |
| 371 |
m_buttonClearChecks->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnChecksUntickAllUI), NULL, this); |
| 372 |
m_spinCtrlJobs->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnJobsUpdateUI), NULL, this); |
| 373 |
m_buttonAdd->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnAddFile), NULL, this); |
| 374 |
m_buttonRemove->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnRemoveFile), NULL, this); |
| 375 |
m_buttonRemove->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnRemoveFileUI), NULL, this); |
| 376 |
m_buttonClearList->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnClearList), NULL, this); |
| 377 |
m_buttonClearList->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnClearListUI), NULL, this); |
| 378 |
m_buttonAddSuppression->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnAddSuppression), NULL, this); |
| 379 |
m_buttonRemoveSuppression->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnRemoveSuppression), NULL, this); |
| 380 |
m_buttonRemoveSuppression->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnRemoveSuppressionUI), NULL, this); |
| 381 |
m_buttonSuppressAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnSuppressTickAll), NULL, this); |
| 382 |
m_buttonSuppressAll->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnSuppressTickAllUI), NULL, this); |
| 383 |
m_buttonClearSuppressions->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnSuppressUntickAll), NULL, this); |
| 384 |
m_buttonClearSuppressions->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnSuppressUntickAllUI), NULL, this); |
| 385 |
m_IncludeDirs->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnIncludeDirsUpdateUI), NULL, this); |
| 386 |
m_buttonAddIncludeDir->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnAddIncludeDir), NULL, this); |
| 387 |
m_buttonRemoveIncludeDir->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnRemoveIncludeDir), NULL, this); |
| 388 |
m_buttonRemoveIncludeDir->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnRemoveIncludeDirUI), NULL, this); |
| 389 |
m_buttonAdd1824->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnAddDefinition), NULL, this); |
| 390 |
m_buttonRemove1925->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnRemoveDefinition), NULL, this); |
| 391 |
m_buttonRemove1925->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnRemoveDefinitionUI), NULL, this); |
| 392 |
m_buttonClearList2026->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnClearDefinitions), NULL, this); |
| 393 |
m_buttonClearList2026->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnClearDefinitionsUI), NULL, this); |
| 394 |
m_buttonAdd18->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnAddUndefine), NULL, this); |
| 395 |
m_buttonRemove19->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnRemoveUndefine), NULL, this); |
| 396 |
m_buttonRemove19->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnRemoveUndefineUI), NULL, this); |
| 397 |
m_buttonClearList20->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnClearUndefines), NULL, this); |
| 398 |
m_buttonClearList20->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnClearUndefinesUI), NULL, this); |
| 399 |
m_BtmOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnBtnOK), NULL, this); |
| 400 |
|
| 401 |
} |
| 402 |
|
| 403 |
CppCheckSettingsDialogBase::~CppCheckSettingsDialogBase() |
| 404 |
{ |
| 405 |
m_buttonAllChecks->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnChecksTickAll), NULL, this); |
| 406 |
m_buttonAllChecks->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnChecksTickAllUI), NULL, this); |
| 407 |
m_buttonClearChecks->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnChecksUntickAll), NULL, this); |
| 408 |
m_buttonClearChecks->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnChecksUntickAllUI), NULL, this); |
| 409 |
m_spinCtrlJobs->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnJobsUpdateUI), NULL, this); |
| 410 |
m_buttonAdd->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnAddFile), NULL, this); |
| 411 |
m_buttonRemove->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnRemoveFile), NULL, this); |
| 412 |
m_buttonRemove->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnRemoveFileUI), NULL, this); |
| 413 |
m_buttonClearList->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnClearList), NULL, this); |
| 414 |
m_buttonClearList->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnClearListUI), NULL, this); |
| 415 |
m_buttonAddSuppression->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnAddSuppression), NULL, this); |
| 416 |
m_buttonRemoveSuppression->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnRemoveSuppression), NULL, this); |
| 417 |
m_buttonRemoveSuppression->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnRemoveSuppressionUI), NULL, this); |
| 418 |
m_buttonSuppressAll->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnSuppressTickAll), NULL, this); |
| 419 |
m_buttonSuppressAll->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnSuppressTickAllUI), NULL, this); |
| 420 |
m_buttonClearSuppressions->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnSuppressUntickAll), NULL, this); |
| 421 |
m_buttonClearSuppressions->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnSuppressUntickAllUI), NULL, this); |
| 422 |
m_IncludeDirs->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnIncludeDirsUpdateUI), NULL, this); |
| 423 |
m_buttonAddIncludeDir->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnAddIncludeDir), NULL, this); |
| 424 |
m_buttonRemoveIncludeDir->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnRemoveIncludeDir), NULL, this); |
| 425 |
m_buttonRemoveIncludeDir->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnRemoveIncludeDirUI), NULL, this); |
| 426 |
m_buttonAdd1824->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnAddDefinition), NULL, this); |
| 427 |
m_buttonRemove1925->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnRemoveDefinition), NULL, this); |
| 428 |
m_buttonRemove1925->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnRemoveDefinitionUI), NULL, this); |
| 429 |
m_buttonClearList2026->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnClearDefinitions), NULL, this); |
| 430 |
m_buttonClearList2026->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnClearDefinitionsUI), NULL, this); |
| 431 |
m_buttonAdd18->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnAddUndefine), NULL, this); |
| 432 |
m_buttonRemove19->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnRemoveUndefine), NULL, this); |
| 433 |
m_buttonRemove19->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnRemoveUndefineUI), NULL, this); |
| 434 |
m_buttonClearList20->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnClearUndefines), NULL, this); |
| 435 |
m_buttonClearList20->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckSettingsDialogBase::OnClearUndefinesUI), NULL, this); |
| 436 |
m_BtmOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckSettingsDialogBase::OnBtnOK), NULL, this); |
| 437 |
|
| 438 |
} |
| 439 |
|
| 440 |
CppCheckAddSuppressionDialogBase::CppCheckAddSuppressionDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) |
| 441 |
: wxDialog(parent, id, title, pos, size, style) |
| 442 |
{ |
| 443 |
if ( !bBitmapLoaded ) { |
| 444 |
// We need to initialise the default bitmap handler |
| 445 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 446 |
wxCrafterRo2g8MInitBitmapResources(); |
| 447 |
bBitmapLoaded = true; |
| 448 |
} |
| 449 |
|
| 450 |
wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL); |
| 451 |
this->SetSizer(bSizer1); |
| 452 |
|
| 453 |
m_staticText12 = new wxStaticText(this, wxID_ANY, _("Description to show in the dialog"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 454 |
|
| 455 |
bSizer1->Add(m_staticText12, 0, wxALL, 5); |
| 456 |
|
| 457 |
m_txtDescription = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); |
| 458 |
m_txtDescription->SetToolTip(_("This is what you'll see in the settings dialog. Put whatever you like here; it's not used internally")); |
| 459 |
#if wxVERSION_NUMBER >= 3000 |
| 460 |
m_txtDescription->SetHint(wxT("")); |
| 461 |
#endif |
| 462 |
|
| 463 |
bSizer1->Add(m_txtDescription, 0, wxALL|wxEXPAND, 5); |
| 464 |
|
| 465 |
m_staticText13 = new wxStaticText(this, wxID_ANY, _("The ID string that cppchecker will recognise"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 466 |
|
| 467 |
bSizer1->Add(m_staticText13, 0, wxALL, 5); |
| 468 |
|
| 469 |
m_txtKey = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); |
| 470 |
m_txtKey->SetToolTip(_("Enter here the unique ID string that cppchecker can recognise. Examples are \"operatorEqVarError\" and \"uninitMemberVar\". You can find these by grepping the cppchecker source, or by running cppchecker on your app in a terminal and passing the additional parameter '--xml'.")); |
| 471 |
#if wxVERSION_NUMBER >= 3000 |
| 472 |
m_txtKey->SetHint(wxT("")); |
| 473 |
#endif |
| 474 |
|
| 475 |
bSizer1->Add(m_txtKey, 0, wxALL|wxEXPAND, 5); |
| 476 |
|
| 477 |
m_staticline1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL); |
| 478 |
|
| 479 |
bSizer1->Add(m_staticline1, 0, wxALL|wxEXPAND, 5); |
| 480 |
|
| 481 |
wxBoxSizer* bSizer2 = new wxBoxSizer(wxHORIZONTAL); |
| 482 |
|
| 483 |
bSizer1->Add(bSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); |
| 484 |
|
| 485 |
m_buttonOK = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 486 |
m_buttonOK->SetDefault(); |
| 487 |
|
| 488 |
bSizer2->Add(m_buttonOK, 0, wxALL, 5); |
| 489 |
|
| 490 |
m_buttonCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); |
| 491 |
|
| 492 |
bSizer2->Add(m_buttonCancel, 0, wxALL, 5); |
| 493 |
|
| 494 |
SetName(wxT("CppCheckAddSuppressionDialogBase")); |
| 495 |
SetSize(-1,-1); |
| 496 |
if (GetSizer()) { |
| 497 |
GetSizer()->Fit(this); |
| 498 |
} |
| 499 |
if(GetParent()) { |
| 500 |
CentreOnParent(wxBOTH); |
| 501 |
} else { |
| 502 |
CentreOnScreen(wxBOTH); |
| 503 |
} |
| 504 |
#if wxVERSION_NUMBER >= 2900 |
| 505 |
if(!wxPersistenceManager::Get().Find(this)) { |
| 506 |
wxPersistenceManager::Get().RegisterAndRestore(this); |
| 507 |
} else { |
| 508 |
wxPersistenceManager::Get().Restore(this); |
| 509 |
} |
| 510 |
#endif |
| 511 |
// Connect events |
| 512 |
m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckAddSuppressionDialogBase::OnOKButtonUpdateUI), NULL, this); |
| 513 |
|
| 514 |
} |
| 515 |
|
| 516 |
CppCheckAddSuppressionDialogBase::~CppCheckAddSuppressionDialogBase() |
| 517 |
{ |
| 518 |
m_buttonOK->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckAddSuppressionDialogBase::OnOKButtonUpdateUI), NULL, this); |
| 519 |
|
| 520 |
} |