Auto-generated partial class for WebPanelNode style properties. It declares nullable style properties (width, height, margin, colors, layout, etc.) with attributes for editor metadata and provides WithStyles that applies resolved values into a Goo.WebPanel record via ResolveStyleValue and BuildStyleTransform.
// <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 WebPanelNode
{
/// <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>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>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>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.WebPanel WithStyles( Goo.WebPanel 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 ),
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 ),
MaxHeight = ResolveStyleValue( nameof( MaxHeight ), MaxHeight ),
MaxWidth = ResolveStyleValue( nameof( MaxWidth ), MaxWidth ),
MinHeight = ResolveStyleValue( nameof( MinHeight ), MinHeight ),
MinWidth = ResolveStyleValue( nameof( MinWidth ), MinWidth ),
Opacity = ResolveStyleValue( nameof( Opacity ), Opacity ),
PointerEvents = ResolveStyleValue( nameof( PointerEvents ), PointerEvents ),
Position = ResolveStyleValue( nameof( Position ), Position ),
Transform = BuildStyleTransform(),
};
}