Skip to content

Commit d0f16b8

Browse files
committed
Reorder
1 parent b43306c commit d0f16b8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/CodeEditTextView/TextLayoutManager/TextAttachments/TextAttachment.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
import 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-
}

0 commit comments

Comments
 (0)