IMacroRecording Interface
Provides the base requirements for all macro recording functionality in a SyntaxEditor.
public interface IMacroRecording
Properties
CurrentMacroAction
Gets the IMacroAction that is currently being recorded.
IMacroAction CurrentMacroAction { get; }
Property Value
- IMacroAction:
The IMacroAction that is currently being recorded.
Remarks
This method returns null if no macro recording is currently taking place.
LastMacroAction
Gets the last IMacroAction that was recorded.
IMacroAction LastMacroAction { get; }
Property Value
- IMacroAction:
The last IMacroAction that was recorded.
Remarks
After macro recording is stopped, this property contains what was recorded.
State
Gets the current state of macro recording.
MacroRecordingState State { get; }
Property Value
- MacroRecordingState:
A MacroRecordingState that specifies the state.
Methods
Cancel()
Cancels recording a macro.
void Cancel()
Remarks
When macro recording is cancelled, the old value of the LastMacroAction property is not overwritten.
NotifyEditAction(ITextView, IEditAction)
Notifies that an IEditAction is going to attempt to execute within an ITextView.
void NotifyEditAction(ITextView view, IEditAction action)
Parameter | Type | Description |
---|---|---|
view | ITextView | The ITextView in which the edit action will attempt to execute. |
action | IEditAction | The IEditAction that will execute if its CanExecute(IEditorView) method returns |
Remarks
Implementations of this method should append the IEditAction to the current macro being recorded if
currently in a recording state and the action's CanRecordInMacro property is true
.
Pause()
Pauses recording a macro.
Record()
Starts recording a new macro.
Resume()
Resumes recording a macro from a paused state.
Stop()
Stops recording a macro.
IMacroAction Stop()
Returns
- IMacroAction:
The IMacroAction that was recorded.
Remarks
The IMacroAction that is recorded is stored in the LastMacroAction property. If no actions were recorded during this recording session, the old value of the LastMacroAction property will not be overwritten.