| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2014 Eran Ifrah |
| 5 |
// file name : cppcheckreportpage.h |
| 6 |
// |
| 7 |
// ------------------------------------------------------------------------- |
| 8 |
// A |
| 9 |
// _____ _ _ _ _ |
| 10 |
// / __ \ | | | | (_) | |
| 11 |
// | / \/ ___ __| | ___| | _| |_ ___ |
| 12 |
// | | / _ \ / _ |/ _ \ | | | __/ _ ) |
| 13 |
// | \__/\ (_) | (_| | __/ |___| | || __/ |
| 14 |
// \____/\___/ \__,_|\___\_____/_|\__\___| |
| 15 |
// |
| 16 |
// F i l e |
| 17 |
// |
| 18 |
// This program is free software; you can redistribute it and/or modify |
| 19 |
// it under the terms of the GNU General Public License as published by |
| 20 |
// the Free Software Foundation; either version 2 of the License, or |
| 21 |
// (at your option) any later version. |
| 22 |
// |
| 23 |
////////////////////////////////////////////////////////////////////////////// |
| 24 |
////////////////////////////////////////////////////////////////////////////// |
| 25 |
|
| 26 |
#ifndef __cppcheckreportpage__ |
| 27 |
#define __cppcheckreportpage__ |
| 28 |
|
| 29 |
/** |
| 30 |
@file |
| 31 |
Subclass of CppCheckReportBasePage, which is generated by wxFormBuilder. |
| 32 |
*/ |
| 33 |
|
| 34 |
#include "cppcheckreportbasepage.h" |
| 35 |
#include "cppchecktestresults.h" |
| 36 |
#include <vector> |
| 37 |
#include <map> |
| 38 |
|
| 39 |
extern const wxEventType wxEVT_CPPCHECK_ASK_STOP; |
| 40 |
|
| 41 |
class IManager; |
| 42 |
class CppCheckPlugin; |
| 43 |
|
| 44 |
class CppCheckReportPage : public CppCheckReportBasePage |
| 45 |
{ |
| 46 |
IManager* m_mgr; |
| 47 |
CppCheckPlugin* m_plugin; |
| 48 |
|
| 49 |
protected: |
| 50 |
virtual void OnDownUI(wxUpdateUIEvent& event); |
| 51 |
virtual void OnUpUI(wxUpdateUIEvent& event); |
| 52 |
virtual void OnDown(wxCommandEvent& event); |
| 53 |
virtual void OnUp(wxCommandEvent& event); |
| 54 |
virtual void OnStyleNeeded(wxStyledTextEvent& event); |
| 55 |
// static int ColorLine ( int, const char *text, size_t &start, size_t &len ); |
| 56 |
|
| 57 |
protected: |
| 58 |
// Handlers for CppCheckReportBasePage events. |
| 59 |
|
| 60 |
void OnClearReport(wxCommandEvent& event); |
| 61 |
void OnStopChecking(wxCommandEvent& event); |
| 62 |
void OnStopCheckingUI(wxUpdateUIEvent& event); |
| 63 |
void OnClearReportUI(wxUpdateUIEvent& event); |
| 64 |
void OnThemeChanged(wxCommandEvent& e); |
| 65 |
|
| 66 |
// Scintilla events |
| 67 |
void OnOpenFile(wxStyledTextEvent& e); |
| 68 |
void DoInitStyle(); |
| 69 |
bool FindNextMarker(bool gotoMatch = true); |
| 70 |
bool FindPrevMarker(bool gotoMatch = true); |
| 71 |
void DoOpenLine(int outputLine); |
| 72 |
|
| 73 |
public: |
| 74 |
/** Constructor */ |
| 75 |
CppCheckReportPage(wxWindow* parent, IManager* mgr, CppCheckPlugin* plugin); |
| 76 |
virtual ~CppCheckReportPage(); |
| 77 |
|
| 78 |
void Clear(); |
| 79 |
size_t GetErrorCount() const; |
| 80 |
void AppendLine(const wxString& line); |
| 81 |
void PrintStatusMessage(); |
| 82 |
void SetGaugeRange(int range); |
| 83 |
void SetMessage(const wxString& msg); |
| 84 |
void GotoFirstError(); |
| 85 |
}; |
| 86 |
|
| 87 |
#endif // __cppcheckreportpage__ |