openMSX
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
ImGuiUtils.hh File Reference
#include "ImGuiCpp.hh"
#include "Reactor.hh"
#include "function_ref.hh"
#include "ranges.hh"
#include "strCat.hh"
#include "StringOp.hh"
#include <imgui.h>
#include <imgui_internal.h>
#include <algorithm>
#include <concepts>
#include <span>
#include <string>
#include <string_view>
#include <utility>
Include dependency graph for ImGuiUtils.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openmsx::EnumToolTip
 
struct  openmsx::GetSettingDescription
 
class  openmsx::VramTable
 

Namespaces

namespace  ImGui
 
namespace  openmsx
 This file implemented 3 utility functions:
 

Typedefs

using openmsx::EnumToolTips = std::span< const EnumToolTip >
 

Enumerations

enum class  openmsx::imColor : unsigned {
  openmsx::TRANSPARENT , openmsx::BLACK , openmsx::WHITE , openmsx::GRAY ,
  openmsx::YELLOW , openmsx::RED_BG , openmsx::YELLOW_BG , openmsx::TEXT ,
  openmsx::TEXT_DISABLED , openmsx::ERROR , openmsx::WARNING , openmsx::COMMENT ,
  openmsx::VARIABLE , openmsx::LITERAL , openmsx::PROC , openmsx::OPERATOR ,
  openmsx::KEY_ACTIVE , openmsx::KEY_NOT_ACTIVE , openmsx::NUM_COLORS
}
 

Functions

void ImGui::TextUnformatted (const std::string &str)
 
void ImGui::TextUnformatted (std::string_view str)
 
auto ImGui::CalcTextSize (std::string_view str)
 
template<typename... Ts>
void ImGui::StrCat (Ts &&...ts)
 
void ImGui::RightAlignText (std::string_view text, std::string_view maxWidthText)
 
void openmsx::simpleToolTip (std::string_view desc)
 
void openmsx::simpleToolTip (std::invocable<> auto descFunc)
 
void openmsx::HelpMarker (std::string_view desc)
 
bool openmsx::ButtonWithCustomRendering (const char *label, gl::vec2 size, bool pressed, std::invocable< gl::vec2, ImDrawList * > auto render)
 
bool openmsx::ButtonWithCustomRendering (const char *label, gl::vec2 size, std::invocable< gl::vec2, ImDrawList * > auto render)
 
bool openmsx::ButtonWithCenteredGlyph (ImWchar glyph, gl::vec2 maxGlyphSize)
 
void openmsx::centerNextWindowOverCurrent ()
 
bool openmsx::Checkbox (const HotKey &hotKey, BooleanSetting &setting)
 
bool openmsx::Checkbox (const HotKey &hotKey, const char *label, BooleanSetting &setting, function_ref< std::string(const Setting &)> getTooltip)
 
bool openmsx::SliderInt (IntegerSetting &setting, ImGuiSliderFlags flags)
 
bool openmsx::SliderInt (const char *label, IntegerSetting &setting, ImGuiSliderFlags flags)
 
bool openmsx::SliderFloat (FloatSetting &setting, const char *format, ImGuiSliderFlags flags)
 
bool openmsx::SliderFloat (const char *label, FloatSetting &setting, const char *format, ImGuiSliderFlags flags)
 
bool openmsx::InputText (Setting &setting)
 
bool openmsx::InputText (const char *label, Setting &setting)
 
void openmsx::ComboBox (Setting &setting, EnumToolTips toolTips)
 
void openmsx::ComboBox (const char *label, Setting &setting, EnumToolTips toolTips)
 
void openmsx::ComboBox (const char *label, Setting &setting, function_ref< std::string(const std::string &)> displayValue, EnumToolTips toolTips)
 
void openmsx::ComboBox (VideoSourceSetting &setting)
 
void openmsx::ComboBox (const char *label, VideoSourceSetting &setting)
 
const char * openmsx::getComboString (int item, const char *itemsSeparatedByZeros)
 
std::string openmsx::formatTime (std::optional< double > time)
 
float openmsx::calculateFade (float current, float target, float period)
 
template<int HexDigits>
void openmsx::comboHexSequence (const char *label, int *value, int mult, int max, int offset)
 
template<typename Range , typename Projection >
void openmsx::sortUpDown_T (Range &range, const ImGuiTableSortSpecs *sortSpecs, Projection proj)
 
template<typename Range , typename Projection >
void openmsx::sortUpDown_String (Range &range, const ImGuiTableSortSpecs *sortSpecs, Projection proj)
 
const std::string * openmsx::getOptionalDictValue (const std::vector< std::pair< std::string, std::string > > &info, std::string_view key)
 
template<typename T >
std::vector< std::string > openmsx::getAllValuesFor (std::string_view key, const std::vector< T > &items)
 
template<typename T >
void openmsx::displayFilterCombo (std::string &selection, zstring_view key, const std::vector< T > &items)
 
template<typename T >
void openmsx::applyComboFilter (std::string_view key, std::string_view value, const std::vector< T > &items, std::vector< size_t > &indices)
 
template<std::invocable< size_t > GetName>
void openmsx::filterIndices (std::string_view filterString, GetName getName, std::vector< size_t > &indices)
 
template<typename T >
void openmsx::applyDisplayNameFilter (std::string_view filterString, const std::vector< T > &items, std::vector< size_t > &indices)
 
std::string openmsx::getShortCutForCommand (const HotKey &hotkey, std::string_view command)
 
std::string openmsx::getKeyChordName (ImGuiKeyChord keyChord)
 
std::optional< ImGuiKeyChord > openmsx::parseKeyChord (std::string_view name)
 
void openmsx::setColors (int style)
 
ImU32 openmsx::getColor (imColor col)
 

Variables

std::array< ImU32, size_t(imColor::NUM_COLORS)> openmsx::imColors