OXYGENHUB
◆ main openmsx / src / events / TclCallbackMessages.hh
777 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef TCLCALLBACKMESSAGES_HH
2
#define TCLCALLBACKMESSAGES_HH
3
4
#include "CliListener.hh"
5
#include "TclCallback.hh"
6
7
namespace openmsx {
8
9
class GlobalCliComm;
10
class CommandController;
11
12
class TclCallbackMessages final : public CliListener
13
{
14
public:
15
	TclCallbackMessages(GlobalCliComm& cliComm, CommandController& controller);
16
	~TclCallbackMessages() override;
17
18
	void log(CliComm::LogLevel level, std::string_view message, float fraction) noexcept override;
19
20
	void update(CliComm::UpdateType type, std::string_view machine,
21
	            std::string_view name, std::string_view value) noexcept override;
22
23
	void redoPostponedCallbacks();
24
25
private:
26
	GlobalCliComm& cliComm;
27
	TclCallback messageCallback;
28
29
	std::vector<TclObject> postponedCommands;
30
};
31
32
} // namespace openmsx
33
34
#endif