AScrollBox
- Module
- Arc
- Header
#include "Arc/Widgets/AScrollBox.h"- Namespace
Arcf
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | outgrows it. | |
WidgetArgsType& | ScrollBarVisibility | |
ARC_WIDGET_ARGS_END | ||
void | AddChild | |
void | ClearChildren | |
void | ScrollTo | |
void | ScrollToEnd | |
float | GetScrollOffset | |
float | GetMaxScrollOffset | |
float | GetTargetScrollOffset | Where an in-flight wheel glide or fling will land; the offset itself when nothing is animating. |
bool | IsScrollAnimating | |
ArcVec2 | ComputeDesiredSize | |
void | ArrangeChildren | |
bool | CanSkipArrange | Refused: the body clamps the scroll offset against a content size that moves as children resize, and republishes the scrollbar's thumb fraction. |
bool | CanRetainPaint | Refused: it pushes its own viewport clip, which a slice cannot carry — every command under it would replay through a scissor fixed at the place the recording happened. |
int32_t | OnPaint | |
CReply | OnMouseWheel | |
CReply | OnMouseButtonDown | |
CReply | OnMouseButtonUp | |
CReply | OnMouseMove | |
int32_t | GetNumChildren | |
TSharedPtr<AWidget> | GetChildAt | |
bool | CanCacheDesiredSize | It reports no desired size at all — it takes what it is given and scrolls whatever does not fit. |
bool | DesiredSizeDependsOnChildren | The scrolled content is measured by the arrange body, which is where its size is actually consumed. |
const char* | GetTypeName |
Function details
ARC_WIDGET_ARGS
ARC_WIDGET_ARGS(AScrollBox) ARC_ARG(EOrientation, Orientation) ARC_ARG(bool, FillViewport) EScrollBarVisibility _ScrollBarVisibility = EScrollBarVisibility::AutoHideoutgrows it. Without it a centred child is laid out at the top.
ScrollBarVisibility
WidgetArgsType& ScrollBarVisibility(EScrollBarVisibility value)ARC_WIDGET_ARGS_END
ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)AddChild
void AddChild(TSharedPtr<AWidget> child)ClearChildren
void ClearChildren()ScrollTo
void ScrollTo(float offset)ScrollToEnd
void ScrollToEnd()GetScrollOffset
float GetScrollOffset() constGetMaxScrollOffset
float GetMaxScrollOffset() constGetTargetScrollOffset
float GetTargetScrollOffset() constWhere an in-flight wheel glide or fling will land; the offset itself when nothing is animating.
IsScrollAnimating
bool IsScrollAnimating() constComputeDesiredSize
ArcVec2 ComputeDesiredSize(float scale) const overrideArrangeChildren
void ArrangeChildren(const CGeometry& allottedGeo) overrideCanSkipArrange
bool CanSkipArrange() const overrideRefused: the body clamps the scroll offset against a content size that moves as children resize, and republishes the scrollbar's thumb fraction. Skipping it strands the thumb and lets the offset sit past the end of shrunken content.
CanRetainPaint
bool CanRetainPaint() const overrideRefused: it pushes its own viewport clip, which a slice cannot carry — every command under it would replay through a scissor fixed at the place the recording happened.
OnPaint
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideOnMouseWheel
CReply OnMouseWheel(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonDown
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonUp
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseMove
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) overrideGetNumChildren
int32_t GetNumChildren() const overrideGetChildAt
TSharedPtr<AWidget> GetChildAt(int32_t index) const overrideCanCacheDesiredSize
bool CanCacheDesiredSize() const overrideIt reports no desired size at all — it takes what it is given and scrolls whatever does not fit. The measure's only other job is capturing the layout scale, which the cache re-runs whenever the scale moves.
DesiredSizeDependsOnChildren
bool DesiredSizeDependsOnChildren() const overrideThe scrolled content is measured by the arrange body, which is where its size is actually consumed. Reading it here as well made the measure pass walk the whole panel to learn nothing.
GetTypeName
const char* GetTypeName() const override