#include <text_editor.h>

Classes | |
| struct | Breakpoint |
| struct | Coordinates |
| struct | EditorState |
| struct | Glyph |
| struct | Identifier |
| struct | LanguageDefinition |
| class | UndoRecord |
Public Types | |
| enum class | PaletteIndex { Default , Keyword , Number , String , CharLiteral , Punctuation , Preprocessor , Identifier , KnownIdentifier , PreprocIdentifier , Comment , MultiLineComment , Background , Cursor , Selection , ErrorMarker , Breakpoint , LineNumber , CurrentLineFill , CurrentLineFillInactive , CurrentLineEdge , Max } |
| enum class | SelectionMode { Normal , Word , Line } |
| typedef std::string | String |
| typedef std::unordered_map< std::string, Identifier > | Identifiers |
| typedef std::unordered_set< std::string > | Keywords |
| typedef std::map< int, std::string > | ErrorMarkers |
| typedef std::unordered_set< int > | Breakpoints |
| typedef std::array< ImU32,(unsigned) PaletteIndex::Max > | Palette |
| typedef uint8_t | Char |
| typedef std::vector< Glyph > | Line |
| typedef std::vector< Line > | Lines |
Public Member Functions | |
| TextEditor () | |
| ~TextEditor () | |
| void | SetLanguageDefinition (const LanguageDefinition &aLanguageDef) |
| const LanguageDefinition & | GetLanguageDefinition () const |
| const Palette & | GetPalette () const |
| void | SetPalette (const Palette &aValue) |
| void | SetErrorMarkers (const ErrorMarkers &aMarkers) |
| void | SetBreakpoints (const Breakpoints &aMarkers) |
| void | Render (const char *aTitle, const ImVec2 &aSize=ImVec2(), bool aBorder=false) |
| void | SetText (const std::string &aText) |
| std::string | GetText () const |
| void | SetTextLines (const std::vector< std::string > &aLines) |
| std::vector< std::string > | GetTextLines () const |
| std::string | GetSelectedText () const |
| std::string | GetCurrentLineText () const |
| int | GetTotalLines () const |
| bool | IsOverwrite () const |
| void | SetReadOnly (bool aValue) |
| bool | IsReadOnly () const |
| bool | IsTextChanged () const |
| bool | IsCursorPositionChanged () const |
| bool | IsColorizerEnabled () const |
| void | SetColorizerEnable (bool aValue) |
| Coordinates | GetCursorPosition () const |
| void | SetCursorPosition (const Coordinates &aPosition) |
| void | SetHandleMouseInputs (bool aValue) |
| bool | IsHandleMouseInputsEnabled () const |
| void | SetHandleKeyboardInputs (bool aValue) |
| bool | IsHandleKeyboardInputsEnabled () const |
| void | SetImGuiChildIgnored (bool aValue) |
| bool | IsImGuiChildIgnored () const |
| void | SetShowWhitespaces (bool aValue) |
| bool | IsShowingWhitespaces () const |
| void | SetTabSize (int aValue) |
| int | GetTabSize () const |
| void | InsertText (const std::string &aValue) |
| void | InsertText (const char *aValue) |
| void | MoveUp (int aAmount=1, bool aSelect=false) |
| void | MoveDown (int aAmount=1, bool aSelect=false) |
| void | MoveLeft (int aAmount=1, bool aSelect=false, bool aWordMode=false) |
| void | MoveRight (int aAmount=1, bool aSelect=false, bool aWordMode=false) |
| void | MoveTop (bool aSelect=false) |
| void | MoveBottom (bool aSelect=false) |
| void | MoveHome (bool aSelect=false) |
| void | MoveEnd (bool aSelect=false) |
| void | SetSelectionStart (const Coordinates &aPosition) |
| void | SetSelectionEnd (const Coordinates &aPosition) |
| void | SetSelection (const Coordinates &aStart, const Coordinates &aEnd, SelectionMode aMode=SelectionMode::Normal) |
| void | SelectWordUnderCursor () |
| void | SelectAll () |
| bool | HasSelection () const |
| void | Copy () |
| void | Cut () |
| void | Paste () |
| void | Delete () |
| bool | CanUndo () const |
| bool | CanRedo () const |
| void | Undo (int aSteps=1) |
| void | Redo (int aSteps=1) |
Static Public Member Functions | |
| static const Palette & | GetDarkPalette () |
| static const Palette & | GetLightPalette () |
| static const Palette & | GetRetroBluePalette () |
Private Types | |
| typedef std::vector< std::pair< std::regex, PaletteIndex > > | RegexList |
| typedef std::vector< UndoRecord > | UndoBuffer |
Private Member Functions | |
| void | ProcessInputs () |
| void | Colorize (int aFromLine=0, int aCount=-1) |
| void | ColorizeRange (int aFromLine=0, int aToLine=0) |
| void | ColorizeInternal () |
| float | TextDistanceToLineStart (const Coordinates &aFrom) const |
| void | EnsureCursorVisible () |
| int | GetPageSize () const |
| std::string | GetText (const Coordinates &aStart, const Coordinates &aEnd) const |
| Coordinates | GetActualCursorCoordinates () const |
| Coordinates | SanitizeCoordinates (const Coordinates &aValue) const |
| void | Advance (Coordinates &aCoordinates) const |
| void | DeleteRange (const Coordinates &aStart, const Coordinates &aEnd) |
| int | InsertTextAt (Coordinates &aWhere, const char *aValue) |
| void | AddUndo (UndoRecord &aValue) |
| Coordinates | ScreenPosToCoordinates (const ImVec2 &aPosition) const |
| Coordinates | FindWordStart (const Coordinates &aFrom) const |
| Coordinates | FindWordEnd (const Coordinates &aFrom) const |
| Coordinates | FindNextWord (const Coordinates &aFrom) const |
| int | GetCharacterIndex (const Coordinates &aCoordinates) const |
| int | GetCharacterColumn (int aLine, int aIndex) const |
| int | GetLineCharacterCount (int aLine) const |
| int | GetLineMaxColumn (int aLine) const |
| bool | IsOnWordBoundary (const Coordinates &aAt) const |
| void | RemoveLine (int aStart, int aEnd) |
| void | RemoveLine (int aIndex) |
| Line & | InsertLine (int aIndex) |
| void | EnterCharacter (ImWchar aChar, bool aShift) |
| void | Backspace () |
| void | DeleteSelection () |
| std::string | GetWordUnderCursor () const |
| std::string | GetWordAt (const Coordinates &aCoords) const |
| ImU32 | GetGlyphColor (const Glyph &aGlyph) const |
| void | HandleKeyboardInputs () |
| void | HandleMouseInputs () |
| void | Render () |
Private Attributes | |
| float | mLineSpacing |
| Lines | mLines |
| EditorState | mState |
| UndoBuffer | mUndoBuffer |
| int | mUndoIndex |
| int | mTabSize |
| bool | mOverwrite |
| bool | mReadOnly |
| bool | mWithinRender |
| bool | mScrollToCursor |
| bool | mScrollToTop |
| bool | mTextChanged |
| bool | mColorizerEnabled |
| float | mTextStart |
| int | mLeftMargin |
| bool | mCursorPositionChanged |
| int | mColorRangeMin |
| int | mColorRangeMax |
| SelectionMode | mSelectionMode |
| bool | mHandleKeyboardInputs |
| bool | mHandleMouseInputs |
| bool | mIgnoreImGuiChild |
| bool | mShowWhitespaces |
| Palette | mPaletteBase |
| Palette | mPalette |
| LanguageDefinition | mLanguageDefinition |
| RegexList | mRegexList |
| bool | mCheckComments |
| Breakpoints | mBreakpoints |
| ErrorMarkers | mErrorMarkers |
| ImVec2 | mCharAdvance |
| Coordinates | mInteractiveStart |
| Coordinates | mInteractiveEnd |
| std::string | mLineBuffer |
| uint64_t | mStartTime |
| float | mLastClick |
Definition at line 17 of file text_editor.h.
| typedef std::string TextEditor::String |
Definition at line 112 of file text_editor.h.
| typedef std::unordered_map<std::string, Identifier> TextEditor::Identifiers |
Definition at line 113 of file text_editor.h.
| typedef std::unordered_set<std::string> TextEditor::Keywords |
Definition at line 114 of file text_editor.h.
| typedef std::map<int, std::string> TextEditor::ErrorMarkers |
Definition at line 115 of file text_editor.h.
| typedef std::unordered_set<int> TextEditor::Breakpoints |
Definition at line 116 of file text_editor.h.
| typedef std::array<ImU32, (unsigned)PaletteIndex::Max> TextEditor::Palette |
Definition at line 117 of file text_editor.h.
| typedef uint8_t TextEditor::Char |
Definition at line 118 of file text_editor.h.
| typedef std::vector<Glyph> TextEditor::Line |
Definition at line 135 of file text_editor.h.
| typedef std::vector<Line> TextEditor::Lines |
Definition at line 136 of file text_editor.h.
|
private |
Definition at line 272 of file text_editor.h.
|
private |
Definition at line 311 of file text_editor.h.
|
strong |
Definition at line 19 of file text_editor.h.
|
strong |
| Enumerator | |
|---|---|
| Normal | |
| Word | |
| Line | |
Definition at line 44 of file text_editor.h.
| TextEditor::TextEditor | ( | ) |
Definition at line 25 of file text_editor.cc.
References GetDarkPalette(), TextEditor::LanguageDefinition::HLSL(), mLines, SetLanguageDefinition(), and SetPalette().

