类参考
UDreamPanelSlot
UMG-style per-child layout data owned by the child widget.
本页由 DreamGUIReferenceDocs commandlet 从反射生成,正文是头文件注释的原文(英文),所以不翻译——这样它永远和代码一致。概念讲解见核心概念。
Inherits from UDreamWidgetSubObjectBehaviour.
Declared in Public/Core/Components/DreamPanelSlot.h.
UMG-style per-child layout data owned by the child widget.
Properties
| Name | Type | Category | In the details panel | From Blueprint | Description |
|---|---|---|---|---|---|
Padding | FMargin | Slot | yes | SetPadding | |
HorizontalAlignment | EDreamPanelHorizontalAlignment | Slot | yes | SetHorizontalAlignment | |
VerticalAlignment | EDreamPanelVerticalAlignment | Slot | yes | SetVerticalAlignment | |
SizeRule | EDreamPanelSizeRule | Slot | yes | SetSizeRule | |
FillWeight | float | Slot | yes | SetFillWeight | |
Row | int32 | Slot | yes | SetRow | |
Column | int32 | Slot | yes | SetColumn | |
RowSpan | int32 | Slot | yes | SetRowSpan | |
ColumnSpan | int32 | Slot | yes | SetColumnSpan | |
ZOrder | int32 | Slot | yes | SetZOrder | Paint order among siblings, applied as a stable reorder (equal values keep sibling order). Consumed by Overlay and GridPanel always, and by CanvasPanel when SortChildrenByZOrder is on; every other panel arranges strictly by sibling order and ignores this value. |
bAutoSize | bool | Slot | yes | SetAutoSize | |
MinDesiredSize | FVector2D | Slot | yes | SetMinDesiredSize | Floor and ceiling applied to whatever this child measures, per axis, zero meaning "no opinion". |
MaxDesiredSize | FVector2D | Slot | yes | SetMaxDesiredSize | |
bFillEmptySpace | bool | Slot | yes | SetFillEmptySpace | WrapBox only, matching UMG's UWrapBoxSlot: when this child is the LAST one on its line, it takes whatever room the line has left over. Asked by any other child on the line, it does nothing -- SWrapBox reads the flag for the line's last child alone. Read by no other panel. |
FillSpanWhenLessThan | float | Slot | yes | SetFillSpanWhenLessThan | WrapBox only, matching UMG's UWrapBoxSlot: when the box's wrap width drops below this, give this child a line to itself. Zero disables it. The classic use is a responsive list of cards that stops sharing rows once the panel is narrow enough that sharing would make everything unreadable. |
bForceNewLine | bool | Slot | yes | SetNewLine | WrapBox only, matching UMG's UWrapBoxSlot::bForceNewLine: begin a line at this child however much room is left on the current one. The unconditional twin of FillSpanWhenLessThan, which only breaks once the box is narrow; this is how a section heading stays at the head of its own row. |
Nudge | FVector2D | Slot | yes | SetNudge | A fixed offset added to wherever the panel decided to put this child, in the panel's content space (x right, y down -- the same sense as Padding). |
Functions
| Function | Kind | Description |
|---|---|---|
FVector2D GetAlignment() | pure | UMG's Alignment: where inside its own rect the widget's position refers to. This plugin's Pivot. |
FAnchors GetAnchors() | pure | Get Anchors |
bool GetAutoSize() | pure | Get Auto Size |
int32 GetLayer() | pure | UMG's UGridSlot::Layer, which is this slot's ZOrder under its UMG name rather than a second number. |
FDreamUIAnchorData GetLayout() | pure | UMG's UCanvasPanelSlot rect family, reading and writing the widget's own FDreamUIAnchorData. |
FMargin GetOffsets() | pure | Get Offsets |
FVector2D GetPosition() | pure | The offset of the widget's alignment point from its anchor -- UMG's Position on a point anchor. |
FVector2D GetSize() | pure | The size a point anchor resolves to, and the size BEYOND the anchor span on a stretched one. |
int32 GetZOrder() | pure | Get ZOrder |
void NotifySlotChanged(EDreamLayoutInvalidation Reason) | callable | Reason defaults to Measure, the safe answer. Alignment, size rule, fill weight and z-order pass Arrange instead: none of them appear in any panel's MeasureLayout - checked one by one - so they cannot move a preferred size, only where this slot's widget ends up inside its own parent. Padding, the grid coordinates and bAutoSize all do appear there, and keep the default. |
void SetAlignment(FVector2D InAlignment) | callable | Set Alignment |
void SetAnchors(FAnchors InAnchors) | callable | Set Anchors |
void SetAutoSize(bool Value) | callable | Set Auto Size |
void SetColumn(int32 Value) | callable | Set Column |
void SetColumnSpan(int32 Value) | callable | Set Column Span |
void SetFillEmptySpace(bool Value) | callable | Set Fill Empty Space |
void SetFillSpanWhenLessThan(float Value) | callable | Set Fill Span when Less Than |
void SetFillWeight(float Value) | callable | Set Fill Weight |
void SetHorizontalAlignment(EDreamPanelHorizontalAlignment Value) | callable | Set Horizontal Alignment |
void SetLayer(int32 InLayer) | callable | Set Layer |
void SetLayout(FDreamUIAnchorData InLayout) | callable | Set Layout |
void SetMaxDesiredSize(FVector2D Value) | callable | Set Max Desired Size |
void SetMaximum(FVector2D InMaximumAnchors) | callable | Set Maximum |
void SetMinDesiredSize(FVector2D Value) | callable | Set Min Desired Size |
void SetMinimum(FVector2D InMinimumAnchors) | callable | Set Minimum |
void SetNewLine(bool Value) | callable | Set New Line |
void SetNudge(FVector2D Value) | callable | Set Nudge |
void SetOffsets(FMargin InOffsets) | callable | Set Offsets |
void SetPadding(FMargin Value) | callable | Set Padding |
void SetPosition(FVector2D InPosition) | callable | Set Position |
void SetRow(int32 Value) | callable | Set Row |
void SetRowSpan(int32 Value) | callable | Set Row Span |
void SetSize(FVector2D InSize) | callable | Set Size |
void SetSizeRule(EDreamPanelSizeRule Value) | callable | Set Size Rule |
void SetVerticalAlignment(EDreamPanelVerticalAlignment Value) | callable | Set Vertical Alignment |
void SetZOrder(int32 Value) | callable | Set ZOrder |
Compared with UMG
Every Blueprint-facing member of the UMG class, and where it went. adopt: same name, same meaning. map: here under another name or on another type. reject: deliberately absent, with the reason.
| UMG | Member | Status | Here | Note |
|---|---|---|---|---|
UBackgroundBlurSlot | SetPadding | adopt | SetPadding | |
UBackgroundBlurSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UBackgroundBlurSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UBackgroundBlurSlot | Padding | adopt | Padding | |
UBackgroundBlurSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UBackgroundBlurSlot | VerticalAlignment | adopt | VerticalAlignment | |
UBorderSlot | SetPadding | adopt | SetPadding | |
UBorderSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UBorderSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UBorderSlot | Padding | adopt | Padding | |
UBorderSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UBorderSlot | VerticalAlignment | adopt | VerticalAlignment | |
UButtonSlot | Padding | adopt | Padding | |
UButtonSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UButtonSlot | VerticalAlignment | adopt | VerticalAlignment | |
UButtonSlot | SetPadding | adopt | SetPadding | |
UButtonSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UButtonSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UCanvasPanelSlot | LayoutData | map | UDreamWidget::AnchorData | A canvas child states its rect on the widget itself (pivot, anchor min/max, anchored position, size delta). The slot reads and writes that data instead of keeping a second copy of it. |
UCanvasPanelSlot | bAutoSize | adopt | bAutoSize | |
UCanvasPanelSlot | ZOrder | adopt | ZOrder | Honoured by Overlay and GridPanel always, and by CanvasPanel when SortChildrenByZOrder is on. |
UCanvasPanelSlot | SetLayout | adopt | SetLayout | Takes FDreamUIAnchorData, which is this plugin's FAnchorData. |
UCanvasPanelSlot | GetLayout | adopt | GetLayout | |
UCanvasPanelSlot | SetPosition | adopt | SetPosition | The alignment point's offset from the anchor. y points UP here, as it does in every other transform setter in the plugin, rather than down as in UMG. |
UCanvasPanelSlot | GetPosition | adopt | GetPosition | |
UCanvasPanelSlot | SetSize | adopt | SetSize | Writes SizeDelta: the resolved size on a point anchor, and the size beyond the anchor span on a stretched one. The box-slot SetSize(FSlateChildSize) could not also have this name, since there is one slot class here; it is SetSizeRule/SetFillWeight. |
UCanvasPanelSlot | GetSize | adopt | GetSize | |
UCanvasPanelSlot | SetOffsets | adopt | SetOffsets | The four edge insets from the anchor rect, which is UMG's meaning on a stretched axis; on a point anchor UMG reuses Right/Bottom to mean the size and this does not -- that reading is GetSize/SetSize. |
UCanvasPanelSlot | GetOffsets | adopt | GetOffsets | |
UCanvasPanelSlot | SetAnchors | adopt | SetAnchors | Takes FAnchors. Minimum is the bottom-left corner of the anchor rect, because y points up here. |
UCanvasPanelSlot | GetAnchors | adopt | GetAnchors | |
UCanvasPanelSlot | SetMinimum | adopt | SetMinimum | Added to the skeleton: reflected on UCanvasPanelSlot as a bare UFUNCTION, so the scan missed it. |
UCanvasPanelSlot | SetMaximum | adopt | SetMaximum | Added to the skeleton, as SetMinimum. |
UCanvasPanelSlot | SetAlignment | adopt | SetAlignment | This plugin's Pivot: same quantity, same 0..1 range, y up. |
UCanvasPanelSlot | GetAlignment | adopt | GetAlignment | |
UCanvasPanelSlot | SetAutoSize | adopt | SetAutoSize | |
UCanvasPanelSlot | GetAutoSize | adopt | GetAutoSize | |
UCanvasPanelSlot | SetZOrder | adopt | SetZOrder | |
UCanvasPanelSlot | GetZOrder | adopt | GetZOrder | |
UGridSlot | Padding | adopt | Padding | |
UGridSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UGridSlot | VerticalAlignment | adopt | VerticalAlignment | |
UGridSlot | Row | adopt | Row | |
UGridSlot | RowSpan | adopt | RowSpan | |
UGridSlot | Column | adopt | Column | |
UGridSlot | ColumnSpan | adopt | ColumnSpan | |
UGridSlot | Layer | map | ZOrder | A grid's layer and a slot's z-order are the same fact -- which children draw over which -- and the grid panel already reorders by ZOrder, stably. GetLayer/SetLayer exist under UMG's name and forward to it rather than storing a second number. |
UGridSlot | Nudge | adopt | Nudge | Applied in UDreamPanelLayoutBase::ApplyChildRect, so every panel honours it, not just the grid; invisible to measurement, as a nudge must be. |
UGridSlot | SetPadding | adopt | SetPadding | |
UGridSlot | SetRow | adopt | SetRow | |
UGridSlot | SetRowSpan | adopt | SetRowSpan | |
UGridSlot | SetColumn | adopt | SetColumn | |
UGridSlot | SetColumnSpan | adopt | SetColumnSpan | |
UGridSlot | SetLayer | adopt | SetLayer | |
UGridSlot | SetNudge | adopt | SetNudge | |
UGridSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UGridSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UHorizontalBoxSlot | Size | map | SizeRule | FSlateChildSize is a rule plus a value; the rule is SizeRule (Auto/Fill) and the value is FillWeight. |
UHorizontalBoxSlot | Padding | adopt | Padding | |
UHorizontalBoxSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UHorizontalBoxSlot | VerticalAlignment | adopt | VerticalAlignment | |
UHorizontalBoxSlot | SetPadding | adopt | SetPadding | |
UHorizontalBoxSlot | SetSize | map | SetSizeRule | Two setters, SetSizeRule and SetFillWeight. The bare name SetSize belongs to the canvas rect family, because there is one slot class here rather than UMG's one per panel. |
UHorizontalBoxSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UHorizontalBoxSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UOverlaySlot | Padding | adopt | Padding | |
UOverlaySlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UOverlaySlot | VerticalAlignment | adopt | VerticalAlignment | |
UOverlaySlot | SetPadding | adopt | SetPadding | |
UOverlaySlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UOverlaySlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UPanelSlot | GetContent | map | GetWidget | A slot here belongs to the widget it lays out, so its content is that widget; the accessor is inherited from UDreamWidgetSubObjectBehaviour. |
USafeZoneSlot | bIsTitleSafe | map | UDreamLayoutContainerSafeZone::bUsePlatformSafeZone | A safe zone takes one child, so 'this slot asks for the platform's safe area' and 'this panel applies it' are the same switch; it is kept on the panel, next to the four side toggles it works with. |
USafeZoneSlot | SafeAreaScale | map | UDreamLayoutContainerSafeZone::SafeAreaScale | Same per-side multiplier over the platform safe margin as Slate's; on the panel for the same reason as bIsTitleSafe. |
USafeZoneSlot | HAlign | map | HorizontalAlignment | The generic slot alignment; UMG abbreviates it only on this slot. |
USafeZoneSlot | VAlign | map | VerticalAlignment | |
USafeZoneSlot | Padding | adopt | Padding | |
UScaleBoxSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UScaleBoxSlot | VerticalAlignment | adopt | VerticalAlignment | |
UScaleBoxSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UScaleBoxSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UScrollBoxSlot | Size | map | SizeRule | FSlateChildSize is a rule plus a value; the rule is SizeRule (Auto/Fill) and the value is FillWeight. Along the scroll axis a Fill slot is stacked as SScrollBox stacks one, with shrinking off: the Fill slots share the larger of what they asked for and the viewport less everything else, by weight, each clamped to its own Min/MaxDesiredSize. Short content is stretched to the viewport, content that overflows keeps the length it asked for, and the scroll range is always the desired total. |
UScrollBoxSlot | Padding | adopt | Padding | |
UScrollBoxSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UScrollBoxSlot | VerticalAlignment | adopt | VerticalAlignment | |
UScrollBoxSlot | SetPadding | adopt | SetPadding | |
UScrollBoxSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UScrollBoxSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
USizeBoxSlot | Padding | adopt | Padding | |
USizeBoxSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
USizeBoxSlot | VerticalAlignment | adopt | VerticalAlignment | |
USizeBoxSlot | SetPadding | adopt | SetPadding | |
USizeBoxSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
USizeBoxSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UStackBoxSlot | Padding | adopt | Padding | |
UStackBoxSlot | Size | map | SizeRule | FSlateChildSize is a rule plus a value; the rule is SizeRule (Auto/Fill) and the value is FillWeight. |
UStackBoxSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UStackBoxSlot | VerticalAlignment | adopt | VerticalAlignment | |
UUniformGridSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UUniformGridSlot | VerticalAlignment | adopt | VerticalAlignment | |
UUniformGridSlot | Row | adopt | Row | |
UUniformGridSlot | Column | adopt | Column | |
UUniformGridSlot | SetRow | adopt | SetRow | |
UUniformGridSlot | SetColumn | adopt | SetColumn | |
UUniformGridSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UUniformGridSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UVerticalBoxSlot | Size | map | SizeRule | FSlateChildSize is a rule plus a value; the rule is SizeRule (Auto/Fill) and the value is FillWeight. |
UVerticalBoxSlot | Padding | adopt | Padding | |
UVerticalBoxSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UVerticalBoxSlot | VerticalAlignment | adopt | VerticalAlignment | |
UVerticalBoxSlot | SetPadding | adopt | SetPadding | |
UVerticalBoxSlot | SetSize | map | SetSizeRule | Two setters, SetSizeRule and SetFillWeight; see HorizontalBoxSlot for why the bare name is taken. |
UVerticalBoxSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UVerticalBoxSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UWidgetSwitcherSlot | Padding | adopt | Padding | |
UWidgetSwitcherSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UWidgetSwitcherSlot | VerticalAlignment | adopt | VerticalAlignment | |
UWidgetSwitcherSlot | SetPadding | adopt | SetPadding | |
UWidgetSwitcherSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UWidgetSwitcherSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UWrapBoxSlot | Padding | adopt | Padding | |
UWrapBoxSlot | FillSpanWhenLessThan | adopt | FillSpanWhenLessThan | |
UWrapBoxSlot | HorizontalAlignment | adopt | HorizontalAlignment | |
UWrapBoxSlot | VerticalAlignment | adopt | VerticalAlignment | |
UWrapBoxSlot | bFillEmptySpace | adopt | bFillEmptySpace | |
UWrapBoxSlot | bForceNewLine | adopt | bForceNewLine | Read by the wrap box's measure and arrange alike, so the line count it produces is the one it measured room for. |
UWrapBoxSlot | SetPadding | adopt | SetPadding | |
UWrapBoxSlot | SetFillEmptySpace | adopt | SetFillEmptySpace | |
UWrapBoxSlot | SetFillSpanWhenLessThan | adopt | SetFillSpanWhenLessThan | |
UWrapBoxSlot | SetHorizontalAlignment | adopt | SetHorizontalAlignment | |
UWrapBoxSlot | SetVerticalAlignment | adopt | SetVerticalAlignment | |
UWrapBoxSlot | SetNewLine | adopt | SetNewLine |