summaryrefslogtreecommitdiff
path: root/src/include/tome/squelch/tree_printer.hpp
blob: e8ee1e5630e3e873bf91cf7145aecfb3d42116ce (plain)
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
#ifndef H_3d6cc652_c674_4a84_911d_e8ec35cc992a
#define H_3d6cc652_c674_4a84_911d_e8ec35cc992a

#include <boost/noncopyable.hpp>
#include <cstdint>

namespace squelch {

/**
 * Printing trees.
 */
class TreePrinter : boost::noncopyable
{
public:
	TreePrinter();

	void indent();

	void dedent();

	void reset();

	void reset_scroll();

	void scroll_up();

	void scroll_down();

	void scroll_left();

	void scroll_right();

	void write(uint8_t color, const char *line);

private:
	int m_indent;
	int m_write_out_y;
	int m_write_out_x;
	int m_write_out_h;
	int m_write_out_w;
	int m_write_y;
	int m_write_x;
	int m_write_off_x;
	int m_write_off_y;
};

} // namespace

#endif