Add shared rectangle selection for all timeline tracks to select keyframes

#519
This commit is contained in:
Wojtek Figat
2021-08-24 17:14:41 +02:00
parent 603c9fac07
commit 0063ec3527
11 changed files with 493 additions and 94 deletions

View File

@@ -10,7 +10,7 @@ namespace FlaxEditor.GUI
/// The base class for <see cref="CurveBase{T}"/> editors. Allows to use generic curve editor without type information at compile-time.
/// </summary>
[HideInEditor]
public abstract class CurveEditorBase : ContainerControl
public abstract class CurveEditorBase : ContainerControl, IKeyframesEditor
{
/// <summary>
/// The UI use mode flags.
@@ -124,6 +124,11 @@ namespace FlaxEditor.GUI
/// </summary>
public abstract int KeyframesCount { get; }
/// <summary>
/// Clears the selection.
/// </summary>
public abstract void ClearSelection();
/// <summary>
/// Called when curve gets edited.
/// </summary>
@@ -256,5 +261,20 @@ namespace FlaxEditor.GUI
(mode & UseMode.Vertical) == UseMode.Vertical ? value.Y : defaultValue.Y
);
}
/// <inheritdoc />
public IKeyframesEditorContext KeyframesEditorContext { get; set; }
/// <inheritdoc />
public abstract void OnKeyframesDeselect(IKeyframesEditor editor);
/// <inheritdoc />
public abstract void OnKeyframesSelection(IKeyframesEditor editor, ContainerControl control, Rectangle selection);
/// <inheritdoc />
public abstract int OnKeyframesSelectionCount();
/// <inheritdoc />
public abstract void OnKeyframesDelete(IKeyframesEditor editor);
}
}