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.
42 lines
1.5 KiB
42 lines
1.5 KiB
// 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.
|
|
|
|
namespace Avalonia.Input
|
|
{
|
|
/// <summary>
|
|
/// Manages focus for the application.
|
|
/// </summary>
|
|
public interface IFocusManager
|
|
{
|
|
/// <summary>
|
|
/// Gets the currently focused <see cref="IInputElement"/>.
|
|
/// </summary>
|
|
IInputElement Current { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the current focus scope.
|
|
/// </summary>
|
|
IFocusScope Scope { get; }
|
|
|
|
/// <summary>
|
|
/// Focuses a control.
|
|
/// </summary>
|
|
/// <param name="control">The control to focus.</param>
|
|
/// <param name="method">The method by which focus was changed.</param>
|
|
/// <param name="modifiers">Any input modifiers active at the time of focus.</param>
|
|
void Focus(
|
|
IInputElement control,
|
|
NavigationMethod method = NavigationMethod.Unspecified,
|
|
InputModifiers modifiers = InputModifiers.None);
|
|
|
|
/// <summary>
|
|
/// Notifies the focus manager of a change in focus scope.
|
|
/// </summary>
|
|
/// <param name="scope">The new focus scope.</param>
|
|
/// <remarks>
|
|
/// This should not be called by client code. It is called by an <see cref="IFocusScope"/>
|
|
/// when it activates, e.g. when a Window is activated.
|
|
/// </remarks>
|
|
void SetFocusScope(IFocusScope scope);
|
|
}
|
|
}
|
|
|