| TextEditor::~TextEditor | ( | ) |
Definition at line 56 of file text_editor.cc.
| void TextEditor::SetLanguageDefinition | ( | const LanguageDefinition & | aLanguageDef | ) |
Definition at line 58 of file text_editor.cc.
References Colorize(), mLanguageDefinition, mRegexList, and TextEditor::LanguageDefinition::mTokenRegexStrings.
Referenced by yaze::editor::AssemblyEditor::Initialize(), yaze::editor::ProjectFileEditor::ProjectFileEditor(), and TextEditor().

|
inline |
Definition at line 179 of file text_editor.h.
References mLanguageDefinition.
Referenced by yaze::editor::AssemblyEditor::DrawCodeEditor(), and yaze::editor::AssemblyEditor::InlineUpdate().
|
inline |
Definition at line 183 of file text_editor.h.
References mPaletteBase.
| void TextEditor::SetPalette | ( | const Palette & | aValue | ) |
Definition at line 69 of file text_editor.cc.
References mPaletteBase.
Referenced by yaze::editor::AssemblyEditor::AssemblyEditor(), and TextEditor().
|
inline |
Definition at line 186 of file text_editor.h.
References mErrorMarkers.
|
inline |
Definition at line 189 of file text_editor.h.
References mBreakpoints.
| void TextEditor::Render | ( | const char * | aTitle, |
| const ImVec2 & | aSize = ImVec2(), | ||
| bool | aBorder = false ) |
Definition at line 1094 of file text_editor.cc.
References Background, ColorizeInternal(), HandleKeyboardInputs(), HandleMouseInputs(), mCursorPositionChanged, mHandleKeyboardInputs, mHandleMouseInputs, mIgnoreImGuiChild, mPalette, mTextChanged, mWithinRender, and Render().
Referenced by yaze::editor::ProjectFileEditor::Draw(), yaze::editor::AssemblyEditor::DrawCodeEditor(), and yaze::editor::AssemblyEditor::InlineUpdate().

