-
Notifications
You must be signed in to change notification settings - Fork 17
Introduce Override Layout Behavior API #84
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
Merged
thecoolwinter
merged 24 commits into
CodeEditApp:main
from
thecoolwinter:feat/override-layout-behavior
Apr 19, 2025
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
616a48d
Add Overridable Layout To LayoutManager
thecoolwinter 244d59a
Move Layout To Own File
thecoolwinter c59aef7
File Rename
thecoolwinter a37a6ae
Update TextLayoutManagerRenderDelegate.swift
thecoolwinter 726b1ec
Move Away from 'drawing' Towards Subclassing `LineFragmentView`
thecoolwinter d803c7c
Invalidation Performance, Rename LineStorage `index` to `offset`, Edi…
thecoolwinter 949639b
Linter
thecoolwinter 6ca467e
Merge branch 'fix/invalidation' into feat/override-layout-behavior
thecoolwinter c1dce32
Merge branch 'main' into feat/override-layout-behavior
thecoolwinter 4974ac6
Public Some more Variables, Delegate Estimate Line Height
thecoolwinter 94065e7
Merge branch 'main' into feat/override-layout-behavior
thecoolwinter ee7024d
Very important Performance Improvements
thecoolwinter b1450b6
Remembered
thecoolwinter 120e6fc
Add One Case To Layout Invalidation, Selection Drawing Uses LayoutMan…
thecoolwinter ca32b4c
Document the layout routine
thecoolwinter 537cf74
Move Struct, Update Tests
thecoolwinter 9296067
Add Test
thecoolwinter e58a836
Remove Methods Destroying Layout Information
thecoolwinter 17b5d98
Update MarkedRanges.swift
thecoolwinter 047d827
Update TextLayoutManager+Layout.swift
thecoolwinter 8db24b1
Update TextLayoutManager+Layout.swift
thecoolwinter 8692f41
Use a Lock
thecoolwinter fad4ea4
Grammar
thecoolwinter ef1548b
More Conservative Locking
thecoolwinter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
15 changes: 15 additions & 0 deletions
15
Sources/CodeEditTextView/MarkedTextManager/MarkedRanges.swift
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// MarkedRanges.swift | ||
// CodeEditTextView | ||
// | ||
// Created by Khan Winter on 4/17/25. | ||
// | ||
|
||
import AppKit | ||
|
||
/// Struct for passing attribute and range information easily down into line fragments, typesetters without | ||
/// requiring a reference to the marked text manager. | ||
public struct MarkedRanges { | ||
let ranges: [NSRange] | ||
let attributes: [NSAttributedString.Key: Any] | ||
} |
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.