logmeow/misc.h

19 lines
622 B
C++

#pragma once
#include <string>
#include <imgui.h>
std::string quote(const std::string& str);
void throw_system_error(int err, const char* what);
void throw_system_error(const char* what);
void throw_system_error(std::string what);
namespace ImGui {
void TextUnformatted(const std::string& str);
bool RedButton(const char* label);
bool Button(const char* label, bool enabled);
bool BeginWithCloseShortcut(const char* label, bool* p_open, ImGuiWindowFlags flags = 0);
// don't spill __all__ of imgui_internal.h
bool IsKeyPressed(ImGuiKeyChord key_chord, bool repeat = true);
}; // namespace ImGui