mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-09 08:21:18 +12:00
Add all the files
This commit is contained in:
parent
e3db07a16a
commit
d60742f52b
1445 changed files with 430238 additions and 0 deletions
44
src/gui/LoggingWindow.h
Normal file
44
src/gui/LoggingWindow.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
#pragma once
|
||||
|
||||
#include <wx/frame.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/combobox.h>
|
||||
#include "gui/components/wxLogCtrl.h"
|
||||
|
||||
class wxLogEvent;
|
||||
|
||||
class LoggingWindow : public wxFrame
|
||||
{
|
||||
public:
|
||||
LoggingWindow(wxFrame* parent);
|
||||
~LoggingWindow();
|
||||
|
||||
static void Log(std::string_view filter, std::string_view message);
|
||||
static void Log(std::string_view message) { Log("", message); }
|
||||
static void Log(std::string_view filter, std::wstring_view message);
|
||||
static void Log(std::wstring_view message){ Log("", message); }
|
||||
|
||||
template<typename ...TArgs>
|
||||
static void Log(std::string_view filter, std::string_view format, TArgs&&... args)
|
||||
{
|
||||
Log(filter, fmt::format(format, std::forward<TArgs>(args)...));
|
||||
}
|
||||
|
||||
template<typename ...TArgs>
|
||||
static void Log(std::string_view filter, std::wstring_view format, TArgs&&... args)
|
||||
{
|
||||
Log(filter, fmt::format(format, std::forward<TArgs>(args)...));
|
||||
}
|
||||
private:
|
||||
void OnLogMessage(wxLogEvent& event);
|
||||
void OnFilterChange(wxCommandEvent& event);
|
||||
void OnFilterMessageChange(wxCommandEvent& event);
|
||||
|
||||
wxComboBox* m_filter;
|
||||
wxLogCtrl* m_log_list;
|
||||
wxCheckBox* m_filter_message;
|
||||
|
||||
inline static std::shared_mutex s_mutex;
|
||||
inline static LoggingWindow* s_instance = nullptr;
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue