|
WSF
|
#include <Editor.hpp>

Public Slots | |
| void | DebugRunStateChange (wizard::ScriptDebugger *aDebuggerPtr, bool aIsRunning) |
| void | TextModified () |
Public Member Functions | |
| Editor (QWidget *aParent, Project *aProject, TextSource *aTextSource, EditorManager *aManagerPtr) | |
| ~Editor () override | |
| void | Initialize () |
| void | PrintFile () |
| void | DeleteLine () |
| virtual void | Paste () |
| void | FindNextAction () |
| void | FindPreviousAction () |
| void | GoToLineAction () |
| virtual void | LoadSettings () |
| bool | ReplaceFoundText () |
| void | Replace (const UtTextRange &aRange, const std::string aText) |
| std::string | GetSelectedText () |
| bool | SearchNext (const FindTextRequest &aFindRequest, QTextCursor *aCursorPtr=nullptr) |
| bool | SearchNextNoWrap (const FindTextRequest &aFindRequest, QTextCursor *aCursorPtr=nullptr, int aLowerBound=-1, int aUpperBound=-1) |
| bool | SearchPrevious (const FindTextRequest &aFindRequest) |
| bool | GetSelectionRange (UtTextDocumentRange &aRange) |
| void | SetSelection (const UtTextRange &aRange) |
| void | GetCurrentPosition (size_t &aOffset, size_t &aLine, size_t &aColumn) |
| std::string | GetLineText (const size_t &aLine) |
| bool | TextIsSelected () |
| void | GetLineColumn (const size_t &aOffset, size_t &aLine, size_t &aColumn) |
| QPoint | GetPoint (const size_t aOffset) |
| size_t | GetOffset (const size_t aLine, const size_t aColumn) |
| int | GetLineHeight (const int aLine) |
| TextSource * | GetSource () |
| Project * | GetProject () |
| size_t | GetPosition (size_t aLine, size_t aColumn) |
| size_t | GetPosition (const QPoint &aPoint) |
| std::string | RangeText (size_t aStart, size_t aEnd) |
| void | RequestCloseAction () |
| virtual void | BeginNonUserAction () |
| virtual void | EndNonUserAction () |
| virtual bool | ExecutingNonUserAction () |
| virtual void | ReloadComplete () |
| void | RecordCurrentLocation (bool aForceNewEntry=true) |
| void | GoToLine (size_t aLine) |
| void | GoToRange (const UtTextRange &aRange) |
| void | CopyLine () |
| void | CutLine () |
| QString | ToPlainText () |
| virtual void | UpdateStyle () |
| void | SetGlobalReadOnly (bool aIsGlobalReadOnly) |
| void | Unindent () |
| void | Indent () |
| void | SetManager (EditorManager *aManagerPtr) |
| virtual int | MarginWidth () |
| int | LineNumberWidth () |
| void | BuildTitleBarMenu (QMenu &aMenu) |
| bool | AcceptsClose () |
| QString | GetShortName (bool aTrim=true) const |
| void | mousePressEvent (QMouseEvent *aEvent) override |
| const EditorDock * | GetDock () const noexcept |
| EditorDock * | GetDock () noexcept |
Static Public Member Functions | |
| static std::string | ToAscii (const QString &aText) |
| static void | UpdateStyleFromArray (const QVector< QTextCharFormat > &aFormatChanges, const QTextBlock &firstBlk, int aLastBlockNumber, int startPos, int endPos) |
| static QStringList | Split (const QString &aStr) |
| static int | FindNextValidToken (const QStringList &aList, int aStart) |
Protected Member Functions | |
| void | keyPressEvent (QKeyEvent *e) override |
| EditorManager * | Manager () |
| bool | FoldingEnabled () |
| void | RedrawMargin () |
| QTimer & | DeferUpdateTimer () |
| EditorMargin * | Margin () |
| virtual void | PaintMargin (QPaintEvent *event) |
| virtual void | OnCursorPositionChanged () |
| void | GetCursorPoint (int &aX, int &aY, int &aLineHeight) |
| virtual void | OnUpdateRequest (const QRect &, int) |
| virtual void | DocContentsChange (int aFrom, int aCharsRemoves, int aCharsAdded) |
| void | AddCurrentLineSelection (QList< QTextEdit::ExtraSelection > &aSelections) |
| bool | event (QEvent *e) override |
| void | UpdateMarginGeometry () |
| void | focusInEvent (QFocusEvent *e) override |
Static Protected Attributes | |
| static const int | cSYMBOL_MARGIN_WIDTH = 16 |
Friends | |
| class | EditorMargin |
| wizard::Editor::Editor | ( | QWidget * | aParent, |
| Project * | aProject, | ||
| TextSource * | aTextSource, | ||
| EditorManager * | aManagerPtr ) |
|
override |
References GetLineColumn(), GetSelectionRange(), and wizSignals.
| bool wizard::Editor::AcceptsClose | ( | ) |
References wizard::RevisionStore::Backup(), wizard::Project::GetRevisionStore(), GetSource(), and wizard::Project::Instance().
Referenced by wizard::EditorManager::AcceptsClose().
|
protected |
References wizard::EditorPrefObject::EditorColor().
|
inlinevirtual |
| void wizard::Editor::BuildTitleBarMenu | ( | QMenu & | aMenu | ) |
| void wizard::Editor::CopyLine | ( | ) |
References GetCurrentPosition(), GetLineText(), and TextIsSelected().
| void wizard::Editor::CutLine | ( | ) |
References DeleteLine(), GetCurrentPosition(), GetLineText(), and TextIsSelected().
|
slot |
Referenced by Editor().
|
inlineprotected |
Referenced by wizard::WsfEditor::UpdateStyle().
| void wizard::Editor::DeleteLine | ( | ) |
Referenced by CutLine(), and EditorMargin.
|
protectedvirtual |
|
inlinevirtual |
|
overrideprotected |
References wizard::ProjectWorkspace::GetActionManager(), wizard::ProjectWorkspace::Instance(), and wizard::ActionManager::UpdateFocusActions().
Referenced by PaintMargin().
|
inlinevirtual |
| void wizard::Editor::FindNextAction | ( | ) |
References SearchNext().
Referenced by EditorMargin, wizard::FindInFilesDialog::FindNextClick(), and wizard::ReplaceInFilesDialog::FindNextClick().
|
static |
| void wizard::Editor::FindPreviousAction | ( | ) |
References SearchPrevious().
Referenced by EditorMargin, wizard::FindInFilesDialog::FindPreviousClick(), and wizard::ReplaceInFilesDialog::FindPreviousClick().
|
overrideprotected |
|
inlineprotected |
Referenced by wizard::WsfEditor::UpdateStyle().
| void wizard::Editor::GetCurrentPosition | ( | size_t & | aOffset, |
| size_t & | aLine, | ||
| size_t & | aColumn ) |
Referenced by CopyLine(), CutLine(), and EditorMargin.
|
protected |
References GetLineHeight().
|
noexcept |
Get the EditorDock containing this Editor
Referenced by wizard::ProjectWorkspace::GotoFile(), and wizard::EditorManager::RequestClose().
|
noexcept |
Get the EditorDock containing this Editor
| void wizard::Editor::GetLineColumn | ( | const size_t & | aOffset, |
| size_t & | aLine, | ||
| size_t & | aColumn ) |
Referenced by EditorMargin, and ~Editor().
| int wizard::Editor::GetLineHeight | ( | const int | aLine | ) |
Referenced by EditorMargin, and GetCursorPoint().
| std::string wizard::Editor::GetLineText | ( | const size_t & | aLine | ) |
References ToAscii().
Referenced by CopyLine(), CutLine(), and EditorMargin.
| size_t wizard::Editor::GetOffset | ( | const size_t | aLine, |
| const size_t | aColumn ) |
Referenced by EditorMargin, and wizard::TextSource::NewView().
| QPoint wizard::Editor::GetPoint | ( | const size_t | aOffset | ) |
Referenced by EditorMargin.
| size_t wizard::Editor::GetPosition | ( | const QPoint & | aPoint | ) |
| size_t wizard::Editor::GetPosition | ( | size_t | aLine, |
| size_t | aColumn ) |
|
inline |
| std::string wizard::Editor::GetSelectedText | ( | ) |
References ToAscii().
Referenced by EditorMargin.
| bool wizard::Editor::GetSelectionRange | ( | UtTextDocumentRange & | aRange | ) |
References end().
Referenced by wizard::WsfEditor::CommentBlock(), EditorMargin, wizard::WsfEditor::FormatSelection(), and ~Editor().
| QString wizard::Editor::GetShortName | ( | bool | aTrim = true | ) | const |
References wizard::Project::GetStartupFiles(), and wizard::Project::Instance().
Referenced by wizard::EditorDock::EditorDock().
|
inline |
Referenced by AcceptsClose(), wizard::ActionManager::BuildUpTitleBarMenu(), wizard::InputContext::ContextFromCursor(), wizard::RenameFileDialog::FileRename(), wizard::InputContext::GetContext(), wizard::InputContext::GetInputContext(), Indent(), wizard::FindResultsControl::NewFind(), Unindent(), and wizard::WsfEditor::UpdateStyle().
| void wizard::Editor::GoToLine | ( | size_t | aLine | ) |
References RecordCurrentLocation().
Referenced by wizard::EditorHelpers::AddNewAttributeInText(), GoToLineAction(), and wizard::ProjectWorkspace::GotoRange().
| void wizard::Editor::GoToLineAction | ( | ) |
References GoToLine(), and ok.
Referenced by EditorMargin.
| void wizard::Editor::GoToRange | ( | const UtTextRange & | aRange | ) |
Referenced by wizard::Project::GotoRange().
| void wizard::Editor::Indent | ( | ) |
References GetSource().
| void wizard::Editor::Initialize | ( | ) |
References wizard::EditorPrefObject::Changed(), and LoadSettings().
Referenced by EditorMargin, and wizard::WsfEditor::Initialize().
|
overrideprotected |
| int wizard::Editor::LineNumberWidth | ( | ) |
References wizard::EditorPrefObject::ShowLineNumbers().
Referenced by MarginWidth(), and PaintMargin().
|
virtual |
References wizard::WsfStyler::ApplyEditorStyleSettings(), and wizard::EditorPrefObject::TabSpace().
Referenced by EditorMargin, and Initialize().
|
inlineprotected |
|
inlineprotected |
References EditorMargin.
|
virtual |
References LineNumberWidth().
Referenced by UpdateMarginGeometry().
|
override |
|
protectedvirtual |
References RecordCurrentLocation(), and wizSignals.
Referenced by Editor().
|
protectedvirtual |
Referenced by Editor().
|
protectedvirtual |
References wizard::EditorPrefObject::EditorColor(), event(), and LineNumberWidth().
|
virtual |
Referenced by EditorMargin.
| void wizard::Editor::PrintFile | ( | ) |
Referenced by wizard::ActionManager::BuildUpTitleBarMenu(), and EditorMargin.
| std::string wizard::Editor::RangeText | ( | size_t | aStart, |
| size_t | aEnd ) |
References ToAscii().
| void wizard::Editor::RecordCurrentLocation | ( | bool | aForceNewEntry = true | ) |
|
protected |
Referenced by wizard::WsfEditor::UpdateStyle().
|
inlinevirtual |
| void wizard::Editor::Replace | ( | const UtTextRange & | aRange, |
| const std::string | aText ) |
References SetSelection().
Referenced by EditorMargin.
| bool wizard::Editor::ReplaceFoundText | ( | ) |
References SearchNext().
Referenced by EditorMargin, and wizard::ReplaceInFilesDialog::ReplaceClick().
| void wizard::Editor::RequestCloseAction | ( | ) |
| bool wizard::Editor::SearchNext | ( | const FindTextRequest & | aFindRequest, |
| QTextCursor * | aCursorPtr = nullptr ) |
| bool wizard::Editor::SearchNextNoWrap | ( | const FindTextRequest & | aFindRequest, |
| QTextCursor * | aCursorPtr = nullptr, | ||
| int | aLowerBound = -1, | ||
| int | aUpperBound = -1 ) |
References wizard::FindTextRequest::mCaseSensitive, wizard::FindTextRequest::mText, and RecordCurrentLocation().
Referenced by EditorMargin.
| bool wizard::Editor::SearchPrevious | ( | const FindTextRequest & | aFindRequest | ) |
References wizard::FindTextRequest::mCaseSensitive, wizard::FindTextRequest::mText, and RecordCurrentLocation().
Referenced by EditorMargin, and FindPreviousAction().
| void wizard::Editor::SetGlobalReadOnly | ( | bool | aIsGlobalReadOnly | ) |
Referenced by wizard::EditorManager::RegisterEditor(), and SetManager().
| void wizard::Editor::SetManager | ( | EditorManager * | aManagerPtr | ) |
References SetGlobalReadOnly().
| void wizard::Editor::SetSelection | ( | const UtTextRange & | aRange | ) |
Referenced by EditorMargin, wizard::ProjectWorkspace::GotoRange(), wizard::TextSource::NewView(), and Replace().
|
static |
| bool wizard::Editor::TextIsSelected | ( | ) |
Referenced by CopyLine(), CutLine(), and EditorMargin.
|
slot |
References wizSignals.
Referenced by Editor().
|
static |
Referenced by DocContentsChange(), GetLineText(), GetSelectedText(), and RangeText().
| QString wizard::Editor::ToPlainText | ( | ) |
| void wizard::Editor::Unindent | ( | ) |
References GetSource().
|
protected |
References MarginWidth().
|
inlinevirtual |
Reimplemented in wizard::WsfEditor.
Referenced by wizard::ProxyUtil::InvalidateInput().
|
static |
|
friend |
References DeleteLine(), Editor(), EditorMargin, FindNextAction(), FindPreviousAction(), GetCurrentPosition(), GetLineColumn(), GetLineHeight(), GetLineText(), GetOffset(), GetPoint(), GetSelectedText(), GetSelectionRange(), GoToLineAction(), Initialize(), LoadSettings(), Paste(), PrintFile(), Replace(), ReplaceFoundText(), SearchNext(), SearchNextNoWrap(), SearchPrevious(), SetSelection(), and TextIsSelected().
Referenced by Editor(), EditorMargin, and Margin().
|
staticprotected |