Billy Messenger
80ed8b5384
don't need this import here
2024-02-22 20:54:58 +01:00
Billy Messenger
0dccb4501f
update egui and egui_baseview
2024-02-22 20:54:58 +01:00
Robbert van der Helm
a16cbd6aad
Adapt raw_window_handle 0.4 for nih_plug_egui
...
NIH-plug switched to version 0.5, so this adapter is needed for this
version of nih_plug_egui.
2023-12-30 14:44:40 +01:00
Robbert van der Helm
c0a72661e1
Fix new Clippy lints
2023-09-03 16:35:57 +02:00
dzil123
eb968ba446
Update to egui 0.22
2023-09-02 23:35:42 +02:00
Robbert van der Helm
5a8721f63c
Derive Debug for the editor state structs
2023-03-01 19:19:54 +01:00
Robbert van der Helm
99223ed1c8
Prevent HiDPI scale changes after opening editor
...
Ableton Live does this and it caused mysterious issues where the window
could suddenly be larger than the window's contents when resizing on a
HiDPI setup.
2023-02-27 01:02:52 +01:00
Robbert van der Helm
08c6729ed1
Also add an Editor::param_modulation_changed()
2023-01-11 15:22:26 +01:00
Robbert van der Helm
922d2de603
Add an individual Editor::param_value_changed
2023-01-11 15:22:26 +01:00
Robbert van der Helm
1448388353
Move nih_plug_egui Editor impl to own module
2022-11-15 16:28:53 +01:00
Robbert van der Helm
b2da26ecd7
Add prefix to plain_value() and normalized_value()
...
To make it clearer that these functions include monophonic modulation.
When creating GUI widgets, you should be using the unmodulated variants.
2022-11-11 03:15:05 +01:00
Robbert van der Helm
0d90969566
Remove unnecessary deref
2022-10-22 00:14:13 +02:00
Robbert van der Helm
375262aaa3
Also drop Sync requirement for editor handles
2022-10-20 14:41:53 +02:00
Robbert van der Helm
eed5a62abb
Add build closure parameter to create_egui_editor
2022-10-20 14:04:08 +02:00
Robbert van der Helm
bd295b7380
Move nih_plug::param to nih_plug::params
2022-10-20 12:26:12 +02:00
Robbert van der Helm
2a0ed0c5ec
Move PersistentField and helpers to dedicated mod
...
As mentioned in the previous commit's breaking changes entry.
2022-10-20 12:11:04 +02:00
Robbert van der Helm
347cbae430
Use egui's own redraw forcing function
2022-09-22 17:08:17 +02:00
Robbert van der Helm
51b8f64092
Update nih_plug_egui from egui 0.17 to egui 0.19
2022-09-22 15:35:51 +02:00
Robbert van der Helm
b6720383a3
Make Arc<EguiState> persistable
2022-07-13 23:16:54 +02:00
Robbert van der Helm
32ad1212f1
Silence clippy::type_complexity
...
Clippy now wants us to move any usage of the Fn* traits to a typedef.
Doing so will almost certainly not help readability.
2022-07-01 15:50:23 +02:00
Robbert van der Helm
ae31e416c2
Don't use baseview system scaling on Windows/Linux
...
Until the UI frameworks make it possible to get the size or scale for
the window, this would cause the window contents to be scaled
incorrectly if the host does not set a scale factor.
2022-04-27 18:33:08 +02:00
Robbert van der Helm
bb3175f68e
Return -> Returns at the start of a docstring
...
The imperative tense doesn't make any sense when the function is a mere
getter and doesn't actually perform a nontrivial task.
2022-04-26 19:39:51 +02:00
Robbert van der Helm
083885a40c
Rework Params trait API with Arc instead of Pin
...
This is a breaking change requiring a small change to plugin
implementations.
The reason why `Pin<&dyn Params>` was used was more as a hint to
indicate that the object must last for the plugin's lifetime, but `Pin`
doesn't enforce that. It also makes the APIs a lot more awkward.
Requiring the use of `Arc` fixes the following problems:
- When storing the params object in the wrapper, the `ParamPtr`s are
guaranteed to be stable.
- This makes it possible to access the `Params` object without acquiring
a lock on the plugin, this is very important for implementing
plugin-side preset management.
- It enforces immutability on the `Params` object.
- And of course the API is much nicer without a bunch of unsafe code to
work around Pin's limitations.
2022-04-07 15:31:46 +02:00
Robbert van der Helm
144e30239e
Use ParamFlags::HIDE_IN_GENERIC_UI in generic UIs
2022-03-23 13:16:56 +01:00
Robbert van der Helm
9e3149b931
Move ParamPtr to the prelude
2022-03-23 12:46:46 +01:00
Robbert van der Helm
021d175264
Use a default implementation for Param::normalized_value()
2022-03-21 13:28:59 +01:00
Robbert van der Helm
f084f14095
Refactor GUIs to use param's own default value
...
This removes the need to pass a lot of these `ParamSetter`s and
`GuiContext`s around. We also don't need explicit events to reset a
parameter anymore since you can get this information from the parameter
itself.
2022-03-21 13:11:36 +01:00
Robbert van der Helm
d5d54f0c06
Fix generic UIs after last commit
2022-03-20 13:37:01 +01:00
Robbert van der Helm
b9d79771cc
Use String instead of &'static str in Params
...
This may hurt performance in generic UIs a bit, but it will allow you to
programatically generate custom Params implementations for repeated
Parameters structs.
2022-03-20 02:14:18 +01:00
Robbert van der Helm
4e9ee27c19
Finish the drawing for the iced param slider
2022-03-14 13:17:19 +01:00
Robbert van der Helm
5711f77cc7
Remove old todo about adding an egui generic UI
2022-03-13 23:33:43 +01:00
Robbert van der Helm
1fa2b5f74f
Add an Editor callback to notify parameter changes
...
This will be needed to allow iced to be reactive in our model.
2022-03-13 18:03:23 +01:00
Robbert van der Helm
3ebe34c870
Add most bits and pieces for iced support
2022-03-12 23:15:33 +01:00
Robbert van der Helm
d7ea21f597
Fix clippy lints
2022-03-06 15:41:35 +01:00
Robbert van der Helm
02d513b043
Disable the Alt+Click for now
...
Since it doesn't really work anyways, need to dive into egui's internals
to figure out why it doesn't work.
2022-03-05 22:22:17 +01:00
Robbert van der Helm
ec41ba5394
Add an attempt at an Alt+Click to open text entry
...
This does not work correctly unless you move your mouse, for some reason.
2022-03-05 22:11:29 +01:00
Robbert van der Helm
458f22248a
Initialize the text entry with the value
2022-03-05 21:37:16 +01:00
Robbert van der Helm
6db2b528da
Add basic text entry using built in widget
2022-03-05 21:32:37 +01:00
Robbert van der Helm
0dd71cf644
Fix slider same value check with discrete params
...
Because the check was done against the normalized value, before
snapping. This required adding `PartialEq` to the `Plain` type.
2022-03-05 19:51:06 +01:00
Robbert van der Helm
9b9799eb35
Allow overriding slider width
2022-03-05 19:39:39 +01:00
Robbert van der Helm
cab6be5167
Add padding to the generic UI
2022-03-05 19:39:28 +01:00
Robbert van der Helm
2c56646cc9
Take up all remaining space in generic UI
2022-03-05 19:24:40 +01:00
Robbert van der Helm
05d97bb71e
Add a super simple egui generic UI widget
2022-03-05 19:16:20 +01:00
Robbert van der Helm
9267a8371c
Add DPI scaling support
...
That hopefully works.
2022-03-05 13:37:35 +01:00
Robbert van der Helm
4c0b07c578
💥 Move re-exports to a prelude module
...
So you can import everything at once, because you're likely going to
need at least 90% of it anyways.
2022-03-03 23:23:51 +01:00
Robbert van der Helm
f581294d7b
Update rustdoc formatting for links
...
Apparently it showed this text verbatim, and not in monospace.
2022-03-03 23:05:12 +01:00
Robbert van der Helm
be4bbd4400
Allow nested parameter structs
...
See the Parameters docstring for the caveats.
2022-03-03 20:38:28 +01:00
Robbert van der Helm
d688174b8b
Require Send+Sync on the editor handle
2022-03-03 15:40:16 +01:00
Robbert van der Helm
07d8f81f44
Update to egui 0.17
2022-02-27 16:49:18 +01:00
Robbert van der Helm
b40c43a862
Temporarily use egui's system scale factor
...
Until we support HiDPI ourselves. This fixes #1 .
2022-02-27 12:59:41 +01:00