aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Editors/IElementEditor.cs
blob: eaff358a22faadbca2af2df2be4dc1b0c3c3a13b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls.Primitives;
using Tango.Core;
using Tango.Editors;

namespace Tango.Editors
{
    /// <summary>
    /// Represents the base interface for element editors.
    /// </summary>
    public interface IElementEditor : IConfigurable, IParameterized
    {
        /// <summary>
        /// Gets the collection of <see cref="T:Tango.Editors.AnimationSetup"/> for the current editor and element properties.
        /// </summary>
        /// <param name="duration">The animation duration.</param>
        /// <param name="animationSetupMode">The animation setup mode.</param>
        /// <remarks>
        /// The returned collection of animation setups can be inserted into a <see cref="T:WpfVideoTools.Timeline.TimelineControl"/>.
        /// </remarks>
        List<AnimationSetup> GetAnimationSetups(TimeSpan duration, AnimationSetupMode animationSetupMode = AnimationSetupMode.Linear);

        /// <summary>
        /// Gets or sets the editor unique identifier.
        /// </summary>
        String ID { get; set; }

        /// <summary>
        /// Gets or sets the editor top position.
        /// </summary>
        double Top { get; set; }

        /// <summary>
        /// Gets or sets the editor left position.
        /// </summary>
        double Left { get; set; }

        /// <summary>
        /// Gets or sets the editor width.
        /// </summary>
        double Width { get; set; }

        /// <summary>
        /// Gets or sets the editor height.
        /// </summary>
        double Height { get; set; }

        /// <summary>
        /// Gets or sets the editor angle.
        /// </summary>
        double Angle { get; set; }

        /// <summary>
        /// Gets or sets the editor Z-index.
        /// </summary>
        int ZIndex { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the hosted element will be presented inside or outside the editor.
        /// </summary>
        bool ElementDetached { get; set; }

        /// <summary>
        /// Occurs when the editor is moving.
        /// </summary>
        event EventHandler<DragDeltaEventArgs> Moving;

        /// <summary>
        /// Occurs before editor bounds change.
        /// </summary>
        event EventHandler BeforeBoundsChange;

        /// <summary>
        /// Occurs after editor bounds change.
        /// </summary>
        event EventHandler AfterBoundsChange;

        /// <summary>
        /// Moves the editor by the specified delta arguments.
        /// </summary>
        /// <param name="e">The <see cref="DragDeltaEventArgs"/> instance containing the event data.</param>
        void PushMove(DragDeltaEventArgs e);

        /// <summary>
        /// Clones this instance.
        /// </summary>
        /// <returns></returns>
        IElementEditor Clone();

        /// <summary>
        /// Gets the hosted element.
        /// </summary>
        Object HostedElement { get; }

        /// <summary>
        /// Sets the editor bounds.
        /// </summary>
        /// <param name="bounds">The bounds.</param>
        void SetBounds(Rect bounds);

        /// <summary>
        /// Gets the editor bounds.
        /// </summary>
        /// <returns></returns>
        Rect GetBounds();

        /// <summary>
        /// Gets or sets an optional attached element for editors mirroring mode.
        /// </summary>
        IElementEditor AttachedEditor { get; set; }
    }
}