54#include <imgui_impl_opengl3.h>
55#include <imgui_impl_sdl2.h>
56#include <imgui_internal.h>
57#include <CustomFont.ii>
63using namespace std::literals;
65ImFont* ImGuiManager::addFont(
zstring_view filename,
int fontSize)
67 auto& io = ImGui::GetIO();
68 if (!filename.
empty()) {
73 auto fileSize = file.getSize();
74 auto ttfData = std::span(
75 static_cast<uint8_t*
>(ImGui::MemAlloc(fileSize)), fileSize);
78 static const std::array<ImWchar, 2*6 + 1>
ranges = {
94 return io.Fonts->AddFontFromMemoryTTF(
96 narrow<int>(ttfData.size()), narrow<float>(fontSize),
98 }
catch (MSXException& e) {
100 ". Reverted to builtin font");
103 return io.Fonts->AddFontDefault();
106void ImGuiManager::loadFont()
108 ImGuiIO& io = ImGui::GetIO();
114 static constexpr std::array<ImWchar, 3> icons_ranges = {ICON_MIN_IGFD, ICON_MAX_IGFD, 0};
115 ImFontConfig icons_config; icons_config.MergeMode =
true; icons_config.PixelSnapH =
true;
116 io.Fonts->AddFontFromMemoryCompressedBase85TTF(FONT_ICON_BUFFER_NAME_IGFD, 15.0f, &icons_config, icons_ranges.data());
124void ImGuiManager::reloadFont()
130 ImGuiIO& io = ImGui::GetIO();
138void ImGuiManager::initializeImGui()
141 IMGUI_CHECKVERSION();
142 ImGui::CreateContext();
143 ImGuiIO& io = ImGui::GetIO();
144 io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard |
146 ImGuiConfigFlags_DockingEnable |
147 ImGuiConfigFlags_ViewportsEnable;
149 io.IniFilename = iniFilename.c_str();
154static void cleanupImGui()
156 ImGui::DestroyContext();
162 , fontPropFilename(reactor.getCommandController(),
"gui_font_default_filename",
"TTF font filename for the default GUI font",
"DejaVuSans.ttf.gz")
163 , fontMonoFilename(reactor.getCommandController(),
"gui_font_mono_filename",
"TTF font filename for the monospaced GUI font",
"DejaVuSansMono.ttf.gz")
164 , fontPropSize(reactor.getCommandController(),
"gui_font_default_size",
"size for the default GUI font", 13, 9, 72)
165 , fontMonoSize(reactor.getCommandController(),
"gui_font_mono_size",
"size for the monospaced GUI font", 13, 9, 72)
166 , windowPos{SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED}
168 parts.push_back(
this);
171 machine = std::make_unique<ImGuiMachine>(*
this);
172 media = std::make_unique<ImGuiMedia>(*
this);
173 connector = std::make_unique<ImGuiConnector>(*
this);
174 reverseBar = std::make_unique<ImGuiReverseBar>(*
this);
175 tools = std::make_unique<ImGuiTools>(*
this);
176 settings = std::make_unique<ImGuiSettings>(*
this);
177 debugger = std::make_unique<ImGuiDebugger>(*
this);
178 help = std::make_unique<ImGuiHelp>(*
this);
180 breakPoints = std::make_unique<ImGuiBreakPoints>(*
this);
181 symbols = std::make_unique<ImGuiSymbols>(*
this);
182 watchExpr = std::make_unique<ImGuiWatchExpr>(*
this);
183 bitmap = std::make_unique<ImGuiBitmapViewer>(*
this);
184 character = std::make_unique<ImGuiCharacter>(*
this);
185 sprite = std::make_unique<ImGuiSpriteViewer>(*
this);
186 vdpRegs = std::make_unique<ImGuiVdpRegs>(*
this);
187 palette = std::make_unique<ImGuiPalette>(*
this);
188 osdIcons = std::make_unique<ImGuiOsdIcons>(*
this);
189 openFile = std::make_unique<ImGuiOpenFile>(*
this);
190 trainer = std::make_unique<ImGuiTrainer>(*
this);
191 cheatFinder = std::make_unique<ImGuiCheatFinder>(*
this);
192 sccViewer = std::make_unique<ImGuiSCCViewer>(*
this);
193 waveViewer = std::make_unique<ImGuiWaveViewer>(*
this);
195 soundChip = std::make_unique<ImGuiSoundChip>(*
this);
196 keyboard = std::make_unique<ImGuiKeyboard>(*
this);
197 console = std::make_unique<ImGuiConsole>(*
this);
198 messages = std::make_unique<ImGuiMessages>(*
this);
201 ImGuiSettingsHandler ini_handler;
202 ini_handler.TypeName =
"openmsx";
203 ini_handler.TypeHash =
ImHashStr(
"openmsx");
204 ini_handler.UserData =
this;
209 ini_handler.ReadInitFn = [](ImGuiContext*, ImGuiSettingsHandler* handler) {
211 static_cast<ImGuiManager*
>(handler->UserData)->iniReadInit();
213 ini_handler.ReadOpenFn = [](ImGuiContext*, ImGuiSettingsHandler* handler,
const char* name) ->
void* {
215 return static_cast<ImGuiManager*
>(handler->UserData)->iniReadOpen(name);
217 ini_handler.ReadLineFn = [](ImGuiContext*, ImGuiSettingsHandler* handler,
void* entry,
const char* line) {
219 static_cast<ImGuiManager*
>(handler->UserData)->loadLine(entry, line);
221 ini_handler.ApplyAllFn = [](ImGuiContext*, ImGuiSettingsHandler* handler) {
223 static_cast<ImGuiManager*
>(handler->UserData)->iniApplyAll();
225 ini_handler.WriteAllFn = [](ImGuiContext*, ImGuiSettingsHandler* handler, ImGuiTextBuffer* out_buf) {
227 static_cast<ImGuiManager*
>(handler->UserData)->iniWriteAll(*out_buf);
229 ImGui::AddSettingsHandler(&ini_handler);
266 assert(!
contains(toBeAddedParts, part));
267 toBeAddedParts.push_back(part);
272 if (
auto it1 =
ranges::find(parts, part); it1 != parts.end()) {
275 }
else if (
auto it2 =
ranges::find(toBeAddedParts, part); it2 != toBeAddedParts.end()) {
276 toBeAddedParts.erase(it2);
280void ImGuiManager::updateParts()
287 append(parts, toBeAddedParts);
288 toBeAddedParts.clear();
291void ImGuiManager::save(ImGuiTextBuffer& buf)
299void ImGuiManager::loadLine(std::string_view name,
zstring_view value)
304void ImGuiManager::loadEnd()
331 delayedActionQueue.push_back(std::move(action));
336 const std::function<
void(
const TclObject&)>& ok,
337 const std::function<
void(
const std::string&)>& error)
344 if (error) error(e.getMessage());
350 const std::function<
void(
const TclObject&)>& ok)
353 [
this](
const std::string& message) { this->
printError(message); });
361bool ImGuiManager::signalEvent(
const Event& event)
363 if (
auto* evt = get_event_if<SdlEvent>(event)) {
364 const ImGuiIO& io = ImGui::GetIO();
365 if (!io.BackendPlatformUserData) {
369 const SDL_Event& sdlEvent = evt->getSdlEvent();
371 if ((io.WantCaptureMouse &&
372 sdlEvent.type ==
one_of(SDL_MOUSEMOTION, SDL_MOUSEWHEEL,
373 SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP)) ||
374 (io.WantCaptureKeyboard &&
375 sdlEvent.type ==
one_of(SDL_KEYDOWN, SDL_KEYUP, SDL_TEXTINPUT))) {
381 for (
auto& action : delayedActionQueue) {
384 delayedActionQueue.clear();
388 const auto& fde = get_event<FileDropEvent>(event);
389 droppedFile = fde.getFileName();
390 handleDropped =
true;
409void ImGuiManager::update(
const Setting& )
noexcept
411 needReloadFont =
true;
415static std::vector<std::string> getDrives(MSXMotherBoard* motherBoard)
417 std::vector<std::string> result;
418 if (!motherBoard)
return result;
420 std::string driveName =
"diskX";
423 if (!(*drivesInUse)[i])
continue;
424 driveName[4] = char(
'a' + i);
425 result.push_back(driveName);
430static std::vector<std::string> getSlots(MSXMotherBoard* motherBoard)
432 std::vector<std::string> result;
433 if (!motherBoard)
return result;
435 const auto& slotManager = motherBoard->getSlotManager();
436 std::string cartName =
"cartX";
437 for (
auto slot :
xrange(CartridgeSlotManager::MAX_SLOTS)) {
438 if (!slotManager.slotExists(slot))
continue;
439 cartName[4] = char(
'a' + slot);
440 result.push_back(cartName);
448 ImGui::LoadIniSettingsFromDisk(
loadIniFile.c_str());
463 for (
auto* part : parts) {
464 part->paint(motherBoard);
471 for (
auto* part : parts) {
472 part->showMenu(motherBoard);
475 if (mainMenuBarUndocked) {
476 im::Window(
"openMSX main menu", &mainMenuBarUndocked, ImGuiWindowFlags_MenuBar, [&]{
478 if (ImGui::ArrowButton(
"re-dock-button", ImGuiDir_Down)) {
479 mainMenuBarUndocked =
false;
481 simpleToolTip(
"Dock the menu bar in the main openMSX window.");
486 bool active = ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow) ||
487 ImGui::IsWindowFocused(ImGuiHoveredFlags_AnyWindow);
488 if (active != guiActive) {
495 auto target = active ? 1.0f : 0.0001f;
496 auto period = active ? 0.5f : 5.0f;
501 if (ImGui::ArrowButton(
"undock-button", ImGuiDir_Up)) {
502 mainMenuBarUndocked =
true;
504 simpleToolTip(
"Undock the menu bar from the main openMSX window.");
513 auto insert2 = [&](std::string_view displayName,
TclObject cmd) {
514 auto message =
strCat(
"Inserted ", droppedFile,
" in ", displayName);
516 insertedInfo = message;
517 openInsertedInfo =
true;
520 auto insert = [&](std::string_view displayName, std::string_view cmd) {
521 insert2(displayName,
makeTclList(cmd,
"insert", droppedFile));
524 handleDropped =
false;
525 insertedInfo.clear();
527 auto category =
execute(
makeTclList(
"openmsx_info",
"file_type_category", droppedFile))->getString();
532 auto error = [&](
auto&& ...message) {
535 auto cantHandle = [&](
auto&& ...message) {
536 error(
"Can't handle dropped file ", droppedFile,
": ", message...);
538 auto notPresent = [&](
const auto& mediaType) {
539 cantHandle(
"no ", mediaType,
" present.");
542 auto testMedia = [&](std::string_view displayName, std::string_view cmd) {
544 insert(displayName, cmd);
546 notPresent(displayName);
550 if (category ==
"disk") {
551 auto list = getDrives(motherBoard);
553 notPresent(
"disk drive");
554 }
else if (list.size() == 1) {
555 const auto& drive = list.front();
556 insert(
strCat(
"disk drive ",
char(drive.back() -
'a' +
'A')), drive);
558 selectList = std::move(list);
559 ImGui::OpenPopup(
"select-drive");
561 }
else if (category ==
"rom") {
562 auto list = getSlots(motherBoard);
564 notPresent(
"cartridge slot");
567 selectedMedia = list.front();
568 selectList = std::move(list);
574 selectedRomType = romInfo ? romInfo->
getRomType()
576 ImGui::OpenPopup(
"select-cart");
577 }
else if (category ==
"cassette") {
578 testMedia(
"casette port",
"cassetteplayer");
579 }
else if (category ==
"laserdisc") {
580 testMedia(
"laser disc player",
"laserdiscplayer");
581 }
else if (category ==
"savestate") {
583 }
else if (category ==
"replay") {
585 }
else if (category ==
"script") {
590 cantHandle(
"unknown file type");
595 auto n = std::min(3.5f, narrow<float>(selectList.size()));
596 auto height = n * ImGui::GetTextLineHeightWithSpacing() + ImGui::GetStyle().FramePadding.y;
597 im::ListBox(
"##select-media", {-FLT_MIN, height}, [&]{
598 for (
const auto& item : selectList) {
599 auto drive = item.back() -
'a';
600 auto display =
strCat(
char(
'A' + drive),
": ",
media->displayNameForDriveContent(drive,
true));
601 if (ImGui::Selectable(display.c_str())) {
602 insert(
strCat(
"disk drive ",
char(drive +
'A')), item);
603 ImGui::CloseCurrentPopup();
617 ImGui::TableSetupColumn(
"description", ImGuiTableColumnFlags_WidthFixed);
618 ImGui::TableSetupColumn(
"value", ImGuiTableColumnFlags_WidthStretch);
623 if (ImGui::TableNextColumn()) {
624 ImGui::AlignTextToFramePadding();
627 if (ImGui::TableNextColumn()) {
633 if (selectList.size() > 1) {
634 const auto& slotManager = motherBoard->getSlotManager();
636 auto n = std::min(3.5f, narrow<float>(selectList.size()));
637 auto height = n * ImGui::GetTextLineHeightWithSpacing() + ImGui::GetStyle().FramePadding.y;
638 im::ListBox(
"##select-media", {-FLT_MIN, height}, [&]{
639 for (
const auto& item : selectList) {
640 auto slot = item.back() -
'a';
643 " (", slotManager.getPsSsString(slot),
"): ",
644 media->displayNameForSlotContent(slotManager, slot,
true));
646 if (ImGui::Selectable(display.c_str(), item == selectedMedia)) {
647 selectedMedia = item;
653 ImGui::Checkbox(
"Reset MSX on inserting ROM", &
media->resetOnInsertRom);
655 if (ImGui::Button(
"Insert ROM")) {
656 auto cmd =
makeTclList(selectedMedia,
"insert", droppedFile);
660 insert2(
strCat(
"cartridge slot ",
char(selectedMedia.back() -
'a' +
'A')), cmd);
661 if (
media->resetOnInsertRom) {
664 ImGui::CloseCurrentPopup();
667 if (ImGui::Button(
"Cancel")) {
668 ImGui::CloseCurrentPopup();
671 if (openInsertedInfo) {
672 openInsertedInfo =
false;
673 insertedInfoTimeout = 3.0f;
674 ImGui::OpenPopup(
"inserted-info");
677 insertedInfoTimeout -= ImGui::GetIO().DeltaTime;
678 if (insertedInfoTimeout <= 0.0f || insertedInfo.empty()) {
679 ImGui::CloseCurrentPopup();
689 if (ImGui::BeginViewportSideBar(
"##MainStatusBar",
nullptr, ImGuiDir_Down, ImGui::GetFrameHeight(),
690 ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_MenuBar)) {
692 auto frameTime = ImGui::GetIO().DeltaTime;
695 fpsDrawTimeOut -= frameTime;
696 if (fpsDrawTimeOut < 0.0f) {
697 fpsDrawTimeOut = 0.1f;
700 std::stringstream ssFps;
701 ssFps << std::fixed << std::setprecision(1) << fps <<
" fps";
706 auto [modeStr, extendedStr] = [&] {
707 if (!motherBoard)
return std::pair{
"-",
""};
708 const auto* vdp =
dynamic_cast<const VDP*
>(motherBoard->
findDevice(
"VDP"));
709 if (!vdp)
return std::pair{
"-",
""};
711 auto mode = vdp->getDisplayMode();
712 auto base = mode.getBase();
724 ? (mode.getByte() &
DisplayMode::YAE) ? std::pair{
"11",
"GRAPHIC 7 (YJK/YAE mode)"} : std::pair{
"12",
"GRAPHIC 7 (YJK mode)"}
725 : std::pair{
"8",
"GRAPHIC 7"};
729 std::string result =
"screen mode as used in MSX-BASIC";
730 if (extendedStr[0]) {
731 strAppend(result,
", corresponds to VDP mode ", extendedStr);
737 auto timeStr = motherBoard
746 speedDrawTimeOut -= frameTime;
747 if (speedDrawTimeOut < 0.0f) {
748 auto realTimePassed = 1.0f - speedDrawTimeOut;
749 speedDrawTimeOut = 1.0f;
752 auto boardTimePassed = (boardTime < prevBoardTime)
754 : (boardTime - prevBoardTime).toDouble();
755 prevBoardTime = boardTime;
757 speed = 100.0f * boardTimePassed / realTimePassed;
761 prevBoardTime = EmuTime::zero();
768 if (
const HardwareConfig* machineConfig = motherBoard->
getMachineConfig()) {
769 if (
const auto* info = machineConfig->getConfig().findChild(
"info")) {
770 auto manuf = info->getChildData(
"manufacturer",
"?");
771 auto code = info->getChildData(
"code",
"?");
774 auto type = info->getChildData(
"type",
"");
775 auto desc = info->getChildData(
"description",
"");
776 return strCat((type.empty() ?
"" :
strCat(
"Machine type: ", type,
'\n')), desc);
783 if (
auto result =
execute(TclObject(
"guess_title"))) {
793void ImGuiManager::iniReadInit()
796 for (
auto* part : parts) {
803void* ImGuiManager::iniReadOpen(std::string_view name)
806 for (
auto* part : parts) {
807 if (part->iniName() == name)
return part;
812void ImGuiManager::loadLine(
void* entry,
const char* line_)
const
815 auto pos = line.
find(
'=');
817 std::string_view name = line.
substr(0, pos);
821 static_cast<ImGuiPartInterface*
>(entry)->loadLine(name, value);
824void ImGuiManager::iniApplyAll()
827 for (
auto* part : parts) {
832void ImGuiManager::iniWriteAll(ImGuiTextBuffer& buf)
835 for (
auto* part : parts) {
836 if (
auto name = part->iniName(); !name.empty()) {
837 buf.appendf(
"[openmsx][%s]\n", name.c_str());
void printError(std::string_view message)
void printWarning(std::string_view message)
static constexpr uint8_t GRAPHIC3
static constexpr uint8_t MULTICOLOR
static constexpr uint8_t GRAPHIC4
static constexpr uint8_t GRAPHIC5
static constexpr uint8_t GRAPHIC1
static constexpr uint8_t GRAPHIC7
static constexpr uint8_t TEXT2
static constexpr byte YAE
Encoding of YAE flag.
static constexpr uint8_t GRAPHIC6
static constexpr byte YJK
Encoding of YJK flag.
static constexpr uint8_t GRAPHIC2
static constexpr uint8_t TEXT1
void setWindowPosition(gl::ivec2 pos)
void unregisterEventListener(EventType type, EventListener &listener)
Unregisters a previously registered event listener.
void distributeEvent(Event &&event)
Schedule the given event for delivery.
void registerEventListener(EventType type, EventListener &listener, Priority priority=Priority::OTHER)
Registers a given object to receive certain events.
std::string resolveCreate(std::string_view filename) const
Sha1Sum getSha1Sum(File &file)
Calculate sha1sum for the given File object.
zstring_view getString() const noexcept
std::unique_ptr< ImGuiMachine > machine
void registerPart(ImGuiPartInterface *part)
std::unique_ptr< ImGuiBreakPoints > breakPoints
void printError(std::string_view message)
std::unique_ptr< ImGuiVdpRegs > vdpRegs
std::unique_ptr< ImGuiCheatFinder > cheatFinder
std::unique_ptr< ImGuiTrainer > trainer
std::unique_ptr< ImGuiDiskManipulator > diskManipulator
IntegerSetting fontMonoSize
std::unique_ptr< ImGuiWatchExpr > watchExpr
std::unique_ptr< ImGuiPalette > palette
std::unique_ptr< ImGuiWaveViewer > waveViewer
std::unique_ptr< ImGuiConnector > connector
std::optional< TclObject > execute(TclObject command)
std::unique_ptr< ImGuiKeyboard > keyboard
std::unique_ptr< ImGuiHelp > help
IntegerSetting fontPropSize
std::unique_ptr< ImGuiSpriteViewer > sprite
Interpreter & getInterpreter()
std::unique_ptr< ImGuiConsole > console
std::unique_ptr< ImGuiSoundChip > soundChip
ImGuiManager(Reactor &reactor_)
std::unique_ptr< ImGuiReverseBar > reverseBar
std::unique_ptr< ImGuiMedia > media
std::unique_ptr< ImGuiMessages > messages
std::unique_ptr< ImGuiOpenFile > openFile
std::unique_ptr< ImGuiOsdIcons > osdIcons
FilenameSetting fontPropFilename
std::unique_ptr< ImGuiBitmapViewer > bitmap
std::unique_ptr< ImGuiSettings > settings
std::unique_ptr< ImGuiDebugger > debugger
std::unique_ptr< ImGuiSCCViewer > sccViewer
std::unique_ptr< ImGuiCharacter > character
void unregisterPart(ImGuiPartInterface *part)
std::unique_ptr< ImGuiTools > tools
void executeDelayed(std::function< void()> action)
FilenameSetting fontMonoFilename
std::unique_ptr< ImGuiSymbols > symbols
int getInt() const noexcept
EmuTime::param getCurrentTime() const
Convenience method: This is the same as getScheduler().getCurrentTime().
const HardwareConfig * getMachineConfig() const
MSXDevice * findDevice(std::string_view name)
Find a MSXDevice by name.
Contains the main loop of openMSX.
MSXMotherBoard * getMotherBoard() const
Interpreter & getInterpreter()
EventDistributor & getEventDistributor()
RomDatabase & getSoftwareDatabase()
static std::shared_ptr< DrivesInUse > getDrivesInUse(MSXMotherBoard &motherBoard)
const RomInfo * fetchRomInfo(const Sha1Sum &sha1sum) const
Lookup an entry in the database by sha1sum.
static std::string_view romTypeToName(RomType type)
RomType getRomType() const
void detach(Observer< T > &observer)
void attach(Observer< T > &observer)
TclObject executeCommand(Interpreter &interp, bool compile=false)
Interpret this TclObject as a command and execute it.
Like std::string_view, but with the extra guarantee that it refers to a zero-terminated string.
static constexpr auto npos
constexpr auto find(char c, size_type pos=0) const
constexpr zstring_view substr(size_type pos) const
constexpr auto empty() const
ImGuiID ImHashStr(const char *data_p, size_t data_size, ImGuiID seed)
bool ImGui_ImplOpenGL3_CreateFontsTexture()
void ImGui_ImplOpenGL3_DestroyFontsTexture()
bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event *event)
void TextUnformatted(const std::string &str)
void RightAlignText(std::string_view text, std::string_view maxWidthText)
std::optional< Context > context
void Table(const char *str_id, int column, ImGuiTableFlags flags, const ImVec2 &outer_size, float inner_width, std::invocable<> auto next)
void MainMenuBar(std::invocable<> auto next)
void MenuBar(std::invocable<> auto next)
void Window(const char *name, bool *p_open, ImGuiWindowFlags flags, std::invocable<> auto next)
void StyleVar(ImGuiStyleVar idx, float val, std::invocable<> auto next)
void ListBox(const char *label, const ImVec2 &size, std::invocable<> auto next)
void TextWrapPos(float wrap_local_pos_x, std::invocable<> auto next)
void Popup(const char *str_id, ImGuiWindowFlags flags, std::invocable<> auto next)
string_view getExtension(string_view path)
Returns the extension portion of a path.
bool isDirectory(const Stat &st)
string join(string_view part1, string_view part2)
Join two paths.
This file implemented 3 utility functions:
const FileContext & systemFileContext()
bool loadOnePersistent(std::string_view name, zstring_view value, C &c, const std::tuple< Elements... > &tup)
void simpleToolTip(std::string_view desc)
void savePersistent(ImGuiTextBuffer &buf, C &c, const std::tuple< Elements... > &tup)
EventType getType(const Event &event)
std::variant< KeyUpEvent, KeyDownEvent, MouseMotionEvent, MouseButtonUpEvent, MouseButtonDownEvent, MouseWheelEvent, JoystickAxisMotionEvent, JoystickHatEvent, JoystickButtonUpEvent, JoystickButtonDownEvent, OsdControlReleaseEvent, OsdControlPressEvent, WindowEvent, TextEvent, FileDropEvent, QuitEvent, FinishFrameEvent, CliCommandEvent, GroupEvent, BootEvent, FrameDrawnEvent, BreakEvent, SwitchRendererEvent, TakeReverseSnapshotEvent, AfterTimedEvent, MachineLoadedEvent, MachineActivatedEvent, MachineDeactivatedEvent, MidiInReaderEvent, MidiInWindowsEvent, MidiInCoreMidiEvent, MidiInCoreMidiVirtualEvent, MidiInALSAEvent, Rs232TesterEvent, Rs232NetEvent, ImGuiDelayedActionEvent, ImGuiActiveEvent > Event
std::string formatTime(std::optional< double > time)
float calculateFade(float current, float target, float period)
TclObject makeTclList(Args &&... args)
auto remove(ForwardRange &&range, const T &value)
auto find(InputRange &&range, const T &value)
constexpr bool contains(ITER first, ITER last, const VAL &val)
Check if a range contains a given value, using linear search.
TemporaryString tmpStrCat(Ts &&... ts)
void strAppend(std::string &result, Ts &&...ts)
constexpr auto xrange(T e)