2020-02-29 10:33:37 +01:00

33 lines
767 B
C++

#pragma once
#include "Window.h"
#include "utils.h"
namespace eg3d {
class Logger {
protected:
HWND mHWND; // ablak handle-je
HWND mhListBox; // a gomb handle-je
static bool sWindowClassInitialized; // inicializálva van a window class?
static LRESULT CALLBACK smLoggerWindowFunc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); // window process
public:
// ablak szélessége és magassága
static constexpr unsigned sDEF_width = 600;
static constexpr unsigned sDEF_height = 100;
static const char * sDEF_LoggerCaption; // alapértelmezett ablakfelirat
public:
Logger();
~Logger();
void log(const std::string& text) const; // sor felvétele a logba
};
}
extern eg3d::Logger gLogger;
#define LOG(text) gLogger.log(text)