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 7
7
8
8
import AppKit
9
9
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
+
10
16
/// Type-erasing type for ``TextAttachment`` that also contains range information about the attachment.
11
17
///
12
18
/// This type cannot be initialized outside of `CodeEditTextView`, but will be received when interrogating
@@ -23,9 +29,3 @@ public struct AnyTextAttachment: Equatable {
23
29
lhs. range == rhs. range && lhs. attachment === rhs. attachment
24
30
}
25
31
}
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