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.
41 lines
1.4 KiB
41 lines
1.4 KiB
// -----------------------------------------------------------------------
|
|
// <copyright file="IFocusManager.cs" company="Steven Kirk">
|
|
// Copyright 2014 MIT Licence. See licence.md for more information.
|
|
// </copyright>
|
|
// -----------------------------------------------------------------------
|
|
|
|
namespace Perspex.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>
|
|
void Focus(IInputElement control, NavigationMethod method = NavigationMethod.Unspecified);
|
|
|
|
/// <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);
|
|
}
|
|
}
|
|
|