Fix rustdoc links
This commit is contained in:
parent
7ac1df0d8d
commit
63d30d33e4
|
@ -65,21 +65,22 @@ pub trait ProcessContext {
|
||||||
// the actual callback within [MainThreadQueue::do_maybe_async].
|
// the actual callback within [MainThreadQueue::do_maybe_async].
|
||||||
pub trait GuiContext {
|
pub trait GuiContext {
|
||||||
/// Inform the host that you will start automating a parmater. This needs to be called before
|
/// Inform the host that you will start automating a parmater. This needs to be called before
|
||||||
/// calling [set_parameter] for the specified parameter.
|
/// calling [Self::set_parameter()] for the specified parameter.
|
||||||
fn begin_set_parameter<P: Param>(&self, param: &P);
|
fn begin_set_parameter<P: Param>(&self, param: &P);
|
||||||
|
|
||||||
/// Set a parameter to the specified parameter value. You will need to call
|
/// Set a parameter to the specified parameter value. You will need to call
|
||||||
/// [begin_set_parameter] before and [end_set_parameter] after calling this so the host can
|
/// [Self::begin_set_parameter()] before and [Self::end_set_parameter()] after calling this so
|
||||||
/// properly record automation for the parameter. This can be called multiple times in a row
|
/// the host can properly record automation for the parameter. This can be called multiple times
|
||||||
/// before calling [end_set_parameter], for instance when moving a slider around.
|
/// in a row before calling [Self::end_set_parameter()], for instance when moving a slider
|
||||||
|
/// around.
|
||||||
///
|
///
|
||||||
/// This function assumes you're already calling this from a GUI thread. Calling any of these
|
/// This function assumes you're already calling this from a GUI thread. Calling any of these
|
||||||
/// functions from any other thread may result in unexpected behavior.
|
/// functions from any other thread may result in unexpected behavior.
|
||||||
fn set_parameter<P: Param>(&self, param: &P, value: P::Plain);
|
fn set_parameter<P: Param>(&self, param: &P, value: P::Plain);
|
||||||
|
|
||||||
/// Inform the host that you are done automating a parameter. This needs to be called after one
|
/// Inform the host that you are done automating a parameter. This needs to be called after one
|
||||||
/// or more [set_parameter] calls for a parameter so the host knows the automation gesture has
|
/// or more [Self::set_parameter()] calls for a parameter so the host knows the automation
|
||||||
/// finished.
|
/// gesture has finished.
|
||||||
fn end_set_parameter<P: Param>(&self, param: &P);
|
fn end_set_parameter<P: Param>(&self, param: &P);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ pub use nih_plug_derive::Params;
|
||||||
|
|
||||||
// And also re-export anything you'd need to build a plugin
|
// And also re-export anything you'd need to build a plugin
|
||||||
pub use buffer::Buffer;
|
pub use buffer::Buffer;
|
||||||
pub use context::ProcessContext;
|
pub use context::{GuiContext, ProcessContext};
|
||||||
pub use param::internals::Params;
|
pub use param::internals::Params;
|
||||||
pub use param::range::Range;
|
pub use param::range::Range;
|
||||||
pub use param::smoothing::{Smoother, SmoothingStyle};
|
pub use param::smoothing::{Smoother, SmoothingStyle};
|
||||||
|
|
|
@ -72,7 +72,8 @@ pub trait Param {
|
||||||
/// Get the string representation for a normalized value. Used as part of the wrappers.
|
/// Get the string representation for a normalized value. Used as part of the wrappers.
|
||||||
fn string_to_normalized_value(&self, string: &str) -> Option<f32>;
|
fn string_to_normalized_value(&self, string: &str) -> Option<f32>;
|
||||||
|
|
||||||
/// Internal implementation detail for implementing [Params]. This should not be used directly.
|
/// Internal implementation detail for implementing [internals::Params]. This should not be used
|
||||||
|
/// directly.
|
||||||
fn as_ptr(&self) -> internals::ParamPtr;
|
fn as_ptr(&self) -> internals::ParamPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,11 +27,11 @@ pub use serde_json::from_str as deserialize_field;
|
||||||
pub use serde_json::to_string as serialize_field;
|
pub use serde_json::to_string as serialize_field;
|
||||||
|
|
||||||
/// Describes a struct containing parameters and other persistent fields. The idea is that we can
|
/// Describes a struct containing parameters and other persistent fields. The idea is that we can
|
||||||
/// have a normal struct containing [FloatParam] and other parameter types with attributes assigning
|
/// have a normal struct containing [super::FloatParam] and other parameter types with attributes
|
||||||
/// a unique identifier to each parameter. We can then build a mapping from those parameter IDs to
|
/// assigning a unique identifier to each parameter. We can then build a mapping from those
|
||||||
/// the parameters using the [Params::param_map] function. That way we can have easy to work with
|
/// parameter IDs to the parameters using the [Params::param_map] function. That way we can have
|
||||||
/// JUCE-style parameter objects in the plugin without needing to manually register each parameter,
|
/// easy to work with JUCE-style parameter objects in the plugin without needing to manually
|
||||||
/// like you would in JUCE.
|
/// register each parameter, like you would in JUCE.
|
||||||
///
|
///
|
||||||
/// The other persistent parameters should be [PersistentField]s containing types that can be
|
/// The other persistent parameters should be [PersistentField]s containing types that can be
|
||||||
/// serialized and deserialized with Serde.
|
/// serialized and deserialized with Serde.
|
||||||
|
|
|
@ -72,7 +72,7 @@ impl<T: Default> Smoother<T> {
|
||||||
Default::default()
|
Default::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether calling [next] will yield a new value or an old value. Useful if you need to
|
/// Whether calling [Self::next] will yield a new value or an old value. Useful if you need to
|
||||||
/// recompute something wheenver this parameter changes.
|
/// recompute something wheenver this parameter changes.
|
||||||
pub fn is_smoothing(&self) -> bool {
|
pub fn is_smoothing(&self) -> bool {
|
||||||
self.steps_left > 0
|
self.steps_left > 0
|
||||||
|
|
|
@ -41,8 +41,8 @@ use crate::param::internals::Params;
|
||||||
/// - GUIs
|
/// - GUIs
|
||||||
pub trait Plugin: Default + Send + Sync {
|
pub trait Plugin: Default + Send + Sync {
|
||||||
/// The type of the GUI editor instance belonging to this plugin. Use [NoEditor] when you don't
|
/// The type of the GUI editor instance belonging to this plugin. Use [NoEditor] when you don't
|
||||||
/// need an editor. Make sure to implement both the [create_editor] and [editor_size] functions
|
/// need an editor. Make sure to implement both the [Self::create_editor()] and
|
||||||
/// when you do add an editor.
|
/// [Self::editor_size()] functions when you do add an editor.
|
||||||
type Editor: Editor;
|
type Editor: Editor;
|
||||||
|
|
||||||
const NAME: &'static str;
|
const NAME: &'static str;
|
||||||
|
|
Loading…
Reference in a new issue