#pragma once #include "PanelSlot.hpp" namespace PalUIExtension::Api { // Same four-member surface as VerticalBoxSlot (Size + Padding + H/V // alignment). Different engine class, different ClassPath -- kept // separate rather than shared, matching how CanvasPanelSlot, // SizeBoxSlot, and OverlaySlot each stand alone in this tree despite // overlapping surfaces. class HorizontalBoxSlot : public PanelSlot { public: static auto ClassPath() -> const TCHAR* { return STR("/Script/UMG.HorizontalBoxSlot"); } static auto DebugTag() -> const TCHAR* { return STR("HorizontalBoxSlot"); } HorizontalBoxSlot() = default; explicit HorizontalBoxSlot(UObject* Obj) : PanelSlot(Obj, ClassOf(), DebugTag()) {} // ---- setters (write through the UFUNCTION so SynchronizeProperties runs) auto SetSize(FSlateChildSize_ InSize) -> bool { struct P { FSlateChildSize_ InSize; } p{ InSize }; return Call(STR("SetSize"), p); } auto SetPadding(FMargin_ InPadding) -> bool { struct P { FMargin_ InPadding; } p{ InPadding }; return Call(STR("SetPadding"), p); } auto SetHorizontalAlignment(EHorizontalAlignment_ InHorizontalAlignment) -> bool { struct P { EHorizontalAlignment_ InHorizontalAlignment; } p{ InHorizontalAlignment }; return Call(STR("SetHorizontalAlignment"), p); } auto SetVerticalAlignment(EVerticalAlignment_ InVerticalAlignment) -> bool { struct P { EVerticalAlignment_ InVerticalAlignment; } p{ InVerticalAlignment }; return Call(STR("SetVerticalAlignment"), p); } // ---- property reads auto GetSize() const -> std::optional { return PropertyValue(STR("Size")); } auto GetPadding() const -> std::optional { return PropertyValue(STR("Padding")); } auto GetHorizontalAlignment() const -> std::optional { return PropertyValue(STR("HorizontalAlignment")); } auto GetVerticalAlignment() const -> std::optional { return PropertyValue(STR("VerticalAlignment")); } }; }