8#include <wx/listctrl.h>
9#include <wx/srchctrl.h>
28 void SetEntries(std::vector<std::shared_ptr<EmberCore::LogEntry>> *entries);
32 wxString
OnGetItemText(
long item,
long column)
const override;
37 std::vector<std::shared_ptr<EmberCore::LogEntry>> *
m_entries;
58 wxString
GetTitle()
const override {
return "Log"; }
115 void PopulateList(
const std::vector<std::shared_ptr<EmberCore::LogEntry>> &entries);
117 wxString
FormatTimestamp(
const std::chrono::system_clock::time_point ×tamp)
const;
Log panel tab that displays application logs with filtering and control capabilities.
void OnFileToggled(wxCommandEvent &event)
void OnCategoryFilterChanged(wxCommandEvent &event)
wxString GetTabType() const override
Returns the tab type identifier.
void UpdateLogCountDisplay()
wxCheckBox * m_autoScrollCheck
void UpdatePauseButtonAppearance()
std::vector< std::shared_ptr< EmberCore::LogEntry > > m_filteredEntries
wxSearchCtrl * m_searchCtrl
wxWindow * GetWidget() override
Returns the wxWidgets window used as the tab content.
void OnListItemSelected(wxListEvent &event)
void OnCopyClicked(wxCommandEvent &event)
bool m_updatingCategories
wxString GetLevelString(EmberCore::LogLevel level) const
void OnSearchTextChanged(wxCommandEvent &event)
void Initialize() override
Called once when the tab is first created.
void OnClosed() override
Called when the tab is closed.
friend class VirtualLogListCtrl
void OnConsoleToggled(wxCommandEvent &event)
void SetConsoleLoggingEnabled(bool enabled)
void OnLevelFilterChanged(wxCommandEvent &event)
VirtualLogListCtrl * m_logList
void OnClearClicked(wxCommandEvent &event)
wxString GetTitle() const override
Returns the display title of the tab.
void SetFileLoggingEnabled(bool enabled)
wxColour GetLevelColor(EmberCore::LogLevel level) const
void Refresh() override
Refreshes the tab content.
void SetCategoryFilter(const wxString &category)
wxString m_currentSearchFilter
void OnDeactivated() override
Called when the tab becomes inactive.
void SetupEventHandlers()
void PopulateList(const std::vector< std::shared_ptr< EmberCore::LogEntry > > &entries)
wxString m_currentCategoryFilter
void OnExportClicked(wxCommandEvent &event)
void SetSearchFilter(const wxString &searchText)
EmberCore::LogLevel m_currentLevelFilter
wxString FormatTimestamp(const std::chrono::system_clock::time_point ×tamp) const
void OnActivated() override
Called when the tab becomes active.
std::set< std::string > m_knownCategories
void OnListItemRightClick(wxListEvent &event)
wxCheckBox * m_consoleCheck
void SetLevelFilter(EmberCore::LogLevel level)
void OnPauseToggled(wxCommandEvent &event)
wxComboBox * m_categoryFilter
void OnAutoScrollToggled(wxCommandEvent &event)
wxStaticText * m_logCountLabel
void UpdateCategoryChoices()
EmberCore::Logger::ObserverId m_observerId
void CopySelectedToClipboard()
std::vector< std::shared_ptr< EmberCore::LogEntry > > * m_entries
void SetEntries(std::vector< std::shared_ptr< EmberCore::LogEntry > > *entries)
wxListItemAttr * OnGetItemAttr(long item) const override
wxListItemAttr m_itemAttr
VirtualLogListCtrl(wxWindow *parent, wxWindowID id, LogTab *logTab)
wxString OnGetItemText(long item, long column) const override
Interface for tab-based UI components in the application.
LogLevel
Log levels for categorizing messages.