Add placeholder blinks setting by SymboLinker · Pull Request #177 · verybadcat/CSharpMath
and others added 2 commits
October 24, 2020 09:17Charles Roddie added 2 commits
October 24, 2020 17:25and avoid invoking RedrawRequested when state has not changed
…tionHighlighted" and "ShouldDrawCaret" General notes: Having a CaretState that says "MathKeyboardCaretState.Shown" while actually no caret is shown because a placeholder is shown is wrong. Having a CaretState "MathKeyboardCaretState.Hidden" and "MathKeyboardCaretState.TemporarilyHidden" is not needed: you can use StopBlinking() just after setting the CaretState you want to keep until the next key press. These two observations resulted in the boolean properties "InsertionPositionHighlighted" (that makes sense for both the caret AND the placeholder appearance) and "ShouldDrawCaret". Because Drawing the caret is done in CSharpMath.Rendering.FrontEnd, the unit tests of CSharpMath.Editor can only test "ShouldDraw" and unit tests that do that can cover the same as before (when it was tested via a MathKeyboardCaretState enum). Notes about moved unit tests: - CaretIsOverriddenByPlaceholder has been replaced by PlaceholderDoesNotBlinkAndNoCaretVisible. - CaretMovesWithPlaceholder has been replaced by NonBlinkingActivePlaceholderMoves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters