TemplateDesigner: Redesign des TemplateSkripts
This commit is contained in:
@@ -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 = "");
|
||||
|
||||
Reference in New Issue
Block a user