/// Remove the selected character and return what was removed :TODO: NOT FULLY IMPLEMENTED (retChar) private char BackspaceRemoveCharacter() { var str = mLineList[CursorY]; char retChar = '\n'; // This is just to signify that it's not text. if (str == null || str == "\r" || str == "") // If empty line remove the whole line { BackspaceLineEmptyText(); } else if (CursorX == 0) // Remove line and put remaining characters on line above it { BackspaceLineWithText(); } else if (CursorInMiddleOfBrace()) // Handle cursor in middle of (), [], et al { mLineList[CursorY] = mLineList[CursorY].Remove(CursorX - 1, 2); CursorX--; LinesToDraw.Add(CursorY); ParseLine(CursorY); } else // Remove a single character { LinesToDraw.Add(CursorY); mLineList[CursorY] = str.Remove(CursorX - 1, 1); CursorX--; ParseLine(CursorY); } return(retChar); }
private void MarkAllLinesDirty() { for (int i = 0; i < LineCount(); i++) { LinesToDraw.Add(i); ParseLine(i); } }
//Qml won't call constructor?? public void Init() { for (var i = 0; i < MinimumLines; i++) { mLineList.Add(""); mStringTokenList.Add(new List <string>()); LinesToDraw.Add(i); } RequestRender(); }