GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - CodeEditApp/WelcomeWindow: A welcome window for macOS applications.

BranchesTags
Open more actions menu

Latest commit

 

History

93 Commits
93 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Example
Example
 
 
Sources/WelcomeWindow
Sources/WelcomeWindow
 
 
Tests/WelcomeWindowTests
Tests/WelcomeWindowTests
 
 
.gitignore
.gitignore
 
 
.swiftlint.yml
.swiftlint.yml
 
 
LICENSE.md
LICENSE.md
 
 
Package.resolved
Package.resolved
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 

Repository files navigation

WelcomeWindow

A highly customizable welcome window built for macOS applications. This package supports NSDocument-based apps and offers the ability to override the recent list for other use cases. It's designed to provide a native and elegant welcome experience for your app at launch, with support for new/open document actions, drag-and-drop functionality, and dynamic layouts.

GitHub release Github Tests GitHub Repo stars GitHub forks Discord Badge

Demo Image

Documentation

This package is fully documented here.

Usage

To use welcome window, simply import the package

import WelcomeWindow

And add it as a window in your SwiftUI App.

@main
struct CodeEditApp: App {
    @Environment(\.dismiss) private var dismiss

    var body: some Scene {
        WelcomeWindow(
            // Add two action buttons below your icon
            actions: { dismiss in
                WelcomeButton(
                    iconName: "circle.fill",
                    title: "New Text Document",
                    action: {
                        NSDocumentController.shared.createFileDocumentWithDialog(
                            configuration: .init(title: "Create new text document"),
                            onCompletion: { dismiss() }
                        )
                    }
                )
                WelcomeButton(
                    iconName: "triangle.fill",
                    title: "Open Text Document or Folder",
                    action: {
                        NSDocumentController.shared.openDocumentWithDialog(
                            configuration: .init(canChooseDirectories: true),
                            onDialogPresented: { dismiss() },
                            onCancel: { openWindow(id: "welcome") }
                        )
                    }
                )
            },
            // Receive files via drag and drop
            onDrop: { url, dismiss in
                print("File dropped at: \(url.path)")

                Task {
                    NSDocumentController.shared.openDocument(at: url, onCompletion: { dismiss() })
                }
            }
        )
    }
}
Examples from real apps!
CodeEdit CodeEdit Demo Image
CircuitPro CircuitPro Demo Image

License

Licensed under the MIT license

About

A welcome window for macOS applications.

codeeditapp.github.io/WelcomeWindow/documentation/welcomewindow/

Topics

appkitmacosswiftswiftui

Resources

Readme
MIT license
Activity
Custom properties

Stars

44 stars

Watchers

1 watching

Forks

6 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.