| void TextEditor::SetText | ( | const std::string & | aText | ) |
Definition at line 1128 of file text_editor.cc.
References Colorize(), Default, mLines, mScrollToTop, mTextChanged, mUndoBuffer, and mUndoIndex.
Referenced by yaze::editor::ProjectFileEditor::LoadFile(), and yaze::editor::ProjectFileEditor::NewFile().

| std::string TextEditor::GetText | ( | ) | const |
Definition at line 1954 of file text_editor.cc.
References GetText(), and mLines.
Referenced by Delete(), EnterCharacter(), GetCurrentLineText(), GetSelectedText(), GetText(), yaze::editor::ProjectFileEditor::SaveFileAs(), and yaze::editor::ProjectFileEditor::ValidateContent().

| void TextEditor::SetTextLines | ( | const std::vector< std::string > & | aLines | ) |
Definition at line 1150 of file text_editor.cc.
References Colorize(), Default, mLines, mScrollToTop, mTextChanged, mUndoBuffer, and mUndoIndex.

| std::vector< std::string > TextEditor::GetTextLines | ( | ) | const |
Definition at line 1958 of file text_editor.cc.
References mLines.
| std::string TextEditor::GetSelectedText | ( | ) | const |
Definition at line 1977 of file text_editor.cc.
References GetText(), TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, and mState.
Referenced by Backspace(), Copy(), Cut(), Delete(), EnterCharacter(), and Paste().

| std::string TextEditor::GetCurrentLineText | ( | ) | const |
Definition at line 1981 of file text_editor.cc.
References GetLineMaxColumn(), GetText(), TextEditor::EditorState::mCursorPosition, TextEditor::Coordinates::mLine, and mState.

|
inline |
Definition at line 202 of file text_editor.h.
References mLines.
Referenced by yaze::editor::AssemblyEditor::DrawCodeEditor(), and yaze::editor::AssemblyEditor::InlineUpdate().
|
inline |
Definition at line 203 of file text_editor.h.
References mOverwrite.
Referenced by yaze::editor::AssemblyEditor::DrawCodeEditor(), and yaze::editor::AssemblyEditor::InlineUpdate().
| void TextEditor::SetReadOnly | ( | bool | aValue | ) |
Definition at line 1336 of file text_editor.cc.
References mReadOnly.
|
inline |
Definition at line 206 of file text_editor.h.
References mReadOnly.
Referenced by Cut(), HandleKeyboardInputs(), and Paste().
|
inline |
Definition at line 207 of file text_editor.h.
References mTextChanged.
Referenced by yaze::editor::ProjectFileEditor::IsModified().
|
inline |
Definition at line 208 of file text_editor.h.
References mCursorPositionChanged.
|
inline |
Definition at line 210 of file text_editor.h.
References mColorizerEnabled.
| void TextEditor::SetColorizerEnable | ( | bool | aValue | ) |
Definition at line 1340 of file text_editor.cc.
References mColorizerEnabled.
|
inline |
Definition at line 213 of file text_editor.h.
References GetActualCursorCoordinates().
Referenced by yaze::editor::AssemblyEditor::DrawCodeEditor(), GetWordUnderCursor(), yaze::editor::AssemblyEditor::InlineUpdate(), and SelectWordUnderCursor().

| void TextEditor::SetCursorPosition | ( | const Coordinates & | aPosition | ) |
Definition at line 1344 of file text_editor.cc.
References EnsureCursorVisible(), TextEditor::EditorState::mCursorPosition, mCursorPositionChanged, and mState.
Referenced by Backspace(), Delete(), DeleteSelection(), EnterCharacter(), InsertText(), MoveEnd(), MoveHome(), and MoveTop().

|
inline |
Definition at line 216 of file text_editor.h.
References mHandleMouseInputs.
|
inline |
Definition at line 217 of file text_editor.h.
References mHandleKeyboardInputs.
|
inline |
Definition at line 221 of file text_editor.h.
References mHandleKeyboardInputs.
|
inline |
Definition at line 224 of file text_editor.h.
References mHandleKeyboardInputs.
|
inline |
Definition at line 228 of file text_editor.h.
References mIgnoreImGuiChild.
|
inline |
Definition at line 229 of file text_editor.h.
References mIgnoreImGuiChild.
|
inline |
Definition at line 231 of file text_editor.h.
References mShowWhitespaces.
Referenced by yaze::editor::AssemblyEditor::AssemblyEditor(), and yaze::editor::ProjectFileEditor::ProjectFileEditor().
|
inline |
Definition at line 232 of file text_editor.h.
References mShowWhitespaces.
| void TextEditor::SetTabSize | ( | int | aValue | ) |
Definition at line 1400 of file text_editor.cc.
References mTabSize.
Referenced by yaze::editor::ProjectFileEditor::ProjectFileEditor().
|
inline |
Definition at line 235 of file text_editor.h.
References mTabSize.
| void TextEditor::InsertText | ( | const std::string & | aValue | ) |
Definition at line 1404 of file text_editor.cc.
References InsertText().
Referenced by InsertText(), and Paste().

| void TextEditor::InsertText | ( | const char * | aValue | ) |
Definition at line 1408 of file text_editor.cc.
References Colorize(), GetActualCursorCoordinates(), InsertTextAt(), TextEditor::EditorState::mSelectionStart, mState, SetCursorPosition(), and SetSelection().
| void TextEditor::MoveUp | ( | int | aAmount = 1, |
| bool | aSelect = false ) |
Definition at line 1436 of file text_editor.cc.
References EnsureCursorVisible(), TextEditor::EditorState::mCursorPosition, mInteractiveEnd, mInteractiveStart, TextEditor::Coordinates::mLine, mState, and SetSelection().
Referenced by HandleKeyboardInputs().

| void TextEditor::MoveDown | ( | int | aAmount = 1, |
| bool | aSelect = false ) |
Definition at line 1458 of file text_editor.cc.
References EnsureCursorVisible(), TextEditor::Coordinates::mColumn, TextEditor::EditorState::mCursorPosition, mInteractiveEnd, mInteractiveStart, TextEditor::Coordinates::mLine, mLines, mState, and SetSelection().
Referenced by HandleKeyboardInputs().

| void TextEditor::MoveLeft | ( | int | aAmount = 1, |
| bool | aSelect = false, | ||
| bool | aWordMode = false ) |
Definition at line 1487 of file text_editor.cc.
References EnsureCursorVisible(), FindWordStart(), GetActualCursorCoordinates(), GetCharacterColumn(), GetCharacterIndex(), TextEditor::Coordinates::mColumn, TextEditor::EditorState::mCursorPosition, mInteractiveEnd, mInteractiveStart, TextEditor::Coordinates::mLine, mLines, mState, Normal, SetSelection(), and Word.
Referenced by HandleKeyboardInputs().
| void TextEditor::MoveRight | ( | int | aAmount = 1, |
| bool | aSelect = false, | ||
| bool | aWordMode = false ) |
Definition at line 1544 of file text_editor.cc.
References EnsureCursorVisible(), FindNextWord(), GetCharacterColumn(), GetCharacterIndex(), TextEditor::Coordinates::mColumn, TextEditor::EditorState::mCursorPosition, mInteractiveEnd, mInteractiveStart, TextEditor::Coordinates::mLine, mLines, mState, Normal, SanitizeCoordinates(), SetSelection(), and Word.
Referenced by HandleKeyboardInputs().
| void TextEditor::MoveTop | ( | bool | aSelect = false | ) |
Definition at line 1590 of file text_editor.cc.
References TextEditor::EditorState::mCursorPosition, mInteractiveEnd, mInteractiveStart, mState, SetCursorPosition(), and SetSelection().
Referenced by HandleKeyboardInputs().

| void TextEditor::MoveBottom | ( | bool | aSelect = false | ) |
Referenced by HandleKeyboardInputs().
| void TextEditor::MoveHome | ( | bool | aSelect = false | ) |
Definition at line 1616 of file text_editor.cc.
References TextEditor::EditorState::mCursorPosition, mInteractiveEnd, mInteractiveStart, TextEditor::Coordinates::mLine, mState, SetCursorPosition(), and SetSelection().
Referenced by HandleKeyboardInputs().

| void TextEditor::MoveEnd | ( | bool | aSelect = false | ) |
Definition at line 1636 of file text_editor.cc.
References GetLineMaxColumn(), TextEditor::EditorState::mCursorPosition, mInteractiveEnd, mInteractiveStart, TextEditor::Coordinates::mLine, mState, SetCursorPosition(), and SetSelection().
Referenced by HandleKeyboardInputs().

| void TextEditor::SetSelectionStart | ( | const Coordinates & | aPosition | ) |
Definition at line 1352 of file text_editor.cc.
References TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, mState, and SanitizeCoordinates().

| void TextEditor::SetSelectionEnd | ( | const Coordinates & | aPosition | ) |
Definition at line 1358 of file text_editor.cc.
References TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, mState, and SanitizeCoordinates().

| void TextEditor::SetSelection | ( | const Coordinates & | aStart, |
| const Coordinates & | aEnd, | ||
| SelectionMode | aMode = SelectionMode::Normal ) |
Definition at line 1364 of file text_editor.cc.
References FindWordEnd(), FindWordStart(), GetLineMaxColumn(), IsOnWordBoundary(), Line, mCursorPositionChanged, TextEditor::Coordinates::mLine, mLines, TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, mState, Normal, SanitizeCoordinates(), and Word.
Referenced by DeleteSelection(), HandleMouseInputs(), InsertText(), MoveDown(), MoveEnd(), MoveHome(), MoveLeft(), MoveRight(), MoveTop(), MoveUp(), SelectAll(), and SelectWordUnderCursor().
| void TextEditor::SelectWordUnderCursor | ( | ) |
Definition at line 1781 of file text_editor.cc.
References FindWordEnd(), FindWordStart(), GetCursorPosition(), and SetSelection().

| void TextEditor::SelectAll | ( | ) |
Definition at line 1786 of file text_editor.cc.
References mLines, and SetSelection().
Referenced by HandleKeyboardInputs().

| bool TextEditor::HasSelection | ( | ) | const |
Definition at line 1790 of file text_editor.cc.
References TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, and mState.
Referenced by Backspace(), Copy(), Cut(), Delete(), EnterCharacter(), Paste(), and Render().
| void TextEditor::Copy | ( | ) |
Definition at line 1794 of file text_editor.cc.
References GetActualCursorCoordinates(), GetSelectedText(), HasSelection(), TextEditor::Coordinates::mLine, and mLines.
Referenced by yaze::editor::AssemblyEditor::Copy(), Cut(), yaze::editor::AssemblyEditor::DrawEditMenu(), and HandleKeyboardInputs().

