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  bool _use_log_file = false;
40  TermMode _mode = NO_MODE;
41 
42 public:
46  void init(bool use_me, bool use_log);
47 
48  ~Term() {
49  delete _file;
50  }
51 
55  void set_mode(TermMode mode);
56 
60  void message(const char *fmt, ...);
61  void vmessage(const char *fmt, va_list va);
62 };
63 
64 void term_message(const char *fmt, ...);
65 
66 } // namespace M4
67 
68 #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