csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.8 KiB
44 lines
1.8 KiB
// This source file is adapted from the WinUI project.
|
|
// (https://github.com/microsoft/microsoft-ui-xaml)
|
|
//
|
|
// Licensed to The Avalonia Project under MIT License, courtesy of The .NET Foundation.
|
|
|
|
namespace Avalonia.Layout
|
|
{
|
|
internal struct FlowLayoutAnchorInfo
|
|
{
|
|
public int Index { get; set; }
|
|
public double Offset { get; set; }
|
|
}
|
|
|
|
internal interface IFlowLayoutAlgorithmDelegates
|
|
{
|
|
Size Algorithm_GetMeasureSize(int index, Size availableSize, VirtualizingLayoutContext context);
|
|
Size Algorithm_GetProvisionalArrangeSize(int index, Size measureSize, Size desiredSize, VirtualizingLayoutContext context);
|
|
bool Algorithm_ShouldBreakLine(int index, double remainingSpace);
|
|
FlowLayoutAnchorInfo Algorithm_GetAnchorForRealizationRect(Size availableSize, VirtualizingLayoutContext context);
|
|
FlowLayoutAnchorInfo Algorithm_GetAnchorForTargetElement(int targetIndex, Size availableSize, VirtualizingLayoutContext context);
|
|
Rect Algorithm_GetExtent(
|
|
Size availableSize,
|
|
VirtualizingLayoutContext context,
|
|
Layoutable? firstRealized,
|
|
int firstRealizedItemIndex,
|
|
Rect firstRealizedLayoutBounds,
|
|
Layoutable? lastRealized,
|
|
int lastRealizedItemIndex,
|
|
Rect lastRealizedLayoutBounds);
|
|
void Algorithm_OnElementMeasured(
|
|
Layoutable element,
|
|
int index,
|
|
Size availableSize,
|
|
Size measureSize,
|
|
Size desiredSize,
|
|
Size provisionalArrangeSize,
|
|
VirtualizingLayoutContext context);
|
|
void Algorithm_OnLineArranged(
|
|
int startIndex,
|
|
int countInLine,
|
|
double lineSize,
|
|
VirtualizingLayoutContext context);
|
|
}
|
|
}
|
|
|