ScummVM API documentation
term.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef M4_CORE_TERM_H
23 #define M4_CORE_TERM_H
24 
25 #include "common/stream.h"
26 
27 namespace M4 {
28 
29 enum TermMode {
30  NO_MODE = 0,
31  MESSAGE_MODE,
32  MEMORY_MODE
33 };
34 
35 class Term {
36 private:
37  Common::WriteStream *_file = nullptr;
38  bool _using_mono_screen = false;
39  TermMode _mode = NO_MODE;
40 
41 public:
45  void init(bool use_me, bool use_log);
46 
47  ~Term() {
48  delete _file;
49  }
50 
54  void set_mode(TermMode mode);
55 
59  void message(const char *fmt, ...);
60  void vmessage(const char *fmt, va_list va);
61 };
62 
63 void term_message(const char *fmt, ...);
64 
65 } // namespace M4
66 
67 #endif
Definition: stream.h:77
void message(const char *fmt,...)
void init(bool use_me, bool use_log)
Definition: database.h:28
void set_mode(TermMode mode)
Definition: term.h:35