CG_Labs 2021.2
Loading...
Searching...
No Matches
LogView.h
Go to the documentation of this file.
1// TODO: Timestamp
2
3#pragma once
4
5#include "Log.h"
6
7#define BUFFER_WIDTH 512
8#define BUFFER_ROWS 64
9
10namespace Log {
11
12class View {
13public:
14 static void Init();
15 static void Destroy();
16public:
17 static void Render();
18
19private:
20 static void Feed(Log::Type type, const char *msg);
21 static void ClearLog();
22
23private:
24 static char mOutput[BUFFER_ROWS * BUFFER_WIDTH * 2];
26 static int mLen[BUFFER_ROWS];
28 static int mBufferPtr;
29 static bool mAutoScroll;
30 static bool mScrollToBottom;
31};
32
33}
#define BUFFER_ROWS
Definition LogView.h:8
#define BUFFER_WIDTH
Definition LogView.h:7
Definition LogView.h:12
static char mOutput[BUFFER_ROWS *BUFFER_WIDTH *2]
Definition LogView.h:24
static void Destroy()
Definition LogView.cpp:36
static Log::Type mType[BUFFER_ROWS]
Definition LogView.h:27
static void Feed(Log::Type type, const char *msg)
Definition LogView.cpp:102
static void ClearLog()
Definition LogView.cpp:112
static int mLen[BUFFER_ROWS]
Definition LogView.h:26
static void Render()
Definition LogView.cpp:41
static bool mAutoScroll
Definition LogView.h:29
static bool mScrollToBottom
Definition LogView.h:30
static int mBufferPtr
Definition LogView.h:28
static void Init()
Definition LogView.cpp:19
static char mBuffer[BUFFER_ROWS][BUFFER_WIDTH]
Definition LogView.h:25
Definition Log.cpp:15
Type
Definition Log.h:34