ChordProEditor
struct ChordProEditor : SWIFTViewRepresentable
SwiftUI NSViewRepresentable
for the ChordPro editor
-
The text of the ChordPro file
Declaration
Swift
@Binding var text: String { get nonmutating set }
-
Init the ChordProEditor
Declaration
Swift
init(text: Binding<String>, connector: Connector)
Parameters
text
The text of the
ChordProDocument
connector
The
Connector
class for the editor -
Make a
coordinator
for theSWIFTViewRepresentable
Declaration
Swift
func makeCoordinator() -> Coordinator
Return Value
A
coordinator
-
The observable
See moreConnector
class for the editorDeclaration
Swift
@MainActor final class Connector : Sendable
-
The coordinator for the
See moreChordProEditor
Declaration
Swift
class Coordinator : NSObject, SWIFTTextViewDelegate
-
The current state of selection in the editor
See moreDeclaration
Swift
enum SelectionState : String
-
Settings for the editor
See moreDeclaration
Swift
struct Settings : Equatable, Codable, Sendable
-
The lineheight multiplier for the editpr text
Declaration
Swift
static let lineHeightMultiple: Double
-
The style of a paragraph in the editor
Declaration
Swift
static let paragraphStyle: NSParagraphStyle
-
The style of a number in the ruler
Declaration
Swift
static var rulerNumberStyle: SWIFTStringAttribute { get }
-
The style of a symbol in the ruler
Declaration
Swift
static var rulerSymbolStyle: SWIFTStringAttribute { get }
-
The foreground of the highlighted line in the editor
Declaration
Swift
static let highlightedForegroundColor: SWIFTColor
-
The background of the highlighted line in the editor
Declaration
Swift
static let highlightedBackgroundColor: SWIFTColor
-
The text view for the editor
See moreDeclaration
Swift
public class TextView : SWIFTTextView
-
The line numbers view for the editor
See moreDeclaration
Swift
public class LineNumbersView : NSRulerView
-
Declaration
Swift
public class Wrapper : NSView, NSTextLayoutManagerDelegate, ChordProEditorDelegate