| void TextEditor::Cut | ( | ) |
Definition at line 1808 of file text_editor.cc.
References AddUndo(), Copy(), DeleteSelection(), GetSelectedText(), HasSelection(), IsReadOnly(), TextEditor::UndoRecord::mAfter, TextEditor::UndoRecord::mBefore, TextEditor::UndoRecord::mRemoved, TextEditor::UndoRecord::mRemovedEnd, TextEditor::UndoRecord::mRemovedStart, TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, and mState.
Referenced by yaze::editor::AssemblyEditor::Cut(), yaze::editor::AssemblyEditor::DrawEditMenu(), and HandleKeyboardInputs().
| void TextEditor::Paste | ( | ) |
Definition at line 1828 of file text_editor.cc.
References AddUndo(), DeleteSelection(), GetActualCursorCoordinates(), GetSelectedText(), HasSelection(), InsertText(), IsReadOnly(), TextEditor::UndoRecord::mAdded, TextEditor::UndoRecord::mAddedEnd, TextEditor::UndoRecord::mAddedStart, TextEditor::UndoRecord::mAfter, TextEditor::UndoRecord::mBefore, TextEditor::UndoRecord::mRemoved, TextEditor::UndoRecord::mRemovedEnd, TextEditor::UndoRecord::mRemovedStart, TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, and mState.
Referenced by yaze::editor::AssemblyEditor::DrawEditMenu(), HandleKeyboardInputs(), and yaze::editor::AssemblyEditor::Paste().
| void TextEditor::Delete | ( | ) |
Definition at line 1657 of file text_editor.cc.
References AddUndo(), Advance(), Colorize(), DeleteSelection(), GetActualCursorCoordinates(), GetCharacterIndex(), GetLineMaxColumn(), GetSelectedText(), GetText(), HasSelection(), TextEditor::UndoRecord::mAfter, TextEditor::UndoRecord::mBefore, TextEditor::Coordinates::mColumn, mLines, mReadOnly, TextEditor::UndoRecord::mRemoved, TextEditor::UndoRecord::mRemovedEnd, TextEditor::UndoRecord::mRemovedStart, TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, mState, mTextChanged, RemoveLine(), and SetCursorPosition().
Referenced by HandleKeyboardInputs().
| bool TextEditor::CanUndo | ( | ) | const |
Definition at line 1855 of file text_editor.cc.
References mReadOnly, and mUndoIndex.
Referenced by yaze::editor::AssemblyEditor::DrawCodeEditor(), yaze::editor::AssemblyEditor::InlineUpdate(), and Undo().
| bool TextEditor::CanRedo | ( | ) | const |
Definition at line 1859 of file text_editor.cc.
References mReadOnly, mUndoBuffer, and mUndoIndex.
Referenced by Redo().
| void TextEditor::Undo | ( | int | aSteps = 1 | ) |
Definition at line 1863 of file text_editor.cc.
References CanUndo(), mUndoBuffer, and mUndoIndex.
Referenced by yaze::editor::AssemblyEditor::DrawEditMenu(), HandleKeyboardInputs(), and yaze::editor::AssemblyEditor::Undo().

| void TextEditor::Redo | ( | int | aSteps = 1 | ) |
Definition at line 1868 of file text_editor.cc.
References CanRedo(), mUndoBuffer, and mUndoIndex.
Referenced by yaze::editor::AssemblyEditor::DrawEditMenu(), HandleKeyboardInputs(), and yaze::editor::AssemblyEditor::Redo().

|
static |
Definition at line 1873 of file text_editor.cc.
Referenced by yaze::editor::AssemblyEditor::AssemblyEditor(), yaze::editor::AssemblyEditor::ChangeActiveFile(), and TextEditor().
|
static |
Definition at line 1900 of file text_editor.cc.
|
static |
Definition at line 1927 of file text_editor.cc.
|
private |
Definition at line 1987 of file text_editor.cc.
|
private |
Definition at line 1989 of file text_editor.cc.
References mCheckComments, mColorRangeMax, mColorRangeMin, and mLines.
Referenced by Backspace(), Delete(), DeleteSelection(), EnterCharacter(), InsertText(), TextEditor::UndoRecord::Redo(), SetLanguageDefinition(), SetText(), SetTextLines(), and TextEditor::UndoRecord::Undo().
|
private |
Definition at line 1999 of file text_editor.cc.
References Default, Identifier, Keyword, KnownIdentifier, TextEditor::LanguageDefinition::mCaseSensitive, TextEditor::LanguageDefinition::mIdentifiers, TextEditor::LanguageDefinition::mKeywords, mLanguageDefinition, mLines, TextEditor::LanguageDefinition::mPreprocIdentifiers, mRegexList, TextEditor::LanguageDefinition::mTokenize, and PreprocIdentifier.
Referenced by ColorizeInternal().
|
private |
Definition at line 2093 of file text_editor.cc.
References ColorizeRange(), equals(), mCheckComments, mColorizerEnabled, mColorRangeMax, mColorRangeMin, TextEditor::LanguageDefinition::mCommentEnd, TextEditor::LanguageDefinition::mCommentStart, mLanguageDefinition, mLines, TextEditor::LanguageDefinition::mPreprocChar, TextEditor::LanguageDefinition::mSingleLineComment, and TextEditor::LanguageDefinition::mTokenize.
Referenced by Render().

|
private |
Definition at line 2225 of file text_editor.cc.
References GetCharacterIndex(), TextEditor::Coordinates::mLine, mLines, and mTabSize.
Referenced by EnsureCursorVisible(), and Render().

