ChordProviderApp
@main
struct ChordProviderApp : App
SwiftUI Scene
for Chord Provider
This is the starting point of the application
Note
Each platform has its ownbody
-
The observable
FileBrowser
classDeclaration
Swift
@State private var fileBrowser: FileBrowser { get nonmutating set }
-
Chord Display Options
Declaration
Swift
@State private var chordDisplayOptions: ChordDisplayOptions { get nonmutating set }
-
The state of the app
Declaration
Swift
@State private var appState: AppState { get nonmutating set }
-
The
AppDelegate
class for Chord ProviderDeclaration
Swift
@NSApplicationDelegateAdaptor private var appDelegate: AppDelegate { get }
-
The
openWindow
environment to open a new WindowDeclaration
Swift
@Environment private var openWindow: OpenWindowAction { get }
-
The body of the
Scene
The macOS
body
consist of the following scenes:Window
: scene with a list of songsWindow
: scene to export a folder of songsDocumentGroup
scene to open a single songMenuBarExtra
scene that shows a list with songs as wellSettings
scene to open the settings Window
Declaration
Swift
var body: some Scene { get }
-
The window scenes we can open on macOS
Note
The ID of a scene we set on on aWindow
or to open aWindow
in the environment is aString
. This is is asking for troubles, so I use anenum
instead.Declaration
Swift
private enum AppSceneID : String
-
The body of the
Scene