-
Notifications
You must be signed in to change notification settings - Fork 0
/
cbGcovSummaryPanel.h
76 lines (58 loc) · 1.68 KB
/
cbGcovSummaryPanel.h
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
#ifndef CBGCOVSUMMARYPANEL_H
#define CBGCOVSUMMARYPANEL_H
#include <vector>
#include <wx/listctrl.h>
#include "editorbase.h"
//(*Headers(cbGcovSummaryPanel)
#include <wx/panel.h>
class wxBoxSizer;
class wxListCtrl;
//*)
struct gcovSummaryFileData
{
wxString filename;
int totalCodeLines;
int totalCodeLinesCalled;
bool hasLines;
int totalBranches;
int totalBranchesConditionEvaluated;
int totalBranchesTaken;
bool hasBranches;
bool hasBranchesTaken;
int totalCalls;
int totalCallsExecuted;
bool hasCalls;
gcovSummaryFileData():
hasLines(false),
hasBranches(false),
hasBranchesTaken(false),
hasCalls(false){}
};
typedef std::vector<gcovSummaryFileData> Summaries;
class cbGcovSummaryPanel: public EditorBase
{
public:
cbGcovSummaryPanel(wxWindow* parent, const Summaries &summaries);
virtual ~cbGcovSummaryPanel();
//(*Declarations(cbGcovSummaryPanel)
wxListCtrl* listCtrl;
//*)
virtual const wxString& GetFilename() const;
virtual const wxString& GetShortName() const;
virtual const wxString& GetTitle();
virtual bool VisibleToTree() const { return false; }/// not visible in open files list
protected:
//(*Identifiers(cbGcovSummaryPanel)
static const long ID_LISTCTRL;
//*)
private:
static wxString shortName_;
void OnColClick( wxListEvent& event );
void InitGrid(bool doSort = false, bool sortAscending = true);
const Summaries summaries_;
//(*Handlers(cbGcovSummaryPanel)
void ItemActivated(wxListEvent& event);
//*)
DECLARE_EVENT_TABLE()
};
#endif