40 lines
No EOL
1.1 KiB
C#
40 lines
No EOL
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using JD.Shotgun.Service.ShotgunEntities;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace JD.Shotgun.WPF
|
|
{
|
|
public interface IShotgunExplorer
|
|
{
|
|
/// <summary>
|
|
/// The item currently focused.
|
|
/// </summary>
|
|
/// TODO: could be better to have an Empty object instead of null when nothing is focused.
|
|
[CanBeNull]
|
|
ShotgunObject FocusedItem { get; }
|
|
|
|
/// <summary>
|
|
/// Occurs when an item gets focused.
|
|
/// </summary>
|
|
event Action<ShotgunObject> OnItemFocused;
|
|
|
|
/// <summary>
|
|
/// Occurs when the user actively select the focused item.
|
|
/// </summary>
|
|
event Action<ShotgunObject> OnItemActivated;
|
|
|
|
void Initialize();
|
|
|
|
/// <summary>
|
|
/// Search for items corresponding to the given string.
|
|
/// </summary>
|
|
ICollection<ShotgunObject> Search(string userInput);
|
|
|
|
/// <summary>
|
|
/// Set the focus on the given item.
|
|
/// </summary>
|
|
/// <param name="item"></param>
|
|
void Focus(ShotgunObject item);
|
|
}
|
|
} |