Auto-generated partial class for ImageNode style properties. It declares nullable style properties (sizes, spacing, colors, borders, layout, effects) and provides WithStyles to apply resolved values to a Goo.Image record.
// <auto-generated by tools/StyleFacadeEmit from style-manifest.json; do not edit />
using Goo;
using Sandbox;
using Sandbox.Rendering;
using Sandbox.UI;
namespace Goo.Authoring;
public partial class ImageNode
{
/// <summary>Width of the box (Length: px, %, em, rem, ...).</summary>
[Property, GooToken, Group( "Sizing" ), Order( 20 ), Range( 0f, float.MaxValue, true, false ), Editor( "goo-axis-lengths" ), Title( "Size" )] public GooLength? Width { get; set; }
/// <summary>Height of the box.</summary>
[Property, GooToken, Group( "Sizing" ), Order( 20 ), Range( 0f, float.MaxValue, true, false ), Hide] public GooLength? Height { get; set; }
/// <summary>Outer space on all four edges, between this box and its neighbors.</summary>
[Property, GooToken, Group( "Spacing" ), Order( 30 )] public GooLength? Margin { get; set; }
/// <summary>Outer space on the left edge.</summary>
[Property, GooToken, Group( "Spacing" ), Order( 30 ), Editor( "goo-side-lengths" ), Title( "Margin Sides" )] public GooLength? MarginLeft { get; set; }
/// <summary>Outer space on the top edge.</summary>
[Property, GooToken, Group( "Spacing" ), Order( 30 ), Hide] public GooLength? MarginTop { get; set; }
/// <summary>Outer space on the right edge.</summary>
[Property, GooToken, Group( "Spacing" ), Order( 30 ), Hide] public GooLength? MarginRight { get; set; }
/// <summary>Outer space on the bottom edge.</summary>
[Property, GooToken, Group( "Spacing" ), Order( 30 ), Hide] public GooLength? MarginBottom { get; set; }
/// <summary>Fill color behind the content.</summary>
[Property, GooToken, Group( "Background" ), Order( 60 )] public Color? BackgroundColor { get; set; }
/// <summary>Rounds all four corners.</summary>
[Property, GooToken, Group( "Border Radius" ), Order( 80 ), Range( 0f, float.MaxValue, true, false )] public GooLength? BorderRadius { get; set; }
/// <summary>Rounds the top-left corner.</summary>
[Property, GooToken, Group( "Border Radius" ), Order( 80 ), Range( 0f, float.MaxValue, true, false ), Editor( "goo-corner-lengths" ), Title( "Border Corners" )] public GooLength? BorderTopLeftRadius { get; set; }
/// <summary>Rounds the top-right corner.</summary>
[Property, GooToken, Group( "Border Radius" ), Order( 80 ), Range( 0f, float.MaxValue, true, false ), Hide] public GooLength? BorderTopRightRadius { get; set; }
/// <summary>Rounds the bottom-right corner.</summary>
[Property, GooToken, Group( "Border Radius" ), Order( 80 ), Range( 0f, float.MaxValue, true, false ), Hide] public GooLength? BorderBottomRightRadius { get; set; }
/// <summary>Rounds the bottom-left corner.</summary>
[Property, GooToken, Group( "Border Radius" ), Order( 80 ), Range( 0f, float.MaxValue, true, false ), Hide] public GooLength? BorderBottomLeftRadius { get; set; }
/// <summary>Multiplies the background image color; default white (no tint).</summary>
[Property, GooToken, Group( "Background" ), Order( 60 )] public Color? BackgroundTint { get; set; }
/// <summary>Color of the bottom border.</summary>
[Property, GooToken, Group( "Border" ), Order( 70 ), Hide] public Color? BorderBottomColor { get; set; }
/// <summary>Color of all four borders.</summary>
[Property, GooToken, Group( "Border" ), Order( 70 )] public Color? BorderColor { get; set; }
/// <summary>Color of the left border.</summary>
[Property, GooToken, Group( "Border" ), Order( 70 ), Editor( "goo-side-colors" ), Title( "Border Color Sides" )] public Color? BorderLeftColor { get; set; }
/// <summary>Color of the right border.</summary>
[Property, GooToken, Group( "Border" ), Order( 70 ), Hide] public Color? BorderRightColor { get; set; }
/// <summary>Color of the top border.</summary>
[Property, GooToken, Group( "Border" ), Order( 70 ), Hide] public Color? BorderTopColor { get; set; }
/// <summary>Thickness of the bottom border.</summary>
[Property, GooToken, Group( "Border" ), Order( 70 ), Range( 0f, float.MaxValue, true, false ), Hide] public GooLength? BorderBottomWidth { get; set; }
/// <summary>Thickness of the left border.</summary>
[Property, GooToken, Group( "Border" ), Order( 70 ), Range( 0f, float.MaxValue, true, false ), Editor( "goo-side-lengths" ), Title( "Border Width Sides" )] public GooLength? BorderLeftWidth { get; set; }
/// <summary>Thickness of the right border.</summary>
[Property, GooToken, Group( "Border" ), Order( 70 ), Range( 0f, float.MaxValue, true, false ), Hide] public GooLength? BorderRightWidth { get; set; }
/// <summary>Thickness of the top border.</summary>
[Property, GooToken, Group( "Border" ), Order( 70 ), Range( 0f, float.MaxValue, true, false ), Hide] public GooLength? BorderTopWidth { get; set; }
/// <summary>Thickness of all four borders.</summary>
[Property, GooToken, Group( "Border" ), Order( 70 ), Range( 0f, float.MaxValue, true, false )] public GooLength? BorderWidth { get; set; }
/// <summary>Bottom-edge offset; applied only when Position is Relative or Absolute.</summary>
[Property, GooToken, Group( "Position Offsets" ), Order( 40 ), Hide] public GooLength? Bottom { get; set; }
/// <summary>Left-edge offset; applied only when Position is Relative or Absolute.</summary>
[Property, GooToken, Group( "Position Offsets" ), Order( 40 ), Editor( "goo-side-lengths" ), Title( "Position Offsets" )] public GooLength? Left { get; set; }
/// <summary>Right-edge offset; applied only when Position is Relative or Absolute.</summary>
[Property, GooToken, Group( "Position Offsets" ), Order( 40 ), Hide] public GooLength? Right { get; set; }
/// <summary>Top-edge offset; applied only when Position is Relative or Absolute.</summary>
[Property, GooToken, Group( "Position Offsets" ), Order( 40 ), Hide] public GooLength? Top { get; set; }
/// <summary>Initial main-axis size of a flex child before grow and shrink are applied.</summary>
[Property, GooToken, Group( "Layout" ), Order( 10 ), Range( 0f, float.MaxValue, true, false )] public GooLength? FlexBasis { get; set; }
/// <summary>Share of leftover main-axis space this child claims; 0 (default) means do not grow.</summary>
[Property, GooToken, Group( "Layout" ), Order( 10 ), Editor( "goo-float" ), Range( 0f, float.MaxValue, true, false ), Step( 0.1f )] public float? FlexGrow { get; set; }
/// <summary>How readily this child shrinks when space is tight; 0 pins it to its basis.</summary>
[Property, GooToken, Group( "Layout" ), Order( 10 ), Editor( "goo-float" ), Range( 0f, float.MaxValue, true, false ), Step( 0.1f )] public float? FlexShrink { get; set; }
/// <summary>Texture sampling for scaled images (Point, Bilinear, Trilinear, Anisotropic).</summary>
[Property, GooToken, Group( "Effects", StartFolded = true ), Order( 120 ), Editor( "goo-nullable-enum" )] public ImageRendering? ImageRendering { get; set; }
/// <summary>Upper bound on height.</summary>
[Property, GooToken, Group( "Sizing" ), Order( 20 ), Range( 0f, float.MaxValue, true, false ), Hide] public GooLength? MaxHeight { get; set; }
/// <summary>Upper bound on width; the box never grows past it.</summary>
[Property, GooToken, Group( "Sizing" ), Order( 20 ), Range( 0f, float.MaxValue, true, false ), Editor( "goo-axis-lengths" ), Title( "Maximum Size" )] public GooLength? MaxWidth { get; set; }
/// <summary>Lower bound on height.</summary>
[Property, GooToken, Group( "Sizing" ), Order( 20 ), Range( 0f, float.MaxValue, true, false ), Hide] public GooLength? MinHeight { get; set; }
/// <summary>Lower bound on width; the box never shrinks below it.</summary>
[Property, GooToken, Group( "Sizing" ), Order( 20 ), Range( 0f, float.MaxValue, true, false ), Editor( "goo-axis-lengths" ), Title( "Minimum Size" )] public GooLength? MinWidth { get; set; }
/// <summary>How the image scales to fill its box (Fill, Contain, Cover, None).</summary>
[Property, GooToken, Group( "Object Fit" ), Order( 130 ), Editor( "goo-nullable-enum" )] public ObjectFit? ObjectFit { get; set; }
/// <summary>Overall opacity from 0 (transparent) to 1 (opaque).</summary>
[Property, GooToken, Group( "Effects", StartFolded = true ), Order( 120 ), Editor( "goo-float" ), Range( 0f, 1f, true, true ), Step( 0.01f )] public float? Opacity { get; set; }
/// <summary>Whether the element receives pointer input (All or None).</summary>
[Property, GooToken, Group( "Misc", StartFolded = true ), Order( 200 ), Editor( "goo-nullable-enum" )] public PointerEvents? PointerEvents { get; set; }
/// <summary>Positioning scheme: Relative offsets from the normal slot, Absolute lifts the box out of flow against the nearest positioned ancestor.</summary>
[Property, GooToken, Group( "Layout" ), Order( 10 ), Editor( "goo-nullable-enum" )] public PositionMode? Position { get; set; }
Goo.Image WithStyles( Goo.Image blob ) => blob with
{
Width = ResolveStyleValue( nameof( Width ), Width ),
Height = ResolveStyleValue( nameof( Height ), Height ),
Margin = ResolveStyleValue( nameof( Margin ), Margin ),
MarginLeft = ResolveStyleValue( nameof( MarginLeft ), MarginLeft ),
MarginTop = ResolveStyleValue( nameof( MarginTop ), MarginTop ),
MarginRight = ResolveStyleValue( nameof( MarginRight ), MarginRight ),
MarginBottom = ResolveStyleValue( nameof( MarginBottom ), MarginBottom ),
BackgroundColor = ResolveStyleValue( nameof( BackgroundColor ), BackgroundColor ),
BorderRadius = ResolveStyleValue( nameof( BorderRadius ), BorderRadius ),
BorderTopLeftRadius = ResolveStyleValue( nameof( BorderTopLeftRadius ), BorderTopLeftRadius ),
BorderTopRightRadius = ResolveStyleValue( nameof( BorderTopRightRadius ), BorderTopRightRadius ),
BorderBottomRightRadius = ResolveStyleValue( nameof( BorderBottomRightRadius ), BorderBottomRightRadius ),
BorderBottomLeftRadius = ResolveStyleValue( nameof( BorderBottomLeftRadius ), BorderBottomLeftRadius ),
BackgroundTint = ResolveStyleValue( nameof( BackgroundTint ), BackgroundTint ),
BorderBottomColor = ResolveStyleValue( nameof( BorderBottomColor ), BorderBottomColor ),
BorderColor = ResolveStyleValue( nameof( BorderColor ), BorderColor ),
BorderLeftColor = ResolveStyleValue( nameof( BorderLeftColor ), BorderLeftColor ),
BorderRightColor = ResolveStyleValue( nameof( BorderRightColor ), BorderRightColor ),
BorderTopColor = ResolveStyleValue( nameof( BorderTopColor ), BorderTopColor ),
BorderBottomWidth = ResolveStyleValue( nameof( BorderBottomWidth ), BorderBottomWidth ),
BorderLeftWidth = ResolveStyleValue( nameof( BorderLeftWidth ), BorderLeftWidth ),
BorderRightWidth = ResolveStyleValue( nameof( BorderRightWidth ), BorderRightWidth ),
BorderTopWidth = ResolveStyleValue( nameof( BorderTopWidth ), BorderTopWidth ),
BorderWidth = ResolveStyleValue( nameof( BorderWidth ), BorderWidth ),
Bottom = ResolveStyleValue( nameof( Bottom ), Bottom ),
Left = ResolveStyleValue( nameof( Left ), Left ),
Right = ResolveStyleValue( nameof( Right ), Right ),
Top = ResolveStyleValue( nameof( Top ), Top ),
FlexBasis = ResolveStyleValue( nameof( FlexBasis ), FlexBasis ),
FlexGrow = ResolveStyleValue( nameof( FlexGrow ), FlexGrow ),
FlexShrink = ResolveStyleValue( nameof( FlexShrink ), FlexShrink ),
ImageRendering = ResolveStyleValue( nameof( ImageRendering ), ImageRendering ),
MaxHeight = ResolveStyleValue( nameof( MaxHeight ), MaxHeight ),
MaxWidth = ResolveStyleValue( nameof( MaxWidth ), MaxWidth ),
MinHeight = ResolveStyleValue( nameof( MinHeight ), MinHeight ),
MinWidth = ResolveStyleValue( nameof( MinWidth ), MinWidth ),
ObjectFit = ResolveStyleValue( nameof( ObjectFit ), ObjectFit ),
Opacity = ResolveStyleValue( nameof( Opacity ), Opacity ),
PointerEvents = ResolveStyleValue( nameof( PointerEvents ), PointerEvents ),
Position = ResolveStyleValue( nameof( Position ), Position ),
Transform = BuildStyleTransform(),
};
}