What is it?
Download
FAQs
Docs
Main Page
Modules
Classes
Files
File List
include
cpp3ds
Graphics
Console.hpp
1
#ifndef CPP3DS_CONSOLE_HPP
2
#define CPP3DS_CONSOLE_HPP
3
5
// Headers
7
#include <cpp3ds/System/NonCopyable.hpp>
8
#include <cpp3ds/Graphics/Drawable.hpp>
9
#include <cpp3ds/Graphics/Font.hpp>
10
#include <cpp3ds/Graphics/Text.hpp>
11
#include <cpp3ds/Window/ContextSettings.hpp>
12
13
namespace
cpp3ds
14
{
15
16
extern
std::vector<String> g_stdout;
17
22
class
Console
:
public
Drawable
23
{
24
public
:
25
32
Console
();
33
40
~Console
();
41
42
public
:
43
44
void
create(Screen screen = BottomScreen);
45
46
void
update(
float
delta);
47
48
void
write(
String
text);
49
50
bool
processEvent(
Event
& event);
51
52
void
setVisible(
bool
visible);
53
54
static
void
initialize();
55
56
void
setScreen(Screen screen);
57
58
Screen getScreen();
59
60
void
setColor(
const
Color
& color);
61
const
Color
& getColor()
const
;
62
63
private
:
64
72
virtual
void
draw(
RenderTarget
& target,
RenderStates
states)
const
;
73
75
// Member data
77
Font
m_font;
78
Color
m_color;
79
std::vector<Text> m_lines;
80
Text
m_memoryText;
81
unsigned
int
m_limit;
82
static
bool
m_initialized;
83
bool
m_visible;
84
Screen m_screen;
85
};
86
87
}
// namespace cpp3ds
88
89
90
#endif // CPP3DS_CONSOLE_HPP
cpp3ds::Font
Class for loading and manipulating character fonts.
Definition:
Font.hpp:49
cpp3ds::Console::Console
Console()
Default constructor.
cpp3ds
Definition:
AlResource.hpp:33
cpp3ds::String
Utility string class that automatically handles conversions between types and encodings.
Definition:
String.hpp:42
cpp3ds::Console
Class holding a valid drawing context.
Definition:
Console.hpp:22
cpp3ds::Color
Utility class for manpulating RGBA colors.
Definition:
Color.hpp:36
cpp3ds::Text
Graphical text that can be drawn to a render target.
Definition:
Text.hpp:47
cpp3ds::Drawable
Abstract base class for objects that can be drawn to a render target.
Definition:
Drawable.hpp:43
cpp3ds::Console::~Console
~Console()
Destructor.
cpp3ds::RenderTarget
Base class for all render targets (window, texture, ...)
Definition:
RenderTarget.hpp:47
cpp3ds::RenderStates
Define the states used for drawing to a RenderTarget.
Definition:
RenderStates.hpp:44
cpp3ds::Event
Defines a system event and its parameters.
Definition:
Event.hpp:15