TemplateDesigner: Redesign des TemplateSkripts

This commit is contained in:
2026-09-01 10:07:25 +02:00
parent 95e3f677e4
commit b2d0ccd30d
12 changed files with 807 additions and 55 deletions
+12 -1
View File
@@ -61,6 +61,11 @@ public sealed record ChartElement(int Line, float X, float Y, float Width, float
string Placeholder, string ChartType, IReadOnlyDictionary<string, string> Attributes)
: TemplateElement(Line, X, Y, Width, Height, Attributes);
public sealed record FlowSlotDefinition(int Line, string Name, float X, float Y, float Width, float Height);
public sealed record PageTemplateDefinition(string Name, IReadOnlyList<TemplateElement> Elements,
IReadOnlyList<FlowSlotDefinition> FlowSlots);
public sealed record ContentFlowDefinition(string Name, IReadOnlyList<TemplateElement> Elements);
internal static class EmptyAttributes
{
public static readonly IReadOnlyDictionary<string, string> Value =
@@ -68,7 +73,13 @@ internal static class EmptyAttributes
}
public sealed record TemplateLayout(float Width, float Height, string Unit,
IReadOnlyList<TemplateElement> Elements);
IReadOnlyList<TemplateElement> Elements)
{
public int FormatVersion { get; init; } = 1;
public IReadOnlyList<PageTemplateDefinition> PageTemplates { get; init; } = [];
public IReadOnlyList<ContentFlowDefinition> ContentFlows { get; init; } = [];
public bool UsesPageTemplates => PageTemplates.Count > 0 || ContentFlows.Count > 0;
}
public sealed record LoadedTemplate(TemplateManifest Manifest, TemplateLayout Layout,
IReadOnlyDictionary<string, byte[]> Assets, string SourceName = "");