![]() |
Ember
|
Performance panel UI for displaying real-time metrics. More...
#include <PerformanceMonitor.h>
Public Member Functions | |
| PerformancePanel (wxWindow *parent, PerformanceMonitor *monitor=nullptr) | |
| virtual | ~PerformancePanel () |
| wxWindow * | GetWidget () override |
| Returns the wxWidgets window used as the tab content. | |
| wxString | GetTitle () const override |
| Returns the display title of the tab. | |
| wxString | GetTabType () const override |
| Returns the tab type identifier. | |
| void | SetMonitor (PerformanceMonitor *monitor) |
| PerformanceMonitor * | GetMonitor () const |
| void | RefreshDisplay () |
| void | SetUpdateInterval (int milliseconds) |
| void | SetChartEnabled (const std::string &chartName, bool enabled) |
| bool | IsChartEnabled (const std::string &chartName) const |
| void | SetAllChartsEnabled (bool enabled) |
| std::vector< std::string > | GetAvailableCharts () const |
| Public Member Functions inherited from ITab | |
| virtual | ~ITab ()=default |
| virtual wxBitmap | GetIcon () const |
| Returns the tab icon bitmap; defaults to null. | |
| virtual void | Initialize () |
| Called once when the tab is first created. | |
| virtual void | Refresh () |
| Refreshes the tab content. | |
| virtual void | OnActivated () |
| Called when the tab becomes active. | |
| virtual void | OnDeactivated () |
| Called when the tab becomes inactive. | |
| virtual void | OnClosed () |
| Called when the tab is closed. | |
| virtual bool | IsValid () const |
| Returns true if the tab is in a valid state. | |
| virtual bool | CanClose () const |
| Returns true if the tab can be closed. | |
| virtual bool | CanMove () const |
| Returns true if the tab can be moved/reordered. | |
| virtual wxString | SerializeState () const |
| Serializes tab state to a string for persistence. | |
| virtual void | DeserializeState (const wxString &state) |
| Restores tab state from a serialized string. | |
| virtual bool | HasUnsavedChanges () const |
| Returns true if the tab has unsaved changes. | |
| virtual bool | Save () |
| Saves the tab content; returns true on success. | |
| virtual bool | SupportsOperation (const wxString &operation) const |
| Returns true if the tab supports the given operation. | |
| virtual bool | ExecuteOperation (const wxString &operation, const wxString ¶meter="") |
| Executes an operation with optional parameter; returns true on success. | |
Private Types | |
| enum | { ID_UPDATE_TIMER = wxID_HIGHEST + 100 , ID_TOGGLE_MONITORING , ID_CLEAR_METRICS , ID_EXPORT_METRICS , ID_TOGGLE_FRAME_TIME , ID_TOGGLE_FPS , ID_TOGGLE_CPU , ID_TOGGLE_MEMORY , ID_HISTORY_MINUS , ID_HISTORY_PLUS } |
Private Member Functions | |
| void | CreateLayout () |
| void | CreateToolbar () |
| void | CreateMetricsDisplay () |
| void | CreateCharts () |
| void | OnUpdateTimer (wxTimerEvent &event) |
| void | OnPaint (wxPaintEvent &event) |
| void | OnSize (wxSizeEvent &event) |
| void | OnToggleMonitoring (wxCommandEvent &event) |
| void | OnClearMetrics (wxCommandEvent &event) |
| void | OnExportMetrics (wxCommandEvent &event) |
| void | OnToggleChart (wxCommandEvent &event) |
| void | OnHistoryMinus (wxCommandEvent &event) |
| void | OnHistoryPlus (wxCommandEvent &event) |
| void | DrawChart (wxDC &dc, const wxRect &rect, std::shared_ptr< MetricData > metric) |
| void | DrawMetricInfo (wxDC &dc, const wxRect &rect, std::shared_ptr< MetricData > metric) |
| void | DrawGrid (wxDC &dc, const wxRect &rect, float minVal, float maxVal) |
| void | UpdateMetricDisplays () |
| wxRect | GetChartRect (int index, int totalCharts) const |
| wxString | FormatValue (float value, const wxString &unit) const |
| wxDECLARE_EVENT_TABLE () | |
Private Attributes | |
| wxButton * | m_toggleButton |
| wxButton * | m_clearButton |
| wxButton * | m_exportButton |
| wxStaticText * | m_statusText |
| wxPanel * | m_chartsPanel |
| wxPanel * | m_togglePanel |
| wxCheckBox * | m_frameTimeCheckbox |
| wxCheckBox * | m_fpsCheckbox |
| wxCheckBox * | m_cpuCheckbox |
| wxCheckBox * | m_memoryCheckbox |
| wxButton * | m_historyMinusButton |
| wxStaticText * | m_historyText |
| wxButton * | m_historyPlusButton |
| PerformanceMonitor * | m_monitor |
| wxTimer * | m_updateTimer |
| bool | m_monitoring |
| int | m_chartHistory |
| std::map< std::string, bool > | m_chartEnabled |
| int | m_chartHeight |
| int | m_chartMargin |
| wxFont | m_labelFont |
| wxFont | m_valueFont |
Performance panel UI for displaying real-time metrics.
Definition at line 107 of file PerformanceMonitor.h.
|
private |
| Enumerator | |
|---|---|
| ID_UPDATE_TIMER | |
| ID_TOGGLE_MONITORING | |
| ID_CLEAR_METRICS | |
| ID_EXPORT_METRICS | |
| ID_TOGGLE_FRAME_TIME | |
| ID_TOGGLE_FPS | |
| ID_TOGGLE_CPU | |
| ID_TOGGLE_MEMORY | |
| ID_HISTORY_MINUS | |
| ID_HISTORY_PLUS | |
Definition at line 192 of file PerformanceMonitor.h.
|
explicit |
|
virtual |
Definition at line 330 of file PerformanceMonitor.cpp.
|
private |
Definition at line 447 of file PerformanceMonitor.cpp.
|
private |
Definition at line 341 of file PerformanceMonitor.cpp.
|
private |
|
private |
Definition at line 351 of file PerformanceMonitor.cpp.
|
private |
Definition at line 516 of file PerformanceMonitor.cpp.
|
private |
Definition at line 574 of file PerformanceMonitor.cpp.
|
private |
Definition at line 562 of file PerformanceMonitor.cpp.
|
private |
Definition at line 606 of file PerformanceMonitor.cpp.
| std::vector< std::string > EmberForge::PerformancePanel::GetAvailableCharts | ( | ) | const |
Definition at line 760 of file PerformanceMonitor.cpp.
|
private |
Definition at line 590 of file PerformanceMonitor.cpp.
|
inline |
Definition at line 119 of file PerformanceMonitor.h.
|
inlineoverridevirtual |
Returns the tab type identifier.
Implements ITab.
Definition at line 115 of file PerformanceMonitor.h.
|
inlineoverridevirtual |
Returns the display title of the tab.
Implements ITab.
Definition at line 114 of file PerformanceMonitor.h.
|
inlineoverridevirtual |
Returns the wxWidgets window used as the tab content.
Implements ITab.
Definition at line 113 of file PerformanceMonitor.h.
| bool EmberForge::PerformancePanel::IsChartEnabled | ( | const std::string & | chartName | ) | const |
Definition at line 736 of file PerformanceMonitor.cpp.
|
private |
Definition at line 645 of file PerformanceMonitor.cpp.
|
private |
Definition at line 652 of file PerformanceMonitor.cpp.
|
private |
Definition at line 768 of file PerformanceMonitor.cpp.
|
private |
Definition at line 796 of file PerformanceMonitor.cpp.
|
private |
Definition at line 483 of file PerformanceMonitor.cpp.
|
private |
Definition at line 620 of file PerformanceMonitor.cpp.
|
private |
Definition at line 710 of file PerformanceMonitor.cpp.
|
private |
Definition at line 625 of file PerformanceMonitor.cpp.
|
private |
Definition at line 461 of file PerformanceMonitor.cpp.
| void EmberForge::PerformancePanel::RefreshDisplay | ( | ) |
Definition at line 467 of file PerformanceMonitor.cpp.
| void EmberForge::PerformancePanel::SetAllChartsEnabled | ( | bool | enabled | ) |
Definition at line 746 of file PerformanceMonitor.cpp.
| void EmberForge::PerformancePanel::SetChartEnabled | ( | const std::string & | chartName, |
| bool | enabled ) |
Definition at line 732 of file PerformanceMonitor.cpp.
| void EmberForge::PerformancePanel::SetMonitor | ( | PerformanceMonitor * | monitor | ) |
Definition at line 337 of file PerformanceMonitor.cpp.
| void EmberForge::PerformancePanel::SetUpdateInterval | ( | int | milliseconds | ) |
Definition at line 703 of file PerformanceMonitor.cpp.
|
private |
Definition at line 472 of file PerformanceMonitor.cpp.
|
private |
|
private |
Definition at line 183 of file PerformanceMonitor.h.
|
private |
Definition at line 186 of file PerformanceMonitor.h.
|
private |
Definition at line 182 of file PerformanceMonitor.h.
|
private |
Definition at line 187 of file PerformanceMonitor.h.
|
private |
Definition at line 164 of file PerformanceMonitor.h.
|
private |
Definition at line 161 of file PerformanceMonitor.h.
|
private |
Definition at line 170 of file PerformanceMonitor.h.
|
private |
Definition at line 162 of file PerformanceMonitor.h.
|
private |
Definition at line 169 of file PerformanceMonitor.h.
|
private |
Definition at line 168 of file PerformanceMonitor.h.
|
private |
Definition at line 174 of file PerformanceMonitor.h.
|
private |
Definition at line 176 of file PerformanceMonitor.h.
|
private |
Definition at line 175 of file PerformanceMonitor.h.
|
private |
Definition at line 188 of file PerformanceMonitor.h.
|
private |
Definition at line 171 of file PerformanceMonitor.h.
|
private |
Definition at line 179 of file PerformanceMonitor.h.
|
private |
Definition at line 181 of file PerformanceMonitor.h.
|
private |
Definition at line 163 of file PerformanceMonitor.h.
|
private |
Definition at line 160 of file PerformanceMonitor.h.
|
private |
Definition at line 165 of file PerformanceMonitor.h.
|
private |
Definition at line 180 of file PerformanceMonitor.h.
|
private |
Definition at line 189 of file PerformanceMonitor.h.