openMSX
ImGuiMachine.hh
Go to the documentation of this file.
1#ifndef IMGUI_MACHINE_HH
2#define IMGUI_MACHINE_HH
3
4#include "ImGuiPart.hh"
5
6#include <string>
7#include <vector>
8
9namespace openmsx {
10
11class ImGuiMachine final : public ImGuiPart
12{
13public:
14 struct MachineInfo {
15 std::string configName;
16 std::string displayName;
17 std::vector<std::pair<std::string, std::string>> configInfo;
18 std::optional<std::string> testResult; // lazily initialized
19 };
20
21public:
23
24 void showMenu(MSXMotherBoard* motherBoard) override;
25 void paint(MSXMotherBoard* motherBoard) override;
26
27private:
28 void paintSelectMachine(const MSXMotherBoard* motherBoard);
29 void paintTestHardware();
30 [[nodiscard]] std::vector<MachineInfo>& getAllMachines();
31 [[nodiscard]] MachineInfo* findMachineInfo(std::string_view config);
32 [[nodiscard]] const std::string& getTestResult(MachineInfo& info);
33 bool printConfigInfo(MachineInfo& info);
34
35public:
36 bool showSelectMachine = false;
37 bool showTestHardware = false;
38
39private:
40 std::vector<MachineInfo> machineInfo; // sorted on displayName
41 std::string newMachineConfig;
42 std::string filterType;
43 std::string filterRegion;
44 std::string filterString;
45};
46
47} // namespace openmsx
48
49#endif
void showMenu(MSXMotherBoard *motherBoard) override
void paint(MSXMotherBoard *motherBoard) override
ImGuiPart(ImGuiManager &manager_)
Definition ImGuiPart.hh:12
This file implemented 3 utility functions:
Definition Autofire.cc:11
std::vector< std::pair< std::string, std::string > > configInfo
std::optional< std::string > testResult