1
0
Fork 0

Mirror the flags and re-exports from iced_baseview

This commit is contained in:
Robbert van der Helm 2022-03-12 22:24:01 +01:00
parent ff9e0f2ddf
commit cd5a4f01bf
4 changed files with 2268 additions and 18 deletions

2216
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -7,10 +7,53 @@ license = "ISC"
description = "An adapter to use iced GUIs with NIH-plug"
[features]
default = ["wgpu"]
# Use wgpu rendering, which translates to Vulkan, Metal, or Direct3D12 depending
# on the platform.
wgpu = ["iced_baseview/wgpu"]
# Use OpenGL instead of wgpu for the rendering. This should increase platform
# compatibility at the cost of some iced features not being available.
opengl = ["iced_baseview/glow"]
# Enables a debug view in native platforms (press F12)
debug = ["iced_baseview/debug"]
# Enables the `Canvas` widget for the wgpu backend
canvas = ["iced_baseview/canvas"]
# Enables the `Canvas` widget for the OpenGL backend
opengl_canvas = ["iced_baseview/glow_canvas"]
# Enables the `Image` widget, only supported by the wgpu backend
image = ["iced_baseview/image"]
# Enables the `Svg` widget, only supported by the wgpu backend
svg = ["iced_baseview/svg"]
# Enables the `QRCode` widget for the wgpu backend
qr_code = ["iced_baseview/qr_code"]
# Enables the `QRCode` widget for the OpenGL backend
opengl_qr_code = ["iced_baseview/glow_qr_code"]
# Enables using system fonts for the wgpu backend
default_system_font = ["iced_baseview/default_system_font"]
# Enables using system fonts for the OpenGL backend
opengl_default_system_font = ["iced_baseview/glow_default_system_font"]
# Enables advanced color conversion via `palette`
palette = ["iced_baseview/palette"]
# Enables `tokio` as the `executor::Default` on native platforms
tokio = ["iced_baseview/tokio"]
# Enables `async-std` as the `executor::Default` on native platforms
async-std = ["iced_baseview/async-std"]
# Enables `smol` as the `executor::Default` on native platforms
smol = ["iced_baseview/smol"]
[dependencies]
nih_plug = { path = ".." }
baseview = { git = "https://github.com/robbert-vdh/baseview.git", branch = "feature/mouse-event-modifiers" }
# Upstream doesn't work with the current iced version, this branch also contains
# additional features
iced_egui = { git = "https://github.com/robbert-vdh/iced_baseview.git", branch = "feature/update-dependencies" }
iced_baseview = { git = "https://github.com/robbert-vdh/iced_baseview.git", branch = "feature/update-dependencies", default_features = false }

View file

@ -3,3 +3,14 @@
This provides an adapter to create [iced](https://github.com/iced-rs/iced) based
GUIs with NIH-plug through
[iced_baseview](https://github.com/BillyDM/iced_baseview).
By default this targets [wgpu](https://github.com/gfx-rs/wgpu). To use OpenGL
instead, include the crate with the following options. Note that some iced
features may not be available in the OpenGL backend.
```toml
nih_plug_iced = { git = "https://github.com/robbert-vdh/nih-plug.git", default_features = false, features = ["opengl"] }
```
Iced has many more optional features. Check the `Cargo.toml` file for more
information.

View file

@ -1,8 +1,6 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}
//! [iced](https://github.com/iced-rs/iced) editor support for NIH plug.
//!
//! TODO: Proper usage example, for now check out the gain_gui example
/// Re-export for convenience.
pub use iced_baseview::*;