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

Function setupIO

plugins/Cardinal/src/ImGuiWidget.cpp:42–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42static void setupIO()
43{
44 ImGuiIO& io(ImGui::GetIO());
45 io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
46 io.IniFilename = nullptr;
47 io.LogFilename = nullptr;
48
49 io.KeyMap[ImGuiKey_Tab] = GLFW_KEY_TAB;
50 io.KeyMap[ImGuiKey_LeftArrow] = GLFW_KEY_LEFT;
51 io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;
52 io.KeyMap[ImGuiKey_UpArrow] = GLFW_KEY_UP;
53 io.KeyMap[ImGuiKey_DownArrow] = GLFW_KEY_DOWN;
54 io.KeyMap[ImGuiKey_PageUp] = GLFW_KEY_PAGE_UP;
55 io.KeyMap[ImGuiKey_PageDown] = GLFW_KEY_PAGE_DOWN;
56 io.KeyMap[ImGuiKey_Home] = GLFW_KEY_HOME;
57 io.KeyMap[ImGuiKey_End] = GLFW_KEY_END;
58 io.KeyMap[ImGuiKey_Insert] = GLFW_KEY_INSERT;
59 io.KeyMap[ImGuiKey_Delete] = GLFW_KEY_DELETE;
60 io.KeyMap[ImGuiKey_Backspace] = GLFW_KEY_BACKSPACE;
61 io.KeyMap[ImGuiKey_Space] = GLFW_KEY_SPACE;
62 io.KeyMap[ImGuiKey_Enter] = GLFW_KEY_ENTER;
63 io.KeyMap[ImGuiKey_Escape] = GLFW_KEY_ESCAPE;
64 io.KeyMap[ImGuiKey_KeyPadEnter] = GLFW_KEY_KP_ENTER;
65 io.KeyMap[ImGuiKey_A] = GLFW_KEY_A;
66 io.KeyMap[ImGuiKey_C] = GLFW_KEY_C;
67 io.KeyMap[ImGuiKey_V] = GLFW_KEY_V;
68 io.KeyMap[ImGuiKey_X] = GLFW_KEY_X;
69 io.KeyMap[ImGuiKey_Y] = GLFW_KEY_Y;
70 io.KeyMap[ImGuiKey_Z] = GLFW_KEY_Z;
71
72 io.GetClipboardTextFn = GetClipboardTextFn;
73 io.SetClipboardTextFn = SetClipboardTextFn;
74}
75
76struct ImGuiWidget::PrivateData {
77 ImGuiContext* context = nullptr;

Callers 2

PrivateDataMethod · 0.85
resetEverythingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected