| 1 |
////////////////////////////////////////////////////////////////////// |
| 2 |
// This file was auto-generated by codelite's wxCrafter Plugin |
| 3 |
// wxCrafter project file: cppcheckreportbasepage.wxcp |
| 4 |
// Do not modify this file by hand! |
| 5 |
////////////////////////////////////////////////////////////////////// |
| 6 |
|
| 7 |
#include "cppcheckreportbasepage.h" |
| 8 |
|
| 9 |
// Declare the bitmap loading function |
| 10 |
extern void wxCBCB5InitBitmapResources(); |
| 11 |
|
| 12 |
static bool bBitmapLoaded = false; |
| 13 |
|
| 14 |
CppCheckReportBasePage::CppCheckReportBasePage(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, |
| 15 |
long style) |
| 16 |
: wxPanel(parent, id, pos, size, style) |
| 17 |
{ |
| 18 |
if(!bBitmapLoaded) { |
| 19 |
// We need to initialise the default bitmap handler |
| 20 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 21 |
wxCBCB5InitBitmapResources(); |
| 22 |
bBitmapLoaded = true; |
| 23 |
} |
| 24 |
|
| 25 |
wxBoxSizer* bSizer5 = new wxBoxSizer(wxVERTICAL); |
| 26 |
this->SetSizer(bSizer5); |
| 27 |
|
| 28 |
wxBoxSizer* mainSizer = new wxBoxSizer(wxHORIZONTAL); |
| 29 |
|
| 30 |
bSizer5->Add(mainSizer, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 31 |
|
| 32 |
wxBoxSizer* bSizer41 = new wxBoxSizer(wxVERTICAL); |
| 33 |
|
| 34 |
mainSizer->Add(bSizer41, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 35 |
|
| 36 |
m_stc = new wxStyledTextCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxBORDER_NONE); |
| 37 |
// Configure the fold margin |
| 38 |
m_stc->SetMarginType(4, wxSTC_MARGIN_SYMBOL); |
| 39 |
m_stc->SetMarginMask(4, wxSTC_MASK_FOLDERS); |
| 40 |
m_stc->SetMarginSensitive(4, true); |
| 41 |
m_stc->SetMarginWidth(4, 0); |
| 42 |
|
| 43 |
// Configure the tracker margin |
| 44 |
m_stc->SetMarginWidth(1, 0); |
| 45 |
|
| 46 |
// Configure the symbol margin |
| 47 |
m_stc->SetMarginType(2, wxSTC_MARGIN_SYMBOL); |
| 48 |
m_stc->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS)); |
| 49 |
m_stc->SetMarginWidth(2, 16); |
| 50 |
m_stc->SetMarginSensitive(2, true); |
| 51 |
|
| 52 |
// Configure the line numbers margin |
| 53 |
m_stc->SetMarginType(0, wxSTC_MARGIN_NUMBER); |
| 54 |
m_stc->SetMarginWidth(0, 0); |
| 55 |
|
| 56 |
// Configure the line symbol margin |
| 57 |
m_stc->SetMarginType(3, wxSTC_MARGIN_FORE); |
| 58 |
m_stc->SetMarginMask(3, 0); |
| 59 |
m_stc->SetMarginWidth(3, 0); |
| 60 |
// Select the lexer |
| 61 |
m_stc->SetLexer(wxSTC_LEX_NULL); |
| 62 |
// Set default font / styles |
| 63 |
m_stc->StyleClearAll(); |
| 64 |
m_stc->SetWrapMode(1); |
| 65 |
m_stc->SetIndentationGuides(0); |
| 66 |
m_stc->SetEOLMode(2); |
| 67 |
m_stc->SetKeyWords(0, wxT("")); |
| 68 |
m_stc->SetKeyWords(1, wxT("")); |
| 69 |
m_stc->SetKeyWords(2, wxT("")); |
| 70 |
m_stc->SetKeyWords(3, wxT("")); |
| 71 |
m_stc->SetKeyWords(4, wxT("")); |
| 72 |
|
| 73 |
bSizer41->Add(m_stc, 1, wxEXPAND, WXC_FROM_DIP(5)); |
| 74 |
|
| 75 |
wxBoxSizer* bSizer4 = new wxBoxSizer(wxVERTICAL); |
| 76 |
|
| 77 |
mainSizer->Add(bSizer4, 0, wxEXPAND, WXC_FROM_DIP(5)); |
| 78 |
|
| 79 |
m_buttonClear = |
| 80 |
new clThemedButton(this, wxID_CLEAR, _("&Clear"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 81 |
m_buttonClear->SetToolTip(_("Clear the CppCheck report view")); |
| 82 |
|
| 83 |
bSizer4->Add(m_buttonClear, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 84 |
|
| 85 |
m_buttonStop = |
| 86 |
new clThemedButton(this, wxID_STOP, _("&Stop"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 87 |
m_buttonStop->SetDefault(); |
| 88 |
m_buttonStop->SetToolTip(_("Stop the current analysis")); |
| 89 |
|
| 90 |
bSizer4->Add(m_buttonStop, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 91 |
|
| 92 |
bSizer4->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5)); |
| 93 |
|
| 94 |
m_buttonUp = new clThemedButton(this, wxID_UP, _("Up"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 95 |
m_buttonUp->SetToolTip(_("Move to previous error")); |
| 96 |
|
| 97 |
bSizer4->Add(m_buttonUp, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 98 |
|
| 99 |
m_buttonDown = |
| 100 |
new clThemedButton(this, wxID_DOWN, _("Down"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); |
| 101 |
m_buttonDown->SetToolTip(_("Move to next error")); |
| 102 |
|
| 103 |
bSizer4->Add(m_buttonDown, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 104 |
|
| 105 |
SetName(wxT("CppCheckReportBasePage")); |
| 106 |
SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); |
| 107 |
if(GetSizer()) { GetSizer()->Fit(this); } |
| 108 |
// Connect events |
| 109 |
m_stc->Connect(wxEVT_STC_STYLENEEDED, wxStyledTextEventHandler(CppCheckReportBasePage::OnStyleNeeded), NULL, this); |
| 110 |
m_stc->Connect(wxEVT_STC_DOUBLECLICK, wxStyledTextEventHandler(CppCheckReportBasePage::OnOpenFile), NULL, this); |
| 111 |
m_buttonClear->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckReportBasePage::OnClearReport), |
| 112 |
NULL, this); |
| 113 |
m_buttonClear->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckReportBasePage::OnClearReportUI), NULL, |
| 114 |
this); |
| 115 |
m_buttonStop->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckReportBasePage::OnStopChecking), |
| 116 |
NULL, this); |
| 117 |
m_buttonStop->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckReportBasePage::OnStopCheckingUI), NULL, |
| 118 |
this); |
| 119 |
m_buttonUp->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckReportBasePage::OnUp), NULL, this); |
| 120 |
m_buttonUp->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckReportBasePage::OnUpUI), NULL, this); |
| 121 |
m_buttonDown->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckReportBasePage::OnDown), NULL, |
| 122 |
this); |
| 123 |
m_buttonDown->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckReportBasePage::OnDownUI), NULL, this); |
| 124 |
} |
| 125 |
|
| 126 |
CppCheckReportBasePage::~CppCheckReportBasePage() |
| 127 |
{ |
| 128 |
m_stc->Disconnect(wxEVT_STC_STYLENEEDED, wxStyledTextEventHandler(CppCheckReportBasePage::OnStyleNeeded), NULL, |
| 129 |
this); |
| 130 |
m_stc->Disconnect(wxEVT_STC_DOUBLECLICK, wxStyledTextEventHandler(CppCheckReportBasePage::OnOpenFile), NULL, this); |
| 131 |
m_buttonClear->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, |
| 132 |
wxCommandEventHandler(CppCheckReportBasePage::OnClearReport), NULL, this); |
| 133 |
m_buttonClear->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckReportBasePage::OnClearReportUI), NULL, |
| 134 |
this); |
| 135 |
m_buttonStop->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, |
| 136 |
wxCommandEventHandler(CppCheckReportBasePage::OnStopChecking), NULL, this); |
| 137 |
m_buttonStop->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckReportBasePage::OnStopCheckingUI), NULL, |
| 138 |
this); |
| 139 |
m_buttonUp->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckReportBasePage::OnUp), NULL, |
| 140 |
this); |
| 141 |
m_buttonUp->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckReportBasePage::OnUpUI), NULL, this); |
| 142 |
m_buttonDown->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CppCheckReportBasePage::OnDown), NULL, |
| 143 |
this); |
| 144 |
m_buttonDown->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CppCheckReportBasePage::OnDownUI), NULL, this); |
| 145 |
} |