Files
OpenRCT2-Web/src/openrct2/interface/InteractiveConsole.h
T

48 lines
1.2 KiB
C++
Raw Normal View History

/*****************************************************************************
* Copyright (c) 2014-2024 OpenRCT2 developers
*
2018-06-15 14:07:34 +02:00
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
*
2018-06-15 14:07:34 +02:00
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#pragma once
2015-05-19 03:53:37 +01:00
2018-06-22 22:59:46 +02:00
#include "../localisation/FormatCodes.h"
2024-07-12 23:24:33 +02:00
#include <cstdint>
#include <string>
2015-05-19 03:53:37 +01:00
struct DrawPixelInfo;
2018-03-11 21:12:22 +00:00
struct TextInputSession;
2018-03-13 13:14:02 +01:00
enum class ConsoleInput : uint8_t
2017-06-10 16:10:23 +01:00
{
None,
LineClear,
LineExecute,
HistoryPrevious,
HistoryNext,
ScrollPrevious,
ScrollNext,
2018-02-14 09:42:26 +01:00
};
2017-06-10 16:10:23 +01:00
2018-03-11 19:46:03 +00:00
class InteractiveConsole
{
public:
2018-06-22 22:59:46 +02:00
virtual ~InteractiveConsole()
{
}
2018-03-11 19:46:03 +00:00
2018-06-22 22:59:46 +02:00
void Execute(const std::string& s);
void WriteLine(const std::string& s);
void WriteLineError(const std::string& s);
void WriteLineWarning(const std::string& s);
void WriteFormatLine(const char* format, ...);
2018-03-11 19:46:03 +00:00
2024-07-09 15:17:07 +02:00
virtual void Clear() = 0;
virtual void Close() = 0;
virtual void Hide() = 0;
virtual void WriteLine(const std::string& s, FormatToken colourFormat) = 0;
2018-03-11 19:46:03 +00:00
};