openMSX
ImGuiVdpRegs.hh
Go to the documentation of this file.
1#ifndef IMGUI_VDP_REGS_HH
2#define IMGUI_VDP_REGS_HH
3
4#include "ImGuiPart.hh"
5
6#include "EmuTime.hh"
7
8#include <cstdint>
9#include <span>
10
11namespace openmsx {
12
13class ImGuiManager;
14class VDP;
15
16class ImGuiVdpRegs final : public ImGuiPart
17{
18public:
20
21 [[nodiscard]] zstring_view iniName() const override { return "vdp registers"; }
22 void save(ImGuiTextBuffer& buf) override;
23 void loadLine(std::string_view name, zstring_view value) override;
24 void paint(MSXMotherBoard* motherBoard) override;
25
26private:
27 void drawSection(std::span<const uint8_t> showRegisters, std::span<const uint8_t> regValues,
28 VDP& vdp, EmuTime::param time);
29
30public:
31 bool show = false;
32
33private:
34 int hoveredFunction = -1;
35 int newHoveredFunction = -1;
36 bool explanation = true;
37 bool openControl = false;
38 bool openMode = false;
39 bool openBase = false;
40 bool openColor = false;
41 bool openDisplay = false;
42 bool openAccess = false;
43 bool openV9958 = false;
44 bool openCommand = false;
45 bool openStatus = false;
46
47 static constexpr auto persistentElements = std::tuple{
49 PersistentElement{"explanation", &ImGuiVdpRegs::explanation},
50 PersistentElement{"openControl", &ImGuiVdpRegs::openControl},
51 PersistentElement{"openMode", &ImGuiVdpRegs::openMode},
52 PersistentElement{"openBase", &ImGuiVdpRegs::openBase},
53 PersistentElement{"openColor", &ImGuiVdpRegs::openColor},
54 PersistentElement{"openDisplay", &ImGuiVdpRegs::openDisplay},
55 PersistentElement{"openAccess", &ImGuiVdpRegs::openAccess},
56 PersistentElement{"openV9958", &ImGuiVdpRegs::openV9958},
57 PersistentElement{"openCommand", &ImGuiVdpRegs::openCommand},
58 PersistentElement{"openStatus", &ImGuiVdpRegs::openStatus}
59 };
60};
61
62} // namespace openmsx
63
64#endif
ImGuiPart(ImGuiManager &manager_)
Definition ImGuiPart.hh:12
zstring_view iniName() const override
void loadLine(std::string_view name, zstring_view value) override
void paint(MSXMotherBoard *motherBoard) override
void save(ImGuiTextBuffer &buf) override
Unified implementation of MSX Video Display Processors (VDPs).
Definition VDP.hh:66
Like std::string_view, but with the extra guarantee that it refers to a zero-terminated string.
This file implemented 3 utility functions:
Definition Autofire.cc:11