namespace UnityEditor.Timeline.Actions
{
///
/// Base class for a timeline action.
/// Inherit from this class to make an action on a timeline after a menu click and/or a key shortcut.
///
///
/// To add an action as a menu item in the Timeline context menu, add on the action class.
/// To make an action to react to a shortcut, use the Shortcut Manager API with .
///
///
///
///
/// Simple Timeline Action example (with context menu and shortcut support).
///
///
[ActiveInMode(TimelineModes.Default)]
public abstract class TimelineAction : IAction
{
///
/// Execute the action.
///
/// Context for the action.
/// true if the action has been executed. false otherwise
public abstract bool Execute(ActionContext context);
///
/// Defines the validity of an Action based on the context.
///
/// Context for the action.
/// Visual state of the menu for the action.
public abstract ActionValidity Validate(ActionContext context);
}
}