1
0
Fork 0

Fix links in docs

This commit is contained in:
Robbert van der Helm 2022-04-11 16:23:34 +02:00
parent 84d91d8826
commit c3b1ded35b
3 changed files with 10 additions and 10 deletions

View file

@ -58,8 +58,8 @@ where
})) }))
} }
/// State for a `nih_plug_vizia` editor. The scale factor can be manipulated at runtime by emitting /// State for a `nih_plug_vizia` editor. The scale factor can be manipulated at runtime by changing
/// [`WindowEvent::SetScale`][vizia::WindowEvent::SetScale] events. /// `cx.user_scale_factor`.
/// ///
/// # TODO /// # TODO
/// ///
@ -86,7 +86,7 @@ impl ViziaState {
/// The same as [`from_size()`][Self::from_size()], but with a separate initial scale factor. /// The same as [`from_size()`][Self::from_size()], but with a separate initial scale factor.
/// This scale factor gets applied on top of any HiDPI scaling, and it can be modified at /// This scale factor gets applied on top of any HiDPI scaling, and it can be modified at
/// runtime by emitting [`WindowEvent::SetScale`][vizia::WindowEvent::SetScale] events. /// runtime by changing `cx.user_scale_factor`.
pub fn from_size_with_scale(width: u32, height: u32, scale_factor: f64) -> Arc<ViziaState> { pub fn from_size_with_scale(width: u32, height: u32, scale_factor: f64) -> Arc<ViziaState> {
Arc::new(ViziaState { Arc::new(ViziaState {
size: AtomicCell::new((width, height)), size: AtomicCell::new((width, height)),
@ -114,7 +114,7 @@ impl ViziaState {
} }
/// Get the non-DPI related uniform scaling factor the GUI's size will be multiplied with. This /// Get the non-DPI related uniform scaling factor the GUI's size will be multiplied with. This
/// can be changed by emitting [`WindowEvent::SetScale`][vizia::WindowEvent::SetScale] events. /// can be changed by changing `cx.user_scale_factor`.
pub fn user_scale_factor(&self) -> f64 { pub fn user_scale_factor(&self) -> f64 {
self.scale_factor.load() self.scale_factor.load()
} }

View file

@ -45,10 +45,10 @@ pub trait ProcessContext {
// The implementing wrapper can assume that everything is being called from the main thread. Since // The implementing wrapper can assume that everything is being called from the main thread. Since
// NIH-plug doesn't own the GUI event loop, this invariant cannot be part of the interface. // NIH-plug doesn't own the GUI event loop, this invariant cannot be part of the interface.
pub trait GuiContext: Send + Sync + 'static { pub trait GuiContext: Send + Sync + 'static {
/// Ask the host to resize the editor window to the size specified by [crate::Editor::size()]. /// Ask the host to resize the editor window to the size specified by
/// This will return false if the host somehow didn't like this and rejected the resize, in /// [`Editor::size()`][crate::prelude::Editor::size()]. This will return false if the host
/// which case the window should revert to its old size. You should only actually resize your /// somehow didn't like this and rejected the resize, in which case the window should revert to
/// embedded window once this returns `true`. /// its old size. You should only actually resize your embedded window once this returns `true`.
/// ///
/// TODO: Host->Plugin resizing has not been implemented yet /// TODO: Host->Plugin resizing has not been implemented yet
fn request_resize(&self) -> bool; fn request_resize(&self) -> bool;

View file

@ -17,8 +17,8 @@ pub enum MidiConfig {
} }
/// Event for (incoming) notes. The set of supported note events depends on the value of /// Event for (incoming) notes. The set of supported note events depends on the value of
/// [`Plugin::MIDI_INPUT`]. Also check out the [`util`][crate::util] module for convenient /// [`Plugin::MIDI_INPUT`][crate::prelude::Plugin::MIDI_INPUT]. Also check out the
/// conversion functions. /// [`util`][crate::util] module for convenient conversion functions.
/// ///
/// All of the timings are sample offsets withing the current buffer. /// All of the timings are sample offsets withing the current buffer.
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq)]