Magnum/ImGuiIntegration/Integration.h file

Conversion of Dear ImGui types.

Provides conversion for string views (in the features/string_view branch of ImGui):

Corrade container typeEquivalent ImGui type
Containers::StringImStrv (data copy)
Containers::StringImStrv
Containers::StringViewImStrv
Containers::MutableStringViewImStrv

Provides conversion for the following math types:

Magnum vector typeEquivalent ImGui type
Vector2ImVec2
Vector4, Color4ImVec4, ImColor
Vector3, Color3ImColor

Note that conversion of ImColor to Color3 loses the alpha channel, while in the other direction alpha will be set to 1.0f.

Example usage:

#include <Magnum/ImGuiIntegration/Integration.h>

ImVec2 a{20.0f, 50.0f};
Vector2 b(a);

using namespace Math::Literals;
ImColor c = ImColor(0xff9391_rgbf);