EditorView
struct EditorView: View
SwiftUI View
for the ChordProEditor
-
The ChordPro document
Declaration
Swift
var document: ChordProDocument
-
The app state
Declaration
Swift
var appState
-
The scene state
Declaration
Swift
var sceneState
-
Show a directive sheet
Declaration
Swift
var showDirectiveSheet: Bool = false
-
The settings for the directive sheet
Declaration
Swift
var directiveSettings = DirectiveSettings()
-
The connector class for the editor
Declaration
Swift
var connector = ChordProEditor.Connector(settings: AppSettings.load(id: "Main").editor)
-
Show an
Alert
if we have an errorDeclaration
Swift
var errorAlert: AlertMessage?
-
The body of the
View
Declaration
Swift
var body: some View
-
The editor
Declaration
Swift
var editor: some View
-
SwiftUI
See moreView
to define a directiveDeclaration
Swift
struct DirectiveSheet: View
-
A button to add a directive with the selected text
Declaration
Swift
func directiveButton(directive: ChordPro.Directive) -> some View
-
Menus with ChordPro directives
Declaration
Swift
var directiveMenus: some View
-
A button for the text editor to add a directive with a sheet
Note
Shown when there is no selection for the directiveDeclaration
Swift
func directiveSheetButton(directive: ChordPro.Directive) -> some View
-
Apply a
directive
in theChordProEditor
Declaration
Swift
static func format( settings: DirectiveSettings, in editor: ChordProEditor.Connector )
Parameters
settings
The settings for the directive
editor
The connector class for the editor
-
Validate the definition of the chord
Declaration
Swift
func validateChordDefinition() -> Bool
Return Value
True or false to show the sheet. If true, the definition will be set or else an alert will be shown
-
/ Directive settings to pass to the sheet
See moreDeclaration
Swift
struct DirectiveSettings: Sendable