openMSX
OSDGUI.hh
Go to the documentation of this file.
1#ifndef OSDGUI_HH
2#define OSDGUI_HH
3
4#include "OSDTopWidget.hh"
5#include "Command.hh"
6
7#include <memory>
8
9namespace openmsx {
10
11class Display;
12class CommandController;
13
14class OSDGUI
15{
16public:
17 OSDGUI(CommandController& commandController, Display& display);
18
19 [[nodiscard]] Display& getDisplay() const { return display; }
20 [[nodiscard]] const OSDTopWidget& getTopWidget() const { return topWidget; }
21 [[nodiscard]] OSDTopWidget& getTopWidget() { return topWidget; }
22 void refresh() const;
23
24private:
25 Display& display;
26
27 class OSDCommand final : public Command {
28 public:
29 explicit OSDCommand(CommandController& commandController);
30 void execute(std::span<const TclObject> tokens, TclObject& result) override;
31 [[nodiscard]] std::string help(std::span<const TclObject> tokens) const override;
32 void tabCompletion(std::vector<std::string>& tokens) const override;
33
34 private:
35 void create (std::span<const TclObject> tokens, TclObject& result);
36 void destroy (std::span<const TclObject> tokens, TclObject& result);
37 void info (std::span<const TclObject> tokens, TclObject& result);
38 void exists (std::span<const TclObject> tokens, TclObject& result);
39 void configure(std::span<const TclObject> tokens, TclObject& result);
40 [[nodiscard]] std::unique_ptr<OSDWidget> create(
41 std::string_view type, const TclObject& name) const;
42 void configure(OSDWidget& widget, std::span<const TclObject> tokens) const;
43
44 [[nodiscard]] OSDWidget& getWidget(std::string_view name) const;
45 } osdCommand;
46
47 OSDTopWidget topWidget;
48};
49
50} // namespace openmsx
51
52#endif
Represents the output window/screen of openMSX.
Definition Display.hh:32
OSDTopWidget & getTopWidget()
Definition OSDGUI.hh:21
Display & getDisplay() const
Definition OSDGUI.hh:19
void refresh() const
Definition OSDGUI.cc:29
const OSDTopWidget & getTopWidget() const
Definition OSDGUI.hh:20
This file implemented 3 utility functions:
Definition Autofire.cc:11