committed by
GitHub
416 changed files with 2235 additions and 2721 deletions
@ -1,79 +0,0 @@ |
|||||
using System; |
|
||||
using Avalonia.Data; |
|
||||
using Avalonia.Metadata; |
|
||||
|
|
||||
namespace Avalonia |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Interface for getting/setting <see cref="AvaloniaProperty"/> values on an object.
|
|
||||
/// </summary>
|
|
||||
[NotClientImplementable] |
|
||||
public interface IAvaloniaObject |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Raised when a <see cref="AvaloniaProperty"/> value changes on this object.
|
|
||||
/// </summary>
|
|
||||
event EventHandler<AvaloniaPropertyChangedEventArgs>? PropertyChanged; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Clears an <see cref="AvaloniaProperty"/>'s local value.
|
|
||||
/// </summary>
|
|
||||
/// <param name="property">The property.</param>
|
|
||||
void ClearValue(AvaloniaProperty property); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets a <see cref="AvaloniaProperty"/> value.
|
|
||||
/// </summary>
|
|
||||
/// <param name="property">The property.</param>
|
|
||||
/// <returns>The value.</returns>
|
|
||||
object? GetValue(AvaloniaProperty property); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Checks whether a <see cref="AvaloniaProperty"/> is animating.
|
|
||||
/// </summary>
|
|
||||
/// <param name="property">The property.</param>
|
|
||||
/// <returns>True if the property is animating, otherwise false.</returns>
|
|
||||
bool IsAnimating(AvaloniaProperty property); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Checks whether a <see cref="AvaloniaProperty"/> is set on this object.
|
|
||||
/// </summary>
|
|
||||
/// <param name="property">The property.</param>
|
|
||||
/// <returns>True if the property is set, otherwise false.</returns>
|
|
||||
bool IsSet(AvaloniaProperty property); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Sets a <see cref="AvaloniaProperty"/> value.
|
|
||||
/// </summary>
|
|
||||
/// <param name="property">The property.</param>
|
|
||||
/// <param name="value">The value.</param>
|
|
||||
/// <param name="priority">The priority of the value.</param>
|
|
||||
/// <returns>
|
|
||||
/// An <see cref="IDisposable"/> if setting the property can be undone, otherwise null.
|
|
||||
/// </returns>
|
|
||||
IDisposable? SetValue( |
|
||||
AvaloniaProperty property, |
|
||||
object? value, |
|
||||
BindingPriority priority = BindingPriority.LocalValue); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Binds a <see cref="AvaloniaProperty"/> to an observable.
|
|
||||
/// </summary>
|
|
||||
/// <param name="property">The property.</param>
|
|
||||
/// <param name="source">The observable.</param>
|
|
||||
/// <param name="priority">The priority of the binding.</param>
|
|
||||
/// <returns>
|
|
||||
/// A disposable which can be used to terminate the binding.
|
|
||||
/// </returns>
|
|
||||
IDisposable Bind( |
|
||||
AvaloniaProperty property, |
|
||||
IObservable<object?> source, |
|
||||
BindingPriority priority = BindingPriority.LocalValue); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Coerces the specified <see cref="AvaloniaProperty"/>.
|
|
||||
/// </summary>
|
|
||||
/// <param name="property">The property.</param>
|
|
||||
void CoerceValue(AvaloniaProperty property); |
|
||||
} |
|
||||
} |
|
||||
@ -1,39 +0,0 @@ |
|||||
using System; |
|
||||
using System.ComponentModel; |
|
||||
using Avalonia.Controls; |
|
||||
using Avalonia.LogicalTree; |
|
||||
using Avalonia.Metadata; |
|
||||
using Avalonia.Styling; |
|
||||
|
|
||||
namespace Avalonia |
|
||||
{ |
|
||||
[NotClientImplementable] |
|
||||
public interface IStyledElement : |
|
||||
IStyleable, |
|
||||
IStyleHost, |
|
||||
ILogical, |
|
||||
IResourceHost, |
|
||||
IDataContextProvider, |
|
||||
ISupportInitialize |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Occurs when the control has finished initialization.
|
|
||||
/// </summary>
|
|
||||
event EventHandler? Initialized; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets a value that indicates whether the element has finished initialization.
|
|
||||
/// </summary>
|
|
||||
bool IsInitialized { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets or sets the control's styling classes.
|
|
||||
/// </summary>
|
|
||||
new Classes Classes { get; set; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the control's logical parent.
|
|
||||
/// </summary>
|
|
||||
IStyledElement? Parent { get; } |
|
||||
} |
|
||||
} |
|
||||
@ -1,53 +0,0 @@ |
|||||
using System; |
|
||||
using Avalonia.Metadata; |
|
||||
|
|
||||
#nullable enable |
|
||||
|
|
||||
namespace Avalonia.Interactivity |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Interface for objects that raise routed events.
|
|
||||
/// </summary>
|
|
||||
[NotClientImplementable] |
|
||||
public interface IInteractive |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Gets the interactive parent of the object for bubbling and tunneling events.
|
|
||||
/// </summary>
|
|
||||
IInteractive? InteractiveParent { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Adds a handler for the specified routed event.
|
|
||||
/// </summary>
|
|
||||
/// <param name="routedEvent">The routed event.</param>
|
|
||||
/// <param name="handler">The handler.</param>
|
|
||||
/// <param name="routes">The routing strategies to listen to.</param>
|
|
||||
/// <param name="handledEventsToo">Whether handled events should also be listened for.</param>
|
|
||||
/// <returns>A disposable that terminates the event subscription.</returns>
|
|
||||
void AddHandler( |
|
||||
RoutedEvent routedEvent, |
|
||||
Delegate handler, |
|
||||
RoutingStrategies routes = RoutingStrategies.Direct | RoutingStrategies.Bubble, |
|
||||
bool handledEventsToo = false); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Removes a handler for the specified routed event.
|
|
||||
/// </summary>
|
|
||||
/// <param name="routedEvent">The routed event.</param>
|
|
||||
/// <param name="handler">The handler.</param>
|
|
||||
void RemoveHandler(RoutedEvent routedEvent, Delegate handler); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Adds the object's handlers for a routed event to an event route.
|
|
||||
/// </summary>
|
|
||||
/// <param name="routedEvent">The event.</param>
|
|
||||
/// <param name="route">The event route.</param>
|
|
||||
void AddToEventRoute(RoutedEvent routedEvent, EventRoute route); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Raises a routed event.
|
|
||||
/// </summary>
|
|
||||
/// <param name="e">The event args.</param>
|
|
||||
void RaiseEvent(RoutedEventArgs e); |
|
||||
} |
|
||||
} |
|
||||
@ -1,122 +0,0 @@ |
|||||
using Avalonia.Metadata; |
|
||||
using Avalonia.VisualTree; |
|
||||
|
|
||||
namespace Avalonia.Layout |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Defines layout-related functionality for a control.
|
|
||||
/// </summary>
|
|
||||
[NotClientImplementable] |
|
||||
public interface ILayoutable : IVisual |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Gets the size that this element computed during the measure pass of the layout process.
|
|
||||
/// </summary>
|
|
||||
Size DesiredSize { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the width of the element.
|
|
||||
/// </summary>
|
|
||||
double Width { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the height of the element.
|
|
||||
/// </summary>
|
|
||||
double Height { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the minimum width of the element.
|
|
||||
/// </summary>
|
|
||||
double MinWidth { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the maximum width of the element.
|
|
||||
/// </summary>
|
|
||||
double MaxWidth { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the minimum height of the element.
|
|
||||
/// </summary>
|
|
||||
double MinHeight { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the maximum height of the element.
|
|
||||
/// </summary>
|
|
||||
double MaxHeight { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the margin around the element.
|
|
||||
/// </summary>
|
|
||||
Thickness Margin { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the element's preferred horizontal alignment in its parent.
|
|
||||
/// </summary>
|
|
||||
HorizontalAlignment HorizontalAlignment { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the element's preferred vertical alignment in its parent.
|
|
||||
/// </summary>
|
|
||||
VerticalAlignment VerticalAlignment { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets a value indicating whether the control's layout measure is valid.
|
|
||||
/// </summary>
|
|
||||
bool IsMeasureValid { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets a value indicating whether the control's layouts arrange is valid.
|
|
||||
/// </summary>
|
|
||||
bool IsArrangeValid { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the available size passed in the previous layout pass, if any.
|
|
||||
/// </summary>
|
|
||||
Size? PreviousMeasure { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the layout rect passed in the previous layout pass, if any.
|
|
||||
/// </summary>
|
|
||||
Rect? PreviousArrange { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Creates the visual children of the control, if necessary
|
|
||||
/// </summary>
|
|
||||
void ApplyTemplate(); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Carries out a measure of the control.
|
|
||||
/// </summary>
|
|
||||
/// <param name="availableSize">The available size for the control.</param>
|
|
||||
void Measure(Size availableSize); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Arranges the control and its children.
|
|
||||
/// </summary>
|
|
||||
/// <param name="rect">The control's new bounds.</param>
|
|
||||
void Arrange(Rect rect); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Invalidates the measurement of the control and queues a new layout pass.
|
|
||||
/// </summary>
|
|
||||
void InvalidateMeasure(); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Invalidates the arrangement of the control and queues a new layout pass.
|
|
||||
/// </summary>
|
|
||||
void InvalidateArrange(); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Called when a child control's desired size changes.
|
|
||||
/// </summary>
|
|
||||
/// <param name="control">The child control.</param>
|
|
||||
void ChildDesiredSizeChanged(ILayoutable control); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Used by the <see cref="LayoutManager"/> to notify the control that its effective
|
|
||||
/// viewport is changed.
|
|
||||
/// </summary>
|
|
||||
/// <param name="e">The viewport information.</param>
|
|
||||
void EffectiveViewportChanged(EffectiveViewportChangedEventArgs e); |
|
||||
} |
|
||||
} |
|
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue