#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 108 of file text_editor.h.
typedef std::unordered_map<std::string, Identifier> TextEditor::Identifiers |
Definition at line 109 of file text_editor.h.
typedef std::unordered_set<std::string> TextEditor::Keywords |
Definition at line 110 of file text_editor.h.
typedef std::map<int, std::string> TextEditor::ErrorMarkers |
Definition at line 111 of file text_editor.h.
typedef std::unordered_set<int> TextEditor::Breakpoints |
Definition at line 112 of file text_editor.h.
typedef std::array<ImU32, (unsigned)PaletteIndex::Max> TextEditor::Palette |
Definition at line 113 of file text_editor.h.
typedef uint8_t TextEditor::Char |
Definition at line 114 of file text_editor.h.
typedef std::vector<Glyph> TextEditor::Line |
Definition at line 131 of file text_editor.h.
typedef std::vector<Line> TextEditor::Lines |
Definition at line 132 of file text_editor.h.
|
private |
Definition at line 268 of file text_editor.h.
|
private |
Definition at line 307 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 24 of file text_editor.cc.
References GetDarkPalette(), TextEditor::LanguageDefinition::HLSL(), mCheckComments, mColorizerEnabled, mColorRangeMax, mColorRangeMin, mCursorPositionChanged, mHandleKeyboardInputs, mHandleMouseInputs, mIgnoreImGuiChild, mLastClick, mLeftMargin, mLines, mLineSpacing, mOverwrite, mReadOnly, mScrollToCursor, mScrollToTop, mSelectionMode, mShowWhitespaces, mStartTime, mTabSize, mTextChanged, mTextStart, mUndoIndex, mWithinRender, Normal, SetLanguageDefinition(), and SetPalette().
Referenced by TextEditor::UndoRecord::Redo(), and TextEditor::UndoRecord::Undo().
TextEditor::~TextEditor | ( | ) |
Definition at line 55 of file text_editor.cc.
void TextEditor::SetLanguageDefinition | ( | const LanguageDefinition & | aLanguageDef | ) |
Definition at line 57 of file text_editor.cc.
References Colorize(), mLanguageDefinition, and mRegexList.
Referenced by TextEditor().
|
inline |
Definition at line 175 of file text_editor.h.
References mLanguageDefinition.
|
inline |
Definition at line 179 of file text_editor.h.
References mPaletteBase.
void TextEditor::SetPalette | ( | const Palette & | aValue | ) |
|
inline |
Definition at line 182 of file text_editor.h.
References mErrorMarkers.
|
inline |
Definition at line 185 of file text_editor.h.
References mBreakpoints.
void TextEditor::Render | ( | const char * | aTitle, |
const ImVec2 & | aSize = ImVec2(), | ||
bool | aBorder = false ) |
Definition at line 1052 of file text_editor.cc.
References Background, ColorizeInternal(), HandleKeyboardInputs(), HandleMouseInputs(), mCursorPositionChanged, mHandleKeyboardInputs, mHandleMouseInputs, mIgnoreImGuiChild, mPalette, mTextChanged, mWithinRender, and Render().
void TextEditor::SetText | ( | const std::string & | aText | ) |
Definition at line 1087 of file text_editor.cc.
References Colorize(), Default, mLines, mScrollToTop, mTextChanged, mUndoBuffer, and mUndoIndex.
std::string TextEditor::GetText | ( | ) | const |
Definition at line 1890 of file text_editor.cc.
References GetText(), and mLines.
Referenced by Delete(), EnterCharacter(), GetCurrentLineText(), GetSelectedText(), and GetText().
void TextEditor::SetTextLines | ( | const std::vector< std::string > & | aLines | ) |
Definition at line 1109 of file text_editor.cc.
References Colorize(), Default, mLines, mScrollToTop, mTextChanged, mUndoBuffer, and mUndoIndex.
std::vector< std::string > TextEditor::GetTextLines | ( | ) | const |
Definition at line 1894 of file text_editor.cc.
References mLines.
std::string TextEditor::GetSelectedText | ( | ) | const |
Definition at line 1912 of file text_editor.cc.
References GetText(), and mState.
Referenced by Backspace(), Copy(), Cut(), Delete(), EnterCharacter(), and Paste().
std::string TextEditor::GetCurrentLineText | ( | ) | const |
Definition at line 1916 of file text_editor.cc.
References GetLineMaxColumn(), GetText(), and mState.
|
inline |
Definition at line 198 of file text_editor.h.
References mLines.
|
inline |
Definition at line 199 of file text_editor.h.
References mOverwrite.
void TextEditor::SetReadOnly | ( | bool | aValue | ) |
Definition at line 1293 of file text_editor.cc.
References mReadOnly.
|
inline |
Definition at line 202 of file text_editor.h.
References mReadOnly.
Referenced by Cut(), HandleKeyboardInputs(), and Paste().
|
inline |
Definition at line 203 of file text_editor.h.
References mTextChanged.
|
inline |
Definition at line 204 of file text_editor.h.
References mCursorPositionChanged.
|
inline |
Definition at line 206 of file text_editor.h.
References mColorizerEnabled.
void TextEditor::SetColorizerEnable | ( | bool | aValue | ) |
Definition at line 1295 of file text_editor.cc.
References mColorizerEnabled.
|
inline |
Definition at line 209 of file text_editor.h.
References GetActualCursorCoordinates().
Referenced by GetWordUnderCursor(), and SelectWordUnderCursor().
void TextEditor::SetCursorPosition | ( | const Coordinates & | aPosition | ) |
Definition at line 1297 of file text_editor.cc.
References EnsureCursorVisible(), mCursorPositionChanged, and mState.
Referenced by Backspace(), Delete(), DeleteSelection(), EnterCharacter(), InsertText(), MoveEnd(), MoveHome(), and MoveTop().
|
inline |
Definition at line 212 of file text_editor.h.
References mHandleMouseInputs.
|
inline |
Definition at line 213 of file text_editor.h.
References mHandleKeyboardInputs.
|
inline |
Definition at line 217 of file text_editor.h.
References mHandleKeyboardInputs.
|
inline |
Definition at line 220 of file text_editor.h.
References mHandleKeyboardInputs.
|
inline |
Definition at line 224 of file text_editor.h.
References mIgnoreImGuiChild.
|
inline |
Definition at line 225 of file text_editor.h.
References mIgnoreImGuiChild.
|
inline |
Definition at line 227 of file text_editor.h.
References mShowWhitespaces.
|
inline |
Definition at line 228 of file text_editor.h.
References mShowWhitespaces.
void TextEditor::SetTabSize | ( | int | aValue | ) |
Definition at line 1353 of file text_editor.cc.
References mTabSize.
|
inline |
Definition at line 231 of file text_editor.h.
References mTabSize.
void TextEditor::InsertText | ( | const std::string & | aValue | ) |
Definition at line 1357 of file text_editor.cc.
References InsertText().
Referenced by InsertText(), and Paste().
void TextEditor::InsertText | ( | const char * | aValue | ) |
Definition at line 1361 of file text_editor.cc.
References Colorize(), GetActualCursorCoordinates(), InsertTextAt(), mState, SetCursorPosition(), and SetSelection().
void TextEditor::MoveUp | ( | int | aAmount = 1, |
bool | aSelect = false ) |
Definition at line 1387 of file text_editor.cc.
References EnsureCursorVisible(), mInteractiveEnd, mInteractiveStart, mState, and SetSelection().
Referenced by HandleKeyboardInputs().
void TextEditor::MoveDown | ( | int | aAmount = 1, |
bool | aSelect = false ) |
Definition at line 1409 of file text_editor.cc.
References EnsureCursorVisible(), mInteractiveEnd, mInteractiveStart, mLines, mState, and SetSelection().
Referenced by HandleKeyboardInputs().
void TextEditor::MoveLeft | ( | int | aAmount = 1, |
bool | aSelect = false, | ||
bool | aWordMode = false ) |
Definition at line 1436 of file text_editor.cc.
References EnsureCursorVisible(), FindWordStart(), GetActualCursorCoordinates(), GetCharacterColumn(), GetCharacterIndex(), mInteractiveEnd, mInteractiveStart, mLines, mState, Normal, SetSelection(), and Word.
Referenced by HandleKeyboardInputs().
void TextEditor::MoveRight | ( | int | aAmount = 1, |
bool | aSelect = false, | ||
bool | aWordMode = false ) |
Definition at line 1492 of file text_editor.cc.
References EnsureCursorVisible(), FindNextWord(), GetCharacterColumn(), GetCharacterIndex(), mInteractiveEnd, mInteractiveStart, mLines, mState, Normal, SanitizeCoordinates(), SetSelection(), and Word.
Referenced by HandleKeyboardInputs().
void TextEditor::MoveTop | ( | bool | aSelect = false | ) |
Definition at line 1537 of file text_editor.cc.
References mInteractiveEnd, mInteractiveStart, mState, SetCursorPosition(), and SetSelection().
Referenced by HandleKeyboardInputs().
void TextEditor::MoveBottom | ( | bool | aSelect = false | ) |
References Normal.
Referenced by HandleKeyboardInputs().
void TextEditor::MoveHome | ( | bool | aSelect = false | ) |
Definition at line 1563 of file text_editor.cc.
References mInteractiveEnd, mInteractiveStart, mState, SetCursorPosition(), and SetSelection().
Referenced by HandleKeyboardInputs().
void TextEditor::MoveEnd | ( | bool | aSelect = false | ) |
Definition at line 1583 of file text_editor.cc.
References GetLineMaxColumn(), mInteractiveEnd, mInteractiveStart, mState, SetCursorPosition(), and SetSelection().
Referenced by HandleKeyboardInputs().
void TextEditor::SetSelectionStart | ( | const Coordinates & | aPosition | ) |
Definition at line 1305 of file text_editor.cc.
References mState, and SanitizeCoordinates().
void TextEditor::SetSelectionEnd | ( | const Coordinates & | aPosition | ) |
Definition at line 1311 of file text_editor.cc.
References mState, and SanitizeCoordinates().
void TextEditor::SetSelection | ( | const Coordinates & | aStart, |
const Coordinates & | aEnd, | ||
SelectionMode | aMode = SelectionMode::Normal ) |
Definition at line 1317 of file text_editor.cc.
References FindWordEnd(), FindWordStart(), GetLineMaxColumn(), IsOnWordBoundary(), Line, mCursorPositionChanged, mLines, 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 1723 of file text_editor.cc.
References FindWordEnd(), FindWordStart(), GetCursorPosition(), and SetSelection().
void TextEditor::SelectAll | ( | ) |
Definition at line 1728 of file text_editor.cc.
References mLines, and SetSelection().
Referenced by HandleKeyboardInputs().
bool TextEditor::HasSelection | ( | ) | const |
Definition at line 1732 of file text_editor.cc.
References mState.
Referenced by Backspace(), Copy(), Cut(), Delete(), EnterCharacter(), Paste(), and Render().
void TextEditor::Copy | ( | ) |
Definition at line 1736 of file text_editor.cc.
References GetActualCursorCoordinates(), GetSelectedText(), HasSelection(), TextEditor::Coordinates::mLine, and mLines.
Referenced by Cut(), and HandleKeyboardInputs().
void TextEditor::Cut | ( | ) |
Definition at line 1749 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, and mState.
Referenced by HandleKeyboardInputs().
void TextEditor::Paste | ( | ) |
Definition at line 1769 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, and mState.
Referenced by HandleKeyboardInputs().
void TextEditor::Delete | ( | ) |
Definition at line 1604 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, mState, mTextChanged, RemoveLine(), and SetCursorPosition().
Referenced by HandleKeyboardInputs().
bool TextEditor::CanUndo | ( | ) | const |
Definition at line 1795 of file text_editor.cc.
References mReadOnly, and mUndoIndex.
Referenced by Undo().
bool TextEditor::CanRedo | ( | ) | const |
Definition at line 1797 of file text_editor.cc.
References mReadOnly, mUndoBuffer, and mUndoIndex.
Referenced by Redo().
void TextEditor::Undo | ( | int | aSteps = 1 | ) |
Definition at line 1801 of file text_editor.cc.
References CanUndo(), mUndoBuffer, and mUndoIndex.
Referenced by HandleKeyboardInputs().
void TextEditor::Redo | ( | int | aSteps = 1 | ) |
Definition at line 1805 of file text_editor.cc.
References CanRedo(), mUndoBuffer, and mUndoIndex.
Referenced by HandleKeyboardInputs().
|
static |
Definition at line 1809 of file text_editor.cc.
Referenced by yaze::editor::AssemblyEditor::AssemblyEditor(), and TextEditor().
|
static |
Definition at line 1836 of file text_editor.cc.
|
static |
Definition at line 1863 of file text_editor.cc.
|
private |
Definition at line 1922 of file text_editor.cc.
|
private |
Definition at line 1924 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 1934 of file text_editor.cc.
References Default, Identifier, Keyword, KnownIdentifier, mLanguageDefinition, mLines, mRegexList, and PreprocIdentifier.
Referenced by ColorizeInternal().
|
private |
Definition at line 2026 of file text_editor.cc.
References ColorizeRange(), equals(), mCheckComments, mColorizerEnabled, mColorRangeMax, mColorRangeMin, mLanguageDefinition, and mLines.
Referenced by Render().
|
private |
Definition at line 2157 of file text_editor.cc.
References GetCharacterIndex(), TextEditor::Coordinates::mLine, mLines, and mTabSize.
Referenced by EnsureCursorVisible(), and Render().
|
private |
Definition at line 2189 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 2221 of file text_editor.cc.
References mCharAdvance.
Referenced by HandleKeyboardInputs().
|
private |
Definition at line 70 of file text_editor.cc.
References GetCharacterIndex(), TextEditor::Coordinates::mLine, and mLines.
|
private |
Definition at line 101 of file text_editor.cc.
References mState, and SanitizeCoordinates().
Referenced by Backspace(), Copy(), Delete(), EnsureCursorVisible(), EnterCharacter(), GetCursorPosition(), InsertText(), MoveLeft(), and Paste().
|
private |
Definition at line 105 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 172 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 188 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 224 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 265 of file text_editor.cc.
References mReadOnly, mUndoBuffer, and mUndoIndex.
Referenced by Backspace(), Cut(), Delete(), EnterCharacter(), and Paste().
|
private |
Definition at line 283 of file text_editor.cc.
References mCharAdvance, mLines, mTabSize, mTextStart, and SanitizeCoordinates().
Referenced by HandleMouseInputs(), and Render().
|
private |
Definition at line 335 of file text_editor.cc.
References GetCharacterColumn(), GetCharacterIndex(), TextEditor::Coordinates::mLine, and mLines.
Referenced by GetWordAt(), MoveLeft(), SelectWordUnderCursor(), and SetSelection().
|
private |
Definition at line 363 of file text_editor.cc.
References GetCharacterColumn(), GetCharacterIndex(), TextEditor::Coordinates::mLine, and mLines.
Referenced by GetWordAt(), SelectWordUnderCursor(), and SetSelection().
|
private |
Definition at line 391 of file text_editor.cc.
References GetCharacterColumn(), GetCharacterIndex(), GetLineMaxColumn(), TextEditor::Coordinates::mLine, and mLines.
Referenced by MoveRight().
|
private |
Definition at line 433 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 448 of file text_editor.cc.
References mLines, and mTabSize.
Referenced by Advance(), EnterCharacter(), FindNextWord(), FindWordEnd(), FindWordStart(), MoveLeft(), and MoveRight().
|
private |
Definition at line 464 of file text_editor.cc.
References mLines.
|
private |
Definition at line 472 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 487 of file text_editor.cc.
References GetCharacterIndex(), mColorizerEnabled, TextEditor::Coordinates::mColumn, TextEditor::Coordinates::mLine, and mLines.
Referenced by SetSelection().
|
private |
Definition at line 500 of file text_editor.cc.
References mBreakpoints, mErrorMarkers, mLines, mReadOnly, and mTextChanged.
Referenced by Backspace(), Delete(), and DeleteRange().
|
private |
Definition at line 527 of file text_editor.cc.
References mBreakpoints, mErrorMarkers, mLines, mReadOnly, and mTextChanged.
|
private |
Definition at line 553 of file text_editor.cc.
References mBreakpoints, mErrorMarkers, mLines, and mReadOnly.
Referenced by EnterCharacter(), and InsertTextAt().
|
private |
Definition at line 1135 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::UndoRecord::mBefore, mLanguageDefinition, mLines, mOverwrite, mReadOnly, TextEditor::UndoRecord::mRemoved, TextEditor::UndoRecord::mRemovedEnd, TextEditor::UndoRecord::mRemovedStart, mState, mTabSize, mTextChanged, and SetCursorPosition().
Referenced by HandleKeyboardInputs().
|
private |
Definition at line 1653 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, mErrorMarkers, mLines, mReadOnly, TextEditor::UndoRecord::mRemoved, TextEditor::UndoRecord::mRemovedEnd, TextEditor::UndoRecord::mRemovedStart, mState, mTextChanged, RemoveLine(), and SetCursorPosition().
Referenced by HandleKeyboardInputs().
|
private |
Definition at line 1375 of file text_editor.cc.
References Colorize(), DeleteRange(), mState, SetCursorPosition(), and SetSelection().
Referenced by Backspace(), Cut(), Delete(), EnterCharacter(), and Paste().
|
private |
Definition at line 571 of file text_editor.cc.
References GetCursorPosition(), and GetWordAt().
|
private |
Definition at line 576 of file text_editor.cc.
References FindWordEnd(), FindWordStart(), GetCharacterIndex(), TextEditor::Coordinates::mLine, and mLines.
Referenced by GetWordUnderCursor(), and Render().
|
private |
Definition at line 591 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 608 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 692 of file text_editor.cc.
References Line, mInteractiveEnd, mInteractiveStart, mLastClick, mSelectionMode, mState, Normal, ScreenPosToCoordinates(), SetSelection(), and Word.
Referenced by Render().
|
private |
Definition at line 765 of file text_editor.cc.
References Breakpoint, CurrentLineEdge, CurrentLineFill, CurrentLineFillInactive, Cursor, Default, EnsureCursorVisible(), ErrorMarker, GetCharacterIndex(), GetGlyphColor(), GetLineMaxColumn(), GetWordAt(), HasSelection(), LineNumber, Max, mBreakpoints, mCharAdvance, mErrorMarkers, mLanguageDefinition, mLeftMargin, mLineBuffer, mLines, mLineSpacing, mOverwrite, mPalette, mPaletteBase, mScrollToCursor, mScrollToTop, mShowWhitespaces, mStartTime, mState, mTabSize, mTextStart, ScreenPosToCoordinates(), Selection, and TextDistanceToLineStart().
Referenced by Render().
|
private |
Definition at line 346 of file text_editor.h.
Referenced by Render(), and TextEditor().
|
private |
Definition at line 347 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 348 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 349 of file text_editor.h.
Referenced by AddUndo(), CanRedo(), Redo(), SetText(), SetTextLines(), and Undo().
|
private |
Definition at line 350 of file text_editor.h.
Referenced by AddUndo(), CanRedo(), CanUndo(), Redo(), SetText(), SetTextLines(), TextEditor(), and Undo().
|
private |
Definition at line 352 of file text_editor.h.
Referenced by EnterCharacter(), GetCharacterColumn(), GetCharacterIndex(), GetLineMaxColumn(), GetTabSize(), Render(), ScreenPosToCoordinates(), SetTabSize(), TextDistanceToLineStart(), and TextEditor().
|
private |
Definition at line 353 of file text_editor.h.
Referenced by EnterCharacter(), HandleKeyboardInputs(), IsOverwrite(), Render(), and TextEditor().
|
private |
Definition at line 354 of file text_editor.h.
Referenced by AddUndo(), Backspace(), CanRedo(), CanUndo(), Delete(), DeleteRange(), EnterCharacter(), InsertLine(), InsertTextAt(), IsReadOnly(), RemoveLine(), RemoveLine(), SetReadOnly(), and TextEditor().
|
private |
Definition at line 355 of file text_editor.h.
Referenced by EnsureCursorVisible(), Render(), and TextEditor().
|
private |
Definition at line 356 of file text_editor.h.
Referenced by EnsureCursorVisible(), Render(), and TextEditor().
|
private |
Definition at line 357 of file text_editor.h.
Referenced by Render(), SetText(), SetTextLines(), and TextEditor().
|
private |
Definition at line 358 of file text_editor.h.
Referenced by Backspace(), Delete(), DeleteRange(), EnterCharacter(), InsertTextAt(), IsTextChanged(), RemoveLine(), RemoveLine(), Render(), SetText(), SetTextLines(), and TextEditor().
|
private |
Definition at line 359 of file text_editor.h.
Referenced by ColorizeInternal(), GetGlyphColor(), IsColorizerEnabled(), IsOnWordBoundary(), SetColorizerEnable(), and TextEditor().
|
private |
Definition at line 360 of file text_editor.h.
Referenced by EnsureCursorVisible(), Render(), ScreenPosToCoordinates(), and TextEditor().
|
private |
Definition at line 362 of file text_editor.h.
Referenced by Render(), and TextEditor().
|
private |
Definition at line 363 of file text_editor.h.
Referenced by IsCursorPositionChanged(), Render(), SetCursorPosition(), SetSelection(), and TextEditor().
|
private |
Definition at line 364 of file text_editor.h.
Referenced by Colorize(), ColorizeInternal(), and TextEditor().
|
private |
Definition at line 364 of file text_editor.h.
Referenced by Colorize(), ColorizeInternal(), and TextEditor().
|
private |
Definition at line 365 of file text_editor.h.
Referenced by HandleMouseInputs(), and TextEditor().
|
private |
Definition at line 366 of file text_editor.h.
Referenced by IsHandleKeyboardInputsEnabled(), IsHandleMouseInputsEnabled(), Render(), SetHandleKeyboardInputs(), and TextEditor().
|
private |
Definition at line 367 of file text_editor.h.
Referenced by Render(), SetHandleMouseInputs(), and TextEditor().
|
private |
Definition at line 368 of file text_editor.h.
Referenced by IsImGuiChildIgnored(), Render(), SetImGuiChildIgnored(), and TextEditor().
|
private |
Definition at line 369 of file text_editor.h.
Referenced by IsShowingWhitespaces(), Render(), SetShowWhitespaces(), and TextEditor().
|
private |
Definition at line 371 of file text_editor.h.
Referenced by GetPalette(), Render(), and SetPalette().
|
private |
Definition at line 372 of file text_editor.h.
Referenced by GetGlyphColor(), Render(), and Render().
|
private |
Definition at line 373 of file text_editor.h.
Referenced by ColorizeInternal(), ColorizeRange(), EnterCharacter(), GetLanguageDefinition(), Render(), and SetLanguageDefinition().
|
private |
Definition at line 374 of file text_editor.h.
Referenced by ColorizeRange(), and SetLanguageDefinition().
|
private |
Definition at line 376 of file text_editor.h.
Referenced by Colorize(), ColorizeInternal(), and TextEditor().
|
private |
Definition at line 377 of file text_editor.h.
Referenced by InsertLine(), RemoveLine(), RemoveLine(), Render(), and SetBreakpoints().
|
private |
Definition at line 378 of file text_editor.h.
Referenced by Backspace(), InsertLine(), RemoveLine(), RemoveLine(), Render(), and SetErrorMarkers().
|
private |
Definition at line 379 of file text_editor.h.
Referenced by EnsureCursorVisible(), GetPageSize(), Render(), and ScreenPosToCoordinates().
|
private |
Definition at line 380 of file text_editor.h.
Referenced by HandleMouseInputs(), MoveDown(), MoveEnd(), MoveHome(), MoveLeft(), MoveRight(), MoveTop(), and MoveUp().
|
private |
Definition at line 380 of file text_editor.h.
Referenced by HandleMouseInputs(), MoveDown(), MoveEnd(), MoveHome(), MoveLeft(), MoveRight(), MoveTop(), and MoveUp().
|
private |
Definition at line 381 of file text_editor.h.
Referenced by Render().
|
private |
Definition at line 382 of file text_editor.h.
Referenced by Render(), and TextEditor().
|
private |
Definition at line 384 of file text_editor.h.
Referenced by HandleMouseInputs(), and TextEditor().