MCPcopy Create free account
hub / github.com/SatDump/SatDump / ShowSubplotsContextMenu

Function ShowSubplotsContextMenu

src-core/imgui/implot/implot.cpp:1488–1513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1486}
1487
1488void ShowSubplotsContextMenu(ImPlotSubplot& subplot) {
1489 if ((ImGui::BeginMenu("Linking"))) {
1490 if (ImGui::MenuItem("Link Rows",nullptr,ImHasFlag(subplot.Flags, ImPlotSubplotFlags_LinkRows)))
1491 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_LinkRows);
1492 if (ImGui::MenuItem("Link Cols",nullptr,ImHasFlag(subplot.Flags, ImPlotSubplotFlags_LinkCols)))
1493 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_LinkCols);
1494 if (ImGui::MenuItem("Link All X",nullptr,ImHasFlag(subplot.Flags, ImPlotSubplotFlags_LinkAllX)))
1495 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_LinkAllX);
1496 if (ImGui::MenuItem("Link All Y",nullptr,ImHasFlag(subplot.Flags, ImPlotSubplotFlags_LinkAllY)))
1497 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_LinkAllY);
1498 ImGui::EndMenu();
1499 }
1500 if ((ImGui::BeginMenu("Settings"))) {
1501 BeginDisabledControls(!subplot.HasTitle);
1502 if (ImGui::MenuItem("Title",nullptr,subplot.HasTitle && !ImHasFlag(subplot.Flags, ImPlotSubplotFlags_NoTitle)))
1503 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_NoTitle);
1504 EndDisabledControls(!subplot.HasTitle);
1505 if (ImGui::MenuItem("Resizable",nullptr,!ImHasFlag(subplot.Flags, ImPlotSubplotFlags_NoResize)))
1506 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_NoResize);
1507 if (ImGui::MenuItem("Align",nullptr,!ImHasFlag(subplot.Flags, ImPlotSubplotFlags_NoAlign)))
1508 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_NoAlign);
1509 if (ImGui::MenuItem("Share Items",nullptr,ImHasFlag(subplot.Flags, ImPlotSubplotFlags_ShareItems)))
1510 ImFlipFlag(subplot.Flags, ImPlotSubplotFlags_ShareItems);
1511 ImGui::EndMenu();
1512 }
1513}
1514
1515void ShowPlotContextMenu(ImPlotPlot& plot) {
1516 ImPlotContext& gp = *GImPlot;

Callers 1

ShowPlotContextMenuFunction · 0.85

Calls 4

ImHasFlagFunction · 0.85
ImFlipFlagFunction · 0.85
BeginDisabledControlsFunction · 0.85
EndDisabledControlsFunction · 0.85

Tested by

no test coverage detected