MSplitter
- Module
- Miri
- Header
#include "Miri/Widgets/MSplitter.h"- Namespace
Miri
Properties
| Type | Name | Description |
|---|---|---|
TSharedPtr<MWidget> | _Second | |
MiriDelegate<void(float)> | OnRatioChanged | |
MiriDelegate<void(float)> | OnFixedSizeChanged |
Public functions
| Returns | Name | Description |
|---|---|---|
MIRI_WIDGET_ARGS | ||
WidgetArgsType& | First | |
WidgetArgsType& | Second | |
MIRI_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 | |
EMiriCursorType | OnCursorQuery | |
void | OnMouseCaptureLost | |
MiriVec2 | 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<MWidget> | GetChildAt | |
bool | CanCacheDesiredSize | Both halves plus the handle. |
const char* | GetTypeName |
Function details
MIRI_WIDGET_ARGS
MIRI_WIDGET_ARGS(MSplitter) MIRI_ARG(EOrientation, Orientation) MIRI_ARG(float, InitialRatio) MIRI_ARG(float, HandleSize) MIRI_ARG(float, MinRatio) MIRI_ARG(float, MaxRatio) MIRI_ARG(float, FixedFirst) MIRI_ARG(float, FixedSecond) MIRI_ARG(float, MinFixedSize) MIRI_ARG(float, MaxFixedSize) MIRI_ARG(float, MinOtherSize) MIRI_ARG(MiriColor, HandleColor) MIRI_ARG(MiriColor, HandleHoverColor) TSharedPtr<MWidget> _FirstFirst
WidgetArgsType& First(TSharedPtr<MWidget> w)Second
WidgetArgsType& Second(TSharedPtr<MWidget> w)MIRI_WIDGET_ARGS_END
MIRI_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 MiriVec2& 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 MiriVec2& absolutePosition) const overrideOnCursorQuery
EMiriCursorType OnCursorQuery(const CGeometry& geo, const CPointerEvent& event) const overrideOnMouseCaptureLost
void OnMouseCaptureLost() overrideComputeDesiredSize
MiriVec2 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 CMiriPaintArgs& args, const CGeometry& geo, CMiriRenderer& 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<MWidget> 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