MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / AddInputCharacter

Method AddInputCharacter

plugins/Cardinal/src/DearImGui/imgui.cpp:1142–1146  ·  view source on GitHub ↗

Pass in translated ASCII characters for text input. - with glfw you can get those from the callback set in glfwSetCharCallback() - on Windows you can get those using ToAscii+keyboard state, or via the WM_CHAR message

Source from the content-addressed store, hash-verified

1140// - with glfw you can get those from the callback set in glfwSetCharCallback()
1141// - on Windows you can get those using ToAscii+keyboard state, or via the WM_CHAR message
1142void ImGuiIO::AddInputCharacter(unsigned int c)
1143{
1144 if (c != 0)
1145 InputQueueCharacters.push_back(c <= IM_UNICODE_CODEPOINT_MAX ? (ImWchar)c : IM_UNICODE_CODEPOINT_INVALID);
1146}
1147
1148// UTF16 strings use surrogate pairs to encode codepoints >= 0x10000, so
1149// we should save the high surrogate.

Callers 1

onSelectTextMethod · 0.80

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected