mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-07 02:49:40 +00:00
Add the drop zone arbiter, still without consumers
This commit is contained in:
6 files changed
+245
-2
No files matched your search
@@ -0,0 +1,12 @@
|
||||
namespace AIStudio.Tools;
|
||||
|
||||
/// <summary>
|
||||
/// Names the drop zone under the cursor of a running drag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Every zone receives this and compares the ID with its own: at most one zone is highlighted at a
|
||||
/// time, and all others have to give their highlight up. A null ID means that the cursor is over no
|
||||
/// zone at all, or that the drag has ended.
|
||||
/// </remarks>
|
||||
/// <param name="ZoneId">The ID of the zone under the cursor, or null when there is none.</param>
|
||||
public readonly record struct DropZoneHighlight(string? ZoneId);
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace AIStudio.Tools;
|
||||
|
||||
/// <summary>
|
||||
/// Hands the dropped paths to the drop zone which was under the cursor.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The zone is named rather than addressed, because the message bus broadcasts. Only the zone whose
|
||||
/// own ID matches acts on this, and every other zone ignores it -- including the zones of circuits
|
||||
/// whose browser is long gone, because an ID belongs to one instance in one circuit. What the paths
|
||||
/// mean is the receiving zone's business: they may lead to files just as well as to folders.
|
||||
/// </remarks>
|
||||
/// <param name="ZoneId">The ID of the zone the paths were dropped on.</param>
|
||||
/// <param name="Paths">The dropped paths, in the order the runtime delivered them.</param>
|
||||
public readonly record struct DroppedPaths(string ZoneId, List<string> Paths);
|
||||
@@ -222,6 +222,16 @@ public enum Event
|
||||
/// Unregisters a file drop area from file attachment handling.
|
||||
/// </summary>
|
||||
UNREGISTER_FILE_DROP_AREA,
|
||||
|
||||
/// <summary>
|
||||
/// Names the drop zone under the cursor of a running drag so that exactly this one is highlighted.
|
||||
/// </summary>
|
||||
HIGHLIGHT_DROP_ZONE,
|
||||
|
||||
/// <summary>
|
||||
/// Delivers dropped paths to the drop zone which was under the cursor.
|
||||
/// </summary>
|
||||
PATHS_DROPPED,
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user