|
private |
Definition at line 2257 of file text_editor.cc.
References GetActualCursorCoordinates(), mCharAdvance, mScrollToCursor, mTextStart, mWithinRender, and TextDistanceToLineStart().
Referenced by Backspace(), EnterCharacter(), MoveDown(), MoveLeft(), MoveRight(), MoveUp(), TextEditor::UndoRecord::Redo(), Render(), SetCursorPosition(), and TextEditor::UndoRecord::Undo().

|
private |
Definition at line 2289 of file text_editor.cc.
References mCharAdvance.
Referenced by HandleKeyboardInputs().
|
private |
Definition at line 73 of file text_editor.cc.
References GetCharacterIndex(), TextEditor::Coordinates::mLine, and mLines.

|
private |
Definition at line 106 of file text_editor.cc.
References TextEditor::EditorState::mCursorPosition, mState, and SanitizeCoordinates().
Referenced by Backspace(), Copy(), Delete(), EnsureCursorVisible(), EnterCharacter(), GetCursorPosition(), InsertText(), MoveLeft(), and Paste().

|
private |
Definition at line 110 of file text_editor.cc.
References GetLineMaxColumn(), TextEditor::Coordinates::mColumn, TextEditor::Coordinates::mLine, and mLines.
Referenced by GetActualCursorCoordinates(), MoveRight(), ScreenPosToCoordinates(), SetSelection(), SetSelectionEnd(), and SetSelectionStart().

|
private |
Definition at line 182 of file text_editor.cc.
References GetCharacterColumn(), GetCharacterIndex(), TextEditor::Coordinates::mColumn, TextEditor::Coordinates::mLine, and mLines.
Referenced by Backspace(), and Delete().

|
private |
Definition at line 198 of file text_editor.cc.
References GetCharacterIndex(), GetLineMaxColumn(), TextEditor::Coordinates::mColumn, TextEditor::Coordinates::mLine, mLines, mReadOnly, mTextChanged, and RemoveLine().
Referenced by DeleteSelection(), TextEditor::UndoRecord::Redo(), and TextEditor::UndoRecord::Undo().

|
private |
Definition at line 236 of file text_editor.cc.
References Default, GetCharacterIndex(), InsertLine(), TextEditor::Coordinates::mColumn, TextEditor::Coordinates::mLine, mLines, mReadOnly, and mTextChanged.
Referenced by InsertText(), TextEditor::UndoRecord::Redo(), and TextEditor::UndoRecord::Undo().

|
private |
Definition at line 277 of file text_editor.cc.
References mReadOnly, mUndoBuffer, and mUndoIndex.
Referenced by Backspace(), Cut(), Delete(), EnterCharacter(), and Paste().
|
private |
Definition at line 295 of file text_editor.cc.
References mCharAdvance, mLines, mTabSize, mTextStart, and SanitizeCoordinates().
Referenced by HandleMouseInputs(), and Render().

|
private |
Definition at line 350 of file text_editor.cc.
References GetCharacterColumn(), GetCharacterIndex(), TextEditor::Coordinates::mLine, and mLines.
Referenced by GetWordAt(), MoveLeft(), SelectWordUnderCursor(), and SetSelection().

|
private |
Definition at line 382 of file text_editor.cc.
References GetCharacterColumn(), GetCharacterIndex(), TextEditor::Coordinates::mLine, and mLines.
Referenced by GetWordAt(), SelectWordUnderCursor(), and SetSelection().

|
private |
Definition at line 413 of file text_editor.cc.
References GetCharacterColumn(), GetCharacterIndex(), GetLineMaxColumn(), TextEditor::Coordinates::mLine, and mLines.
Referenced by MoveRight().

|
private |
Definition at line 457 of file text_editor.cc.
References TextEditor::Coordinates::mColumn, TextEditor::Coordinates::mLine, mLines, and mTabSize.
Referenced by Advance(), Backspace(), Delete(), DeleteRange(), EnterCharacter(), FindNextWord(), FindWordEnd(), FindWordStart(), GetText(), GetWordAt(), InsertTextAt(), IsOnWordBoundary(), MoveLeft(), MoveRight(), Render(), and TextDistanceToLineStart().
|
private |
Definition at line 473 of file text_editor.cc.
References mLines, and mTabSize.
Referenced by Advance(), EnterCharacter(), FindNextWord(), FindWordEnd(), FindWordStart(), MoveLeft(), and MoveRight().
|
private |
Definition at line 490 of file text_editor.cc.
References mLines.
|
private |
Definition at line 500 of file text_editor.cc.
References mLines, and mTabSize.
Referenced by Backspace(), Delete(), DeleteRange(), EnterCharacter(), FindNextWord(), GetCurrentLineText(), MoveEnd(), Render(), SanitizeCoordinates(), and SetSelection().
|
private |
Definition at line 516 of file text_editor.cc.
References GetCharacterIndex(), mColorizerEnabled, TextEditor::Coordinates::mColumn, TextEditor::Coordinates::mLine, and mLines.
Referenced by SetSelection().

