-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathConsole.h
57 lines (52 loc) · 1.31 KB
/
Console.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
#include <deque>
#include <string>
#include <sstream>
#ifndef __CONSOLE_H__
#define __CONSOLE_H__
class Console
{
private:
static bool visible, enabled;
static unsigned int lineCount, lineWidth, commandPos, height, scrollIndex;
static std::deque<std::wstring> lines, commands, history;
static std::wstringstream cmd;
public:
static void Toggle(void);
static void TogglePrompt(void);
static void ToggleBuffer(void);
static void Hide(void);
static void HidePrompt(void);
static void HideBuffer(void);
static void Show(void);
static void ShowPrompt(void);
static void ShowBuffer(void);
static bool IsVisible(void)
{
return visible;
}
static bool IsEnabled(void)
{
return enabled;
}
static unsigned int MaxWidth(void)
{
return lineWidth;
}
static unsigned int GetHeight(void)
{
return height;
}
static void AddKey(unsigned int key);
static void ExecuteCommand(void);
static void RemoveLastKey(void);
static void PrevCommand(void);
static void NextCommand(void);
static void ScrollUp(void);
static void ScrollDown(void);
static void AddLine(std::wstring line);
static void UpdateLines(void);
static void Clear(void);
static void Draw(void);
};
#endif