Added SetClipboardText / GetClipboardText helper shortcuts to match MemAlloc / MemFree

This commit is contained in:
ocornut
2015-10-12 12:20:01 +02:00
parent 59cedca02e
commit a5c895f791
2 changed files with 14 additions and 1 deletions

View File

@ -1761,6 +1761,17 @@ void ImGui::MemFree(void* ptr)
return GImGui->IO.MemFreeFn(ptr);
}
const char* ImGui::GetClipboardText()
{
return GImGui->IO.GetClipboardTextFn ? GImGui->IO.GetClipboardTextFn() : "";
}
void ImGui::SetClipboardText(const char* text)
{
if (GImGui->IO.SetClipboardTextFn)
GImGui->IO.SetClipboardTextFn(text);
}
const char* ImGui::GetVersion()
{
return IMGUI_VERSION;