|
private |
Definition at line 531 of file text_editor.cc.
References mBreakpoints, mErrorMarkers, mLines, mReadOnly, and mTextChanged.
Referenced by Backspace(), Delete(), and DeleteRange().
|
private |
Definition at line 560 of file text_editor.cc.
References mBreakpoints, mErrorMarkers, mLines, mReadOnly, and mTextChanged.
|
private |
Definition at line 588 of file text_editor.cc.
References mBreakpoints, mErrorMarkers, mLines, and mReadOnly.
Referenced by EnterCharacter(), and InsertTextAt().
|
private |
Definition at line 1176 of file text_editor.cc.
References AddUndo(), Background, Colorize(), Default, DeleteSelection(), EnsureCursorVisible(), GetActualCursorCoordinates(), GetCharacterColumn(), GetCharacterIndex(), GetLineMaxColumn(), GetSelectedText(), GetText(), HasSelection(), InsertLine(), TextEditor::UndoRecord::mAdded, TextEditor::UndoRecord::mAddedEnd, TextEditor::UndoRecord::mAddedStart, TextEditor::UndoRecord::mAfter, TextEditor::LanguageDefinition::mAutoIndentation, TextEditor::UndoRecord::mBefore, TextEditor::EditorState::mCursorPosition, mLanguageDefinition, TextEditor::Coordinates::mLine, mLines, mOverwrite, mReadOnly, TextEditor::UndoRecord::mRemoved, TextEditor::UndoRecord::mRemovedEnd, TextEditor::UndoRecord::mRemovedStart, TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, mState, mTabSize, mTextChanged, and SetCursorPosition().
Referenced by HandleKeyboardInputs().
|
private |
Definition at line 1708 of file text_editor.cc.
References AddUndo(), Advance(), Colorize(), DeleteSelection(), EnsureCursorVisible(), GetActualCursorCoordinates(), GetCharacterIndex(), GetLineMaxColumn(), GetSelectedText(), HasSelection(), TextEditor::UndoRecord::mAfter, TextEditor::UndoRecord::mBefore, TextEditor::Coordinates::mColumn, TextEditor::EditorState::mCursorPosition, mErrorMarkers, TextEditor::Coordinates::mLine, mLines, mReadOnly, TextEditor::UndoRecord::mRemoved, TextEditor::UndoRecord::mRemovedEnd, TextEditor::UndoRecord::mRemovedStart, TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, mState, mTextChanged, RemoveLine(), and SetCursorPosition().
Referenced by HandleKeyboardInputs().
|
private |
Definition at line 1423 of file text_editor.cc.
References Colorize(), DeleteRange(), TextEditor::Coordinates::mLine, TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, mState, SetCursorPosition(), and SetSelection().
Referenced by Backspace(), Cut(), Delete(), EnterCharacter(), and Paste().

|
private |
Definition at line 607 of file text_editor.cc.
References GetCursorPosition(), and GetWordAt().

|
private |
Definition at line 612 of file text_editor.cc.
References FindWordEnd(), FindWordStart(), GetCharacterIndex(), TextEditor::Coordinates::mLine, and mLines.
Referenced by GetWordUnderCursor(), and Render().

|
private |
Definition at line 627 of file text_editor.cc.
References Comment, Default, TextEditor::Glyph::mColorIndex, mColorizerEnabled, TextEditor::Glyph::mComment, TextEditor::Glyph::mMultiLineComment, mPalette, TextEditor::Glyph::mPreprocessor, MultiLineComment, and Preprocessor.
Referenced by Render().
|
private |
Definition at line 646 of file text_editor.cc.
References Backspace(), Copy(), Cut(), Delete(), EnterCharacter(), GetPageSize(), IsReadOnly(), MoveBottom(), MoveDown(), MoveEnd(), MoveHome(), MoveLeft(), MoveRight(), mOverwrite, MoveTop(), MoveUp(), Paste(), Redo(), SelectAll(), and Undo().
Referenced by Render().
|
private |
Definition at line 731 of file text_editor.cc.
References Line, TextEditor::EditorState::mCursorPosition, mInteractiveEnd, mInteractiveStart, mLastClick, mSelectionMode, mState, Normal, ScreenPosToCoordinates(), SetSelection(), and Word.
Referenced by Render().

|
private |
Definition at line 804 of file text_editor.cc.
References Breakpoint, CurrentLineEdge, CurrentLineFill, CurrentLineFillInactive, Cursor, Default, EnsureCursorVisible(), ErrorMarker, GetCharacterIndex(), GetGlyphColor(), GetLineMaxColumn(), GetWordAt(), HasSelection(), LineNumber, Max, mBreakpoints, mCharAdvance, TextEditor::EditorState::mCursorPosition, mErrorMarkers, TextEditor::LanguageDefinition::mIdentifiers, mLanguageDefinition, mLeftMargin, TextEditor::Coordinates::mLine, mLineBuffer, mLines, mLineSpacing, mOverwrite, mPalette, mPaletteBase, TextEditor::LanguageDefinition::mPreprocIdentifiers, mScrollToCursor, mScrollToTop, TextEditor::EditorState::mSelectionEnd, TextEditor::EditorState::mSelectionStart, mShowWhitespaces, mStartTime, mState, mTabSize, mTextStart, ScreenPosToCoordinates(), Selection, and TextDistanceToLineStart().
Referenced by Render().
|
private |
Definition at line 350 of file text_editor.h.
Referenced by Render().
|
private |
Definition at line 351 of file text_editor.h.
Referenced by Advance(), Backspace(), Colorize(), ColorizeInternal(), ColorizeRange(), Copy(), Delete(), DeleteRange(), EnterCharacter(), FindNextWord(), FindWordEnd(), FindWordStart(), GetCharacterColumn(), GetCharacterIndex(), GetLineCharacterCount(), GetLineMaxColumn(), GetText(), GetText(), GetTextLines(), GetTotalLines(), GetWordAt(), InsertLine(), InsertTextAt(), IsOnWordBoundary(), MoveDown(), MoveLeft(), MoveRight(), RemoveLine(), RemoveLine(), Render(), SanitizeCoordinates(), ScreenPosToCoordinates(), SelectAll(), SetSelection(), SetText(), SetTextLines(), TextDistanceToLineStart(), and TextEditor().
|
private |
Definition at line 352 of file text_editor.h.
Referenced by Backspace(), Cut(), Delete(), DeleteSelection(), EnterCharacter(), GetActualCursorCoordinates(), GetCurrentLineText(), GetSelectedText(), HandleMouseInputs(), HasSelection(), InsertText(), MoveDown(), MoveEnd(), MoveHome(), MoveLeft(), MoveRight(), MoveTop(), MoveUp(), Paste(), TextEditor::UndoRecord::Redo(), Render(), SetCursorPosition(), SetSelection(), SetSelectionEnd(), SetSelectionStart(), and TextEditor::UndoRecord::Undo().
|
private |
Definition at line 353 of file text_editor.h.
Referenced by AddUndo(), CanRedo(), Redo(), SetText(), SetTextLines(), and Undo().
|
private |
Definition at line 354 of file text_editor.h.
Referenced by AddUndo(), CanRedo(), CanUndo(), Redo(), SetText(), SetTextLines(), and Undo().
|
private |
Definition at line 356 of file text_editor.h.
Referenced by EnterCharacter(), GetCharacterColumn(), GetCharacterIndex(), GetLineMaxColumn(), GetTabSize(), Render(), ScreenPosToCoordinates(), SetTabSize(), and TextDistanceToLineStart().
|
private |
Definition at line 357 of file text_editor.h.
Referenced by EnterCharacter(), HandleKeyboardInputs(), IsOverwrite(), and Render().
|
private |
Definition at line 358 of file text_editor.h.
Referenced by AddUndo(), Backspace(), CanRedo(), CanUndo(), Delete(), DeleteRange(), EnterCharacter(), InsertLine(), InsertTextAt(), IsReadOnly(), RemoveLine(), RemoveLine(), and SetReadOnly().
|
private |
Definition at line 359 of file text_editor.h.
Referenced by EnsureCursorVisible(), and Render().
|
private |
Definition at line 360 of file text_editor.h.
Referenced by EnsureCursorVisible(), and Render().
|
private |
Definition at line 361 of file text_editor.h.
Referenced by Render(), SetText(), and SetTextLines().
|
private |
Definition at line 362 of file text_editor.h.
Referenced by Backspace(), Delete(), DeleteRange(), EnterCharacter(), InsertTextAt(), IsTextChanged(), RemoveLine(), RemoveLine(), Render(), SetText(), and SetTextLines().
|
private |
Definition at line 363 of file text_editor.h.
Referenced by ColorizeInternal(), GetGlyphColor(), IsColorizerEnabled(), IsOnWordBoundary(), and SetColorizerEnable().
|
private |
Definition at line 364 of file text_editor.h.
Referenced by EnsureCursorVisible(), Render(), and ScreenPosToCoordinates().
|
private |
Definition at line 366 of file text_editor.h.
Referenced by Render().
|
private |
Definition at line 367 of file text_editor.h.
Referenced by IsCursorPositionChanged(), Render(), SetCursorPosition(), and SetSelection().
|
private |
Definition at line 368 of file text_editor.h.
Referenced by Colorize(), and ColorizeInternal().
|
private |
Definition at line 368 of file text_editor.h.
Referenced by Colorize(), and ColorizeInternal().
|
private |
Definition at line 369 of file text_editor.h.
Referenced by HandleMouseInputs().
|
private |
Definition at line 370 of file text_editor.h.
Referenced by IsHandleKeyboardInputsEnabled(), IsHandleMouseInputsEnabled(), Render(), and SetHandleKeyboardInputs().
|
private |
Definition at line 371 of file text_editor.h.
Referenced by Render(), and SetHandleMouseInputs().
|
private |
Definition at line 372 of file text_editor.h.
Referenced by IsImGuiChildIgnored(), Render(), and SetImGuiChildIgnored().
|
private |
Definition at line 373 of file text_editor.h.
Referenced by IsShowingWhitespaces(), Render(), and SetShowWhitespaces().
|
private |
Definition at line 375 of file text_editor.h.
Referenced by GetPalette(), Render(), and SetPalette().
|
private |
Definition at line 376 of file text_editor.h.
Referenced by GetGlyphColor(), Render(), and Render().
|
private |
Definition at line 377 of file text_editor.h.
Referenced by ColorizeInternal(), ColorizeRange(), EnterCharacter(), GetLanguageDefinition(), Render(), and SetLanguageDefinition().
|
private |
Definition at line 378 of file text_editor.h.
Referenced by ColorizeRange(), and SetLanguageDefinition().
|
private |
Definition at line 380 of file text_editor.h.
Referenced by Colorize(), and ColorizeInternal().
|
private |
Definition at line 381 of file text_editor.h.
Referenced by InsertLine(), RemoveLine(), RemoveLine(), Render(), and SetBreakpoints().
|
private |
Definition at line 382 of file text_editor.h.
Referenced by Backspace(), InsertLine(), RemoveLine(), RemoveLine(), Render(), and SetErrorMarkers().
|
private |
Definition at line 383 of file text_editor.h.
Referenced by EnsureCursorVisible(), GetPageSize(), Render(), and ScreenPosToCoordinates().
|
private |
Definition at line 384 of file text_editor.h.
Referenced by HandleMouseInputs(), MoveDown(), MoveEnd(), MoveHome(), MoveLeft(), MoveRight(), MoveTop(), and MoveUp().
|
private |
Definition at line 384 of file text_editor.h.
Referenced by HandleMouseInputs(), MoveDown(), MoveEnd(), MoveHome(), MoveLeft(), MoveRight(), MoveTop(), and MoveUp().
|
private |
Definition at line 385 of file text_editor.h.
Referenced by Render().
|
private |
Definition at line 386 of file text_editor.h.
Referenced by Render().
|
private |
Definition at line 388 of file text_editor.h.
Referenced by HandleMouseInputs().