// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Collections;
namespace Avalonia.LogicalTree
{
///
/// Represents a node in the logical tree.
///
public interface ILogical
{
///
/// Raised when the control is attached to a rooted logical tree.
///
event EventHandler AttachedToLogicalTree;
///
/// Raised when the control is detached from a rooted logical tree.
///
event EventHandler DetachedFromLogicalTree;
///
/// Gets a value indicating whether the element is attached to a rooted logical tree.
///
bool IsAttachedToLogicalTree { get; }
///
/// Gets the logical parent.
///
ILogical LogicalParent { get; }
///
/// Gets the logical children.
///
IAvaloniaReadOnlyList LogicalChildren { get; }
///
/// Notifies the control that it is being attached to a rooted logical tree.
///
/// The event args.
///
/// This method will be called automatically by the framework, you should not need to call
/// this method yourself.
///
void NotifyAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e);
///
/// Notifies the control that it is being detached from a rooted logical tree.
///
/// The event args.
///
/// This method will be called automatically by the framework, you should not need to call
/// this method yourself.
///
void NotifyDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e);
}
}