namespace mrpt::imgui
Overview
namespace imgui { // structs struct FileDialogFilter; struct ImageViewTransform; // classes template <typename T> class AsyncTask; class AsyncTaskContext; class CImGuiAboutDialog; class CImGuiAppShell; class CImGuiBackgroundScene; class CImGuiFileDialog; class CImGuiImageView; class CImGuiLogConsole; class CImGuiMessageQueue; class CImGuiPlotPanel; class CImGuiSceneView; class CImGuiTimeline; class SimpleFileDialog; // global functions std::string sanitizeFileName(const std::string& s); std::string userConfigDirectory(const std::string& appName, bool create = true); bool fileMatchesFilter(const std::string& fileName, const FileDialogFilter& filter); std::vector<std::string> toNativeFilterList(const std::vector<FileDialogFilter>& filters); void applyStyle(float dpiScale = 1.0f); ImVec4 toImVec4(const mrpt::img::TColor& c); ImVec4 toImVec4(const mrpt::img::TColorf& c); mrpt::img::TColor toTColor(const ImVec4& c); ImU32 toImU32(const mrpt::img::TColor& c); ImVec2 regionSizeInPixels(const ImVec2& size); void tooltip(const char* text); void helpMarker(const char* text); bool beginStatusBar(const char* name = "##StatusBar"); void endStatusBar(); void keyValueTable( const char* id, const std::vector<std::pair<std::string, std::string>>& rows ); } // namespace imgui
Global Functions
bool fileMatchesFilter(const std::string& fileName, const FileDialogFilter& filter)
True if fileName matches the filter (see FileDialogFilter).
std::vector<std::string> toNativeFilterList(const std::vector<FileDialogFilter>& filters)
Converts filters into the flat list of portable-file-dialogs: pairs of "Description (*.a *.b)", "*.a *.b".
An “All files” entry is appended if no filter accepts any file.
ImVec4 toImVec4(const mrpt::img::TColor& c)
Converts an MRPT color to an ImGui one.
mrpt::img::TColor toTColor(const ImVec4& c)
Converts an ImGui color to an MRPT one (components clamped to [0,1]).
ImU32 toImU32(const mrpt::img::TColor& c)
Packed 32-bit ImGui color (as used by ImDrawList) of an MRPT color.
ImVec2 regionSizeInPixels(const ImVec2& size)
Size, in framebuffer pixels, of an ImGui region of size (ImGui units) in the main viewport, accounting for HiDPI framebuffer scaling.
Use it to size off-screen renders of an mrpt::viz::Scene shown in a panel.
void tooltip(const char* text)
Shows text as a tooltip when the previous item is hovered.
void helpMarker(const char* text)
A “(?)” marker that shows text as a tooltip when hovered.
void keyValueTable( const char* id, const std::vector<std::pair<std::string, std::string>>& rows )
Shows a text table with two columns (e.g.
“key”, “description”).