Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Word-wrap functionality for MultilineTextBox #984

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Commits on Sep 18, 2024

  1. added core word-wrap functionality to MultilineTextBox

    - added DisplayText property to TextInputBase
    - added virtual ProcessDisplayText method to TextInputBase
    - modified TextInputBase to draw new DisplayText instead of Text
    
    - added WrapText and WrapTextSegment overloads to DrawUtil with out parameter that contains the indices of the added new line characters
    - modified DrawUtil.WrapTextSegment to stop adding an additional space character to the end of the text segement
    
    - added DisplayNewLineIndices property to MultilineTextBox
    - added GetCursorIndexFromDisplayIndex and GetDisplayIndexFromCursorIndex methods to MultilineTextBox to switch between cursorIndex and displayIndex
    - modified MoveLine, GetCursorIndexFromPosition, CalculateHighlightRegions and CalculateCursorRegion in MultilineTextBox to be based of the DisplayText instead of Text
    - implemented new virtual ProcessDisplayText override in MultilineTextBox
    - added ApplyWordWrap method in MultilineTextBox
    - modified GetSplitIndex in MultilineTextBox to return the line and character based on the DisplayText instead of the Text
    - modified RecalculateLayout in MultilineTextBox to include recalculation of the DisplayText
    - added HandleDelete override in MultilineTextBox to include a recalculation of the layout after characters were deleted
    Flyga-M committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    af141f9 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2024

  1. finishing touches on word-wrap for MultilineTextBoxes

    - added wrap-functionality in the middle of a word
    - added DisableWordWrap property on MultilineTextBox
    - added WrapCharacters property on MultilineTextBox
    - added WrapWord method to DrawUtil
    - modified WrapTextSegment and WrapText methods in DrawUtil to wrap words that are too long to fit in a single line
    - added overloads to WrapTextSegment and WrapText methods in DrawUtil to allow for additional wrap characters where a word may wrap.
    Flyga-M committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    79d4b26 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1 from Flyga-M/feature/multiline-text-box-improve…

    …ments
    
    finishing touches on word-wrap for MultilineTextBoxes
    Flyga-M authored Oct 5, 2024
    Configuration menu
    Copy the full SHA
    9c6e673 View commit details
    Browse the repository at this point in the history
  3. added call to RecalculateLayout if DisableWordWrap or WrapCharacters …

    …changes in MultilineTextBox
    Flyga-M committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    69a14be View commit details
    Browse the repository at this point in the history
  4. Merge pull request #2 from Flyga-M/feature/multiline-text-box-improve…

    …ments
    
    added minor fixes to MultilineTextBox
    Flyga-M authored Oct 5, 2024
    Configuration menu
    Copy the full SHA
    600d118 View commit details
    Browse the repository at this point in the history