ASplitter
- Module
- Arc
- Header
#include "Arc/Widgets/ASplitter.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
TSharedPtr<AWidget> | _Second | |
ArcDelegate<void(float)> | OnRatioChanged | |
ArcDelegate<void(float)> | OnFixedSizeChanged |
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
WidgetArgsType& | First | |
WidgetArgsType& | Second | |
ARC_WIDGET_ARGS_END | ||
float | GetRatio | |
void | SetRatio | |
void | AnimateRatio | Eases the on-screen split from fromRatio to toRatio (0.16 s, CubicOut). |
ESplitterSizeMode | GetSizeMode | |
float | GetFixedSize | |
void | SetFixedSize | |
bool | IsHandleAt | True when the point lies inside the handle grab zone and the splitter can actually drag. |
bool | ClaimsPointerExclusively | |
EArcCursorType | OnCursorQuery | |
void | OnMouseCaptureLost | |
ArcVec2 | ComputeDesiredSize | |
void | ArrangeChildren | |
bool | CanSkipArrange | Refused: the split ratio is written straight from the drag handler, which has no reason to invalidate a widget whose desired size never changes. |
int32_t | OnPaint | |
CReply | OnMouseButtonDown | |
CReply | OnMouseButtonDoubleClick | |
CReply | OnMouseButtonUp | |
CReply | OnMouseMove | |
void | OnMouseLeave | |
int32_t | GetNumChildren | |
TSharedPtr<AWidget> | GetChildAt | |
bool | CanCacheDesiredSize | Both halves plus the handle. |
const char* | GetTypeName |
Function details
ARC_WIDGET_ARGS
ARC_WIDGET_ARGS(ASplitter) ARC_ARG(EOrientation, Orientation) ARC_ARG(float, InitialRatio) ARC_ARG(float, HandleSize) ARC_ARG(float, MinRatio) ARC_ARG(float, MaxRatio) ARC_ARG(float, FixedFirst) ARC_ARG(float, FixedSecond) ARC_ARG(float, MinFixedSize) ARC_ARG(float, MaxFixedSize) ARC_ARG(float, MinOtherSize) ARC_ARG(ArcColor, HandleColor) ARC_ARG(ArcColor, HandleHoverColor) TSharedPtr<AWidget> _FirstFirst
WidgetArgsType& First(TSharedPtr<AWidget> w)Second
WidgetArgsType& Second(TSharedPtr<AWidget> w)ARC_WIDGET_ARGS_END
ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)GetRatio
float GetRatio() constSetRatio
void SetRatio(float ratio)AnimateRatio
void AnimateRatio(float fromRatio, float toRatio)Eases the on-screen split from fromRatio to toRatio (0.16 s, CubicOut). The logical ratio (GetRatio, delegates, persistence) becomes toRatio immediately — only the arrangement glides.
GetSizeMode
ESplitterSizeMode GetSizeMode() constGetFixedSize
float GetFixedSize() constSetFixedSize
void SetFixedSize(float px)IsHandleAt
bool IsHandleAt(const ArcVec2& absolutePos) constTrue when the point lies inside the handle grab zone and the splitter can actually drag. Used by the input processor to give the handle hit-test priority over the panel children (the visual seam is thinner than the grab zone, so the zone overlaps the children).
ClaimsPointerExclusively
bool ClaimsPointerExclusively(const CGeometry& geo, const ArcVec2& absolutePosition) const overrideOnCursorQuery
EArcCursorType OnCursorQuery(const CGeometry& geo, const CPointerEvent& event) const overrideOnMouseCaptureLost
void OnMouseCaptureLost() overrideComputeDesiredSize
ArcVec2 ComputeDesiredSize(float scale) const overrideArrangeChildren
void ArrangeChildren(const CGeometry& geo) overrideCanSkipArrange
bool CanSkipArrange() const overrideRefused: the split ratio is written straight from the drag handler, which has no reason to invalidate a widget whose desired size never changes. Two children per splitter — the skip would buy nothing.
OnPaint
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideOnMouseButtonDown
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonDoubleClick
CReply OnMouseButtonDoubleClick(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonUp
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseMove
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseLeave
void OnMouseLeave(const CPointerEvent& event) overrideGetNumChildren
int32_t GetNumChildren() const overrideGetChildAt
TSharedPtr<AWidget> GetChildAt(int32_t index) const overrideCanCacheDesiredSize
bool CanCacheDesiredSize() const overrideBoth halves plus the handle. The ratio and its animation move the divider inside the allotted space; neither reaches the measure.
GetTypeName
const char* GetTypeName() const override