/*
Copyright (C) 2014-2019 de4dot@gmail.com
This file is part of dnSpy
dnSpy is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
dnSpy is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with dnSpy. If not, see .
*/
using dnSpy.Contracts.Text.Editor;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Operations;
namespace dnSpy.Contracts.Text.Operations {
///
/// operations
///
interface IReplEditorOperations : IEditorOperations3 {
///
/// Gets the REPL editor
///
IReplEditor ReplEditor { get; }
///
/// true if can be called
///
bool CanCopyCode { get; }
///
/// Copies only the code, but not the prompts or script output
///
void CopyCode();
///
/// Submits current input
///
///
bool Submit();
///
/// Adds a new line without submitting the current input
///
///
bool InsertNewLineDontSubmit();
///
/// Clears user input
///
void ClearInput();
///
/// Clears the screen
///
void ClearScreen();
///
/// Resets the REPL editor
///
void Reset();
///
/// Selects the previous command
///
void SelectPreviousCommand();
///
/// Selects the next command
///
void SelectNextCommand();
///
/// true if can be called
///
bool CanSelectPreviousCommand { get; }
///
/// true if can be called
///
bool CanSelectNextCommand { get; }
///
/// Selects the previous command matching the current input text
///
void SelectSameTextPreviousCommand();
///
/// Selects the next command matching the current input text
///
void SelectSameTextNextCommand();
///
/// Adds user input
///
/// Text
/// true to clear search text
void AddUserInput(string text, bool clearSearchText = true);
///
/// Adds user input
///
/// Span
/// Text
/// true to clear search text
void AddUserInput(Span span, string text, bool clearSearchText = true);
}
}