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