File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Sources/CodeEditTextView/TextLayoutManager/TextAttachments Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 77
88import AppKit
99
10+ /// Represents an attachment type. Attachments take up some set width, and draw their contents in a receiver view.
11+ public protocol TextAttachment : AnyObject {
12+ var width : CGFloat { get }
13+ func draw( in context: CGContext , rect: NSRect )
14+ }
15+
1016/// Type-erasing type for ``TextAttachment`` that also contains range information about the attachment.
1117///
1218/// This type cannot be initialized outside of `CodeEditTextView`, but will be received when interrogating
@@ -23,9 +29,3 @@ public struct AnyTextAttachment: Equatable {
2329 lhs. range == rhs. range && lhs. attachment === rhs. attachment
2430 }
2531}
26-
27- /// Represents an attachment type. Attachments take up some set width, and draw their contents in a receiver view.
28- public protocol TextAttachment : AnyObject {
29- var width : CGFloat { get }
30- func draw( in context: CGContext , rect: NSRect )
31- }
You can’t perform that action at this time.
0 commit comments