wxMaxima
Loading...
Searching...
No Matches
PerformanceSidebar.h
1// -*- mode: c++; c-file-style: "linux"; c-basic-offset: 2; indent-tabs-mode: nil -*-
2//
3// Copyright (C) 2026 Gunter Königsmann <wxMaxima@physikbuch.de>
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15//
16// You should have received a copy of the GNU General Public License
17// along with this program; if not, write to the Free Software
18// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19//
20// SPDX-License-Identifier: GPL-2.0+
21
22#ifndef PERFORMANCESIDEBAR_H
23#define PERFORMANCESIDEBAR_H
24
25#include <wx/wx.h>
26#include <wx/panel.h>
27#include <wx/stattext.h>
28#include <wx/stopwatch.h>
29#include <map>
30
31class PerformanceSidebar : public wxScrolled<wxPanel>
32{
33public:
34 explicit PerformanceSidebar(wxWindow *parent, int ID = wxID_ANY);
37 void UpdateContents();
38
39private:
40 std::map<wxString, wxStaticText*> m_valueLabels;
42 wxStopWatch m_sinceLastUpdate;
43 void AddStat(wxSizer* sizer, const wxString& label, const wxString& key);
44};
45
46#endif // PERFORMANCESIDEBAR_H
Definition: PerformanceSidebar.h:32
void UpdateContents()
Refresh the displayed statistics. Called from the idle loop; throttles itself and only touches labels...
Definition: PerformanceSidebar.cpp:64
Definition: CellPointers.h:32