Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
IActionItem.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 
5 namespace SiliconStudio.ActionStack
6 {
7  /// <summary>
8  /// Base interface for action items.
9  /// </summary>
10  public interface IActionItem
11  {
12  /// <summary>
13  /// Gets or sets the name of the current action.
14  /// </summary>
15  string Name { get; set; }
16 
17  /// <summary>
18  /// Gets an unique identifier of the action, per instance.
19  /// </summary>
20  Guid Identifier { get; }
21 
22  /// <summary>
23  /// Gets or sets whether this action as already been saved when evaluating the dirtiness of an object.
24  /// </summary>
25  bool IsSaved { get; set; }
26 
27  /// <summary>
28  /// Gets whether this action is currently done. Modified when invoking <see cref="Undo"/> or <see cref="Redo"/>.
29  /// </summary>
30  bool IsDone { get; }
31 
32  /// <summary>
33  /// Gets whether this action has been frozen with the <see cref="Freeze"/> method.
34  /// </summary>
35  bool IsFrozen { get; }
36 
37  /// <summary>
38  /// Freezes this ActionItem. A frozen action item can't be undone anymore and should have freed the resources stored for undo actions
39  /// </summary>
40  void Freeze();
41 
42  /// <summary>
43  /// Undo the action.
44  /// </summary>
45  void Undo();
46 
47  /// <summary>
48  /// Redo the action.
49  /// </summary>
50  void Redo();
51  }
52 }
Base interface for action items.
Definition: IActionItem.cs:10