Swiftpack.co - Package - SDGGiesbrecht/SDGInterface

macOS • Linux • iOS • watchOS • tvOS

Documentation

SDGInterface

SDGInterface provides tools for implementing a graphical user interface.

Καὶ ὁ Λόγος σὰρξ ἐγένετο καὶ ἐσκήνωσεν ἐν ἡμῖν, καὶ ἐθεασάμεθα τὴν δόξαν αὐτοῦ, δόξαν ὡς μονογενοῦς παρὰ πατρός, πλήρης χάριτος καὶ ἀληθείας.

And the Word became flesh and dwelt among us and we have watched His glory, the glory of the Only Begotten of the Father, full of grace and truth.

―‎יוחנן⁩/Yoẖanan

Features

  • API unification accross platforms.
  • Localized menu bar.

Example Usage

import SDGApplication

internal class SystemMediator : SDGApplication.SystemMediator {

    internal func finishLaunching(_ details: LaunchDetails) -> Bool {
        Application.setSamplesUp()
        return true
    }
}
Application.main(mediator: SystemMediator())

Importing

SDGInterface provides libraries for use with the Swift Package Manager.

Simply add SDGInterface as a dependency in Package.swift and specify which of the libraries to use:

let package = Package(
    name: "MyPackage",
    dependencies: [
        .package(url: "https://github.com/SDGGiesbrecht/SDGInterface", .upToNextMinor(from: Version(0, 3, 1))),
    ],
    targets: [
        .target(name: "MyTarget", dependencies: [
            .productItem(name: "SDGApplication", package: "SDGInterface"),
            .productItem(name: "SDGMenuBar", package: "SDGInterface"),
            .productItem(name: "SDGContextMenu", package: "SDGInterface"),
            .productItem(name: "SDGErrorMessages", package: "SDGInterface"),
            .productItem(name: "SDGMenus", package: "SDGInterface"),
            .productItem(name: "SDGPopOvers", package: "SDGInterface"),
            .productItem(name: "SDGWindows", package: "SDGInterface"),
            .productItem(name: "SDGTables", package: "SDGInterface"),
            .productItem(name: "SDGProgressIndicators", package: "SDGInterface"),
            .productItem(name: "SDGButtons", package: "SDGInterface"),
            .productItem(name: "SDGImageDisplay", package: "SDGInterface"),
            .productItem(name: "SDGTextDisplay", package: "SDGInterface"),
            .productItem(name: "SDGViews", package: "SDGInterface"),
            .productItem(name: "SDGKeyboard", package: "SDGInterface"),
            .productItem(name: "SDGInterfaceBasics", package: "SDGInterface"),
        ])
    ]
)

The libraries’ modules can then be imported in source files:

import SDGApplication
import SDGMenuBar
import SDGContextMenu
import SDGErrorMessages
import SDGMenus
import SDGPopOvers
import SDGWindows
import SDGTables
import SDGProgressIndicators
import SDGButtons
import SDGImageDisplay
import SDGTextDisplay
import SDGViews
import SDGKeyboard
import SDGInterfaceBasics

About

The SDGInterface project is maintained by Jeremy David Giesbrecht.

If SDGInterface saves you money, consider giving some of it as a donation.

If SDGInterface saves you time, consider devoting some of it to contributing back to the project.

Ἄξιος γὰρ ὁ ἐργάτης τοῦ μισθοῦ αὐτοῦ ἐστι.

For the worker is worthy of his wages.

―‎ישוע/Yeshuʼa

Github

link
Stars: 2
Help us keep the lights on

Dependencies

Used By

Total: 1

Releases

0.3.0 - Jul 18, 2019

Breaking Changes

  • More types have been moved out of SDGInterfaceElements into specialized modules.
  • More alias pairs have been replaced with encapsulating types.

0.2.1 - Jul 15, 2019

New Features

  • TextFields have a bindable text value.
  • Windows have a closeAction that will be executed when the window closes.

Bug Fixes

  • Changing the sort order causes Table views to refresh.

0.2.0 - Jul 13, 2019

Breaking Changes

  • Many types have been moved out of SDGInterfaceElements into specialized modules.
  • Many alias pairs have been replaced with encapsulating types.
  • Sections of the API have been restricted to platforms where they are meaningful.

New Features

  • SDGInterface can be used on Linux, although large portions of the API are unavailable.

0.1.0 - Jun 27, 2019

Initial release.