feat: expand p-rec-annot user surface and datum controls

This commit is contained in:
codex
2026-08-07 14:00:54 +03:00
parent fcdec4d227
commit 064cfdd803
6 changed files with 50 additions and 3 deletions
@@ -370,12 +370,27 @@ internal static class RibbonIntegration
if (tab is null) { tab = new RibbonTab { Id = TabId, Title = "Промхимпроект" }; ribbon.Tabs.Add(tab); }
var panel = tab.Panels.FirstOrDefault(x => string.Equals(x.Source?.Id, PanelId, StringComparison.OrdinalIgnoreCase));
if (panel is not null) { RuntimeDiagnostics.Write("RibbonAlreadyExists", resultStatus: "AlreadyExists"); RuntimeDiagnostics.Write("RibbonInitializationCompleted", resultStatus: "AlreadyExists"); return; }
// Keep the existing legacy-compatible PHP_REC_ANNOT action and expose the
// production command surface from the same composite panel.
var source = new RibbonPanelSource { Id = PanelId, Title = "Аннотации" };
source.Items.Add(new RibbonButton { Id = ButtonId, Text = "Аннотировать", ShowText = true, CommandParameter = "PHP_REC_ANNOT " });
AddButton(source, "LineNumber", "Line number", "PXP-LN");
AddButton(source, "LineConnections", "Line connections", "PXP-ALC");
AddButton(source, "AutoElevation", "Auto elevation", "PXP-AE");
AddButton(source, "InsertElevation", "Insert elevation", "PXP-IE");
AddButton(source, "OrthoAnnotate", "Ortho annotate", "PXP-OA");
AddButton(source, "AnnotateView", "Annotate view", "PXP-AAV");
AddButton(source, "ManualPalette", "Manual annotations", "mto-ma");
tab.Panels.Add(new RibbonPanel { Source = source });
RuntimeDiagnostics.Write("RibbonInitializationCompleted", resultStatus: "Created");
}
private static void AddButton(RibbonPanelSource? source, string suffix, string text, string command)
{
if (source is null) return;
source.Items.Add(new RibbonButton { Id = $"{PanelId}.{suffix}", Text = text, ShowText = true, CommandParameter = command + " " });
}
public static void Terminate()
{
if (!deferred) return;