forked from Misaki/GhostEngine
Update editor
This commit is contained in:
13
Ghost.Editor.Core/Contracts/IInspectable.cs
Normal file
13
Ghost.Editor.Core/Contracts/IInspectable.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Ghost.Editor.Core.Contracts;
|
||||
|
||||
public interface IInspectable
|
||||
{
|
||||
public IconSource? CreateIcon();
|
||||
|
||||
public UIElement? CreateHeader();
|
||||
|
||||
public UIElement? CreateInspector();
|
||||
}
|
||||
32
Ghost.Editor.Core/Contracts/IInspectorService.cs
Normal file
32
Ghost.Editor.Core/Contracts/IInspectorService.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
namespace Ghost.Editor.Core.Contracts;
|
||||
|
||||
public class InspectorSelectionChangedEventArgs : EventArgs
|
||||
{
|
||||
public object? Source
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public IInspectable? Selected
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public InspectorSelectionChangedEventArgs(object? source, IInspectable? selected)
|
||||
{
|
||||
Source = source;
|
||||
Selected = selected;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IInspectorService
|
||||
{
|
||||
IInspectable? Selected
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
event EventHandler<InspectorSelectionChangedEventArgs> OnSelectionChanged;
|
||||
|
||||
void SetSelected(IInspectable? inspectable, object? source);
|
||||
}
|
||||
10
Ghost.Editor.Core/Contracts/INotificationService.cs
Normal file
10
Ghost.Editor.Core/Contracts/INotificationService.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using CommunityToolkit.WinUI.Behaviors;
|
||||
using Ghost.Editor.Core.Notifications;
|
||||
|
||||
namespace Ghost.Editor.Core.Contracts;
|
||||
|
||||
public interface INotificationService
|
||||
{
|
||||
public void ShowNotification(string? message, MessageType type, int duration = 5, string? title = null);
|
||||
public void ShowNotification(Notification notification);
|
||||
}
|
||||
12
Ghost.Editor.Core/Contracts/IPreviewService.cs
Normal file
12
Ghost.Editor.Core/Contracts/IPreviewService.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Ghost.Editor.Core.Contracts;
|
||||
|
||||
public enum IconSize
|
||||
{
|
||||
Small,
|
||||
Large
|
||||
}
|
||||
|
||||
public interface IPreviewService
|
||||
{
|
||||
string GetIconPath(string path, bool isDirectory, IconSize size);
|
||||
}
|
||||
9
Ghost.Editor.Core/Contracts/IProgressService.cs
Normal file
9
Ghost.Editor.Core/Contracts/IProgressService.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Ghost.Editor.Core.Contracts;
|
||||
|
||||
public interface IProgressService
|
||||
{
|
||||
public void ShowProgress(string message, double progress = 0.0);
|
||||
public void ShowIndeterminateProgress(string message);
|
||||
public void SetProgress(double progress);
|
||||
public void HideProgress();
|
||||
}
|
||||
Reference in New Issue
Block a user