| 1533 | } |
| 1534 | |
| 1535 | bool 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 |
nothing calls this directly
no test coverage detected