MCPcopy Create free account
hub / github.com/cinder/Cinder / TextLinkOpenURL

Method TextLinkOpenURL

src/imgui/imgui_widgets.cpp:1535–1551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1533}
1534
1535bool ImGui::TextLinkOpenURL(const char* label, const char* url)
1536{
1537 ImGuiContext& g = *GImGui;
1538 if (url == NULL)
1539 url = label;
1540 bool pressed = TextLink(label);
1541 if (pressed && g.PlatformIO.Platform_OpenInShellFn != NULL)
1542 g.PlatformIO.Platform_OpenInShellFn(&g, url);
1543 SetItemTooltip(LocalizeGetMsg(ImGuiLocKey_OpenLink_s), url); // It is more reassuring for user to _always_ display URL when we same as label
1544 if (BeginPopupContextItem())
1545 {
1546 if (MenuItem(LocalizeGetMsg(ImGuiLocKey_CopyLink)))
1547 SetClipboardText(url);
1548 EndPopup();
1549 }
1550 return pressed;
1551}
1552
1553//-------------------------------------------------------------------------
1554// [SECTION] Widgets: Low-level Layout helpers

Callers

nothing calls this directly

Calls 1

LocalizeGetMsgFunction · 0.85

Tested by

no test coverage detected