MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / ShowSubplotsContextMenu

Function ShowSubplotsContextMenu

Source/3rdParty/implot/implot.cpp:1526–1551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1524}
1525
1526void ShowSubplotsContextMenu(ImPlotSubplot& subplot) {
1527 if ((ImGui::BeginMenu("Linking"))) {
1528 if (ImGui::MenuItem("Link Rows",nullptr,ImHasFlag(subplot.Flags, ImPlotSubplotFlags_LinkRows)))
1529 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_LinkRows);
1530 if (ImGui::MenuItem("Link Cols",nullptr,ImHasFlag(subplot.Flags, ImPlotSubplotFlags_LinkCols)))
1531 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_LinkCols);
1532 if (ImGui::MenuItem("Link All X",nullptr,ImHasFlag(subplot.Flags, ImPlotSubplotFlags_LinkAllX)))
1533 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_LinkAllX);
1534 if (ImGui::MenuItem("Link All Y",nullptr,ImHasFlag(subplot.Flags, ImPlotSubplotFlags_LinkAllY)))
1535 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_LinkAllY);
1536 ImGui::EndMenu();
1537 }
1538 if ((ImGui::BeginMenu("Settings"))) {
1539 BeginDisabledControls(!subplot.HasTitle);
1540 if (ImGui::MenuItem("Title",nullptr,subplot.HasTitle && !ImHasFlag(subplot.Flags, ImPlotSubplotFlags_NoTitle)))
1541 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_NoTitle);
1542 EndDisabledControls(!subplot.HasTitle);
1543 if (ImGui::MenuItem("Resizable",nullptr,!ImHasFlag(subplot.Flags, ImPlotSubplotFlags_NoResize)))
1544 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_NoResize);
1545 if (ImGui::MenuItem("Align",nullptr,!ImHasFlag(subplot.Flags, ImPlotSubplotFlags_NoAlign)))
1546 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_NoAlign);
1547 if (ImGui::MenuItem("Share Items",nullptr,ImHasFlag(subplot.Flags, ImPlotSubplotFlags_ShareItems)))
1548 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_ShareItems);
1549 ImGui::EndMenu();
1550 }
1551}
1552
1553void ShowPlotContextMenu(ImPlotPlot& plot) {
1554 ImPlotContext& gp = *GImPlot;

Callers 1

ShowPlotContextMenuFunction · 0.85

Calls 6

BeginMenuFunction · 0.85
MenuItemFunction · 0.85
ImHasFlagFunction · 0.85
ImFlipFlagFunction · 0.85
BeginDisabledControlsFunction · 0.85
EndDisabledControlsFunction · 0.85

Tested by

no test coverage detected