Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erickjung/SwiftGUI
SwiftGUI is an API inspired by SwiftUI DSL, using Dear ImGui as renderer and running on macOS 10.13+ and iOS 11+
https://github.com/erickjung/SwiftGUI
declarative-ui gui imgui swift swiftui
Last synced: 3 months ago
JSON representation
SwiftGUI is an API inspired by SwiftUI DSL, using Dear ImGui as renderer and running on macOS 10.13+ and iOS 11+
- Host: GitHub
- URL: https://github.com/erickjung/SwiftGUI
- Owner: erickjung
- License: mit
- Created: 2019-11-03T12:24:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-02T20:34:51.000Z (over 4 years ago)
- Last Synced: 2024-07-08T17:36:04.135Z (4 months ago)
- Topics: declarative-ui, gui, imgui, swift, swiftui
- Language: Swift
- Homepage:
- Size: 18.7 MB
- Stars: 128
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
![SwiftGUI](Docs/swiftgui.png)
[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
[![swift version](https://img.shields.io/badge/swift-5.0+-brightgreen.svg)](https://swift.org/download)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)SwiftGUI is an experimental API inspired by SwiftUI DSL, using Dear ImGui as renderer and running on OSX and iOS.
```swift
Window("SwiftGUI") {Text("Hello world!")
HStack {
ForEach(1...2) { val in
Button("Click \(val)")
}ForEach(1...2) { val in
CheckBox("Check \(val)", selectedState: true)
}ForEach(1...2) { val in
RadioButton("Radio \(val)", activeState: true)
}
}
}
```## Highlights
* Easy to use abstraction for Dear ImGui
* Multi-platform support (iOS 11+ and macOS 10.13+)
* Huge list of UI components already available### Theme support
- Color scheme (embedded Darcula and Light)
- Custom Fonts (embedded FiraCode)### Components
- Buttons
- CheckBox
- Color Selection
- ComboBox
- Drag
- Dock
- Image
- TextField
- Lists
- Menu
- Plotting
- Popup
- RadioButton
- SelectableFields
- Sliders
- TabBar
- Texts
- Text Editor (Code editor)
- Tooltips
- Tree
- Window
- General
- Group
- HStack
- Separator/NewLine/Spacing/Indent
- ForEach
- Perform## Installation
### Carthage
To integrate `SwiftGui` into your Xcode project using Carthage, specify it in your `Cartfile`:
```ogdl
github "erickjung/SwiftGUI" "0.9.3"
```For `OSX` project, run:
```ogdl
carthage update --platform macOS
```For `iOS` project, run:
```ogdl
carthage update --platform iOS
```### Cocoapods
To integrate `SwiftGui` into your Xcode project using Cocoapods, specify it in your `Podfile`:
```ogdl
pod 'SwiftGui', '~> 0.9.3'
```run:
```ogdl
pod install
```## Using SwiftGUI
## Samples
macOS Sample 01
macOS Sample 02
iOS Sample 01
## Contributing
Read the [Contributing guidelines](CONTRIBUTING.md)
## License
[MIT](LICENSE)
## Using
* [Dear ImGui](https://github.com/ocornut/imgui) (1.77)
* [ImGuiColorTextEdit](https://github.com/BalazsJako/ImGuiColorTextEdit)