pub struct Item<'a, T: ProbablyMutable> { /* private fields */ }
Implementations
sourceimpl<'a, T: ProbablyMutable> Item<'a, T>
impl<'a, T: ProbablyMutable> Item<'a, T>
pub fn new(project: &'a Project, ptr: MediaItem) -> Self
pub fn track(&self) -> Track<'_, Immutable>
pub fn get_take(&'a self, index: usize) -> Option<Take<'a, Immutable>>
pub fn active_take(&'a self) -> Take<'a, Immutable>
pub fn is_selected(&self) -> bool
pub fn position(&self) -> Position
pub fn length(&self) -> Duration
pub fn end_position(&self) -> Position
pub fn is_muted(&self) -> bool
sourcepub fn mute_actual(&self) -> bool
pub fn mute_actual(&self) -> bool
muted (ignores solo). setting this value will not affect Item::solo_override.
sourcepub fn solo_override(&self) -> ItemSoloOverride
pub fn solo_override(&self) -> ItemSoloOverride
Basically, a way to solo particular item.
This function will not override the same parameters on other items
pub fn is_looped(&self) -> bool
pub fn all_takes_play(&self) -> bool
pub fn time_base(&self) -> TimeMode
pub fn auto_stretch(&self) -> bool
pub fn locked(&self) -> bool
pub fn volume(&self) -> Volume
pub fn snap_offset(&self) -> Duration
pub fn fade_in(&self) -> ItemFade
pub fn fade_out(&self) -> ItemFade
pub fn group_id(&self) -> usize
sourcepub fn y_pos_relative(&self) -> usize
pub fn y_pos_relative(&self) -> usize
Y-position (relative to top of track) in pixels
sourcepub fn y_pos_free_mode(&self) -> f64
pub fn y_pos_free_mode(&self) -> f64
Y-position (relative to top of track) in pixels when track is in free mode
0 → top of track, 1 → bottom of track (will never be 1)
sourcepub fn height_free_mode(&self) -> f64
pub fn height_free_mode(&self) -> f64
Height in pixels, when track is in free mode
0 → no height (will never be), 1 → full track.
pub fn n_takes(&self) -> usize
pub fn notes(
&self,
buf_size: impl Into<Option<u32>>
) -> ReaperStaticResult<String>
pub fn guid(&self) -> GUID
sourceimpl<'a> Item<'a, Mutable>
impl<'a> Item<'a, Mutable>
pub fn add_take(&mut self) -> Take<'_, Mutable>
pub fn get_take_mut(&'a mut self, index: usize) -> Option<Take<'a, Mutable>>
pub fn active_take_mut(&'a mut self) -> Take<'a, Mutable>
pub fn set_position(&mut self, position: impl Into<Position>)
pub fn set_length(&mut self, length: Duration)
pub fn set_end_position(&mut self, end_position: impl Into<Position>)
pub fn set_selected(&self, selected: bool)
pub fn delete(self)
pub fn make_only_selected_item(&mut self)
pub fn split(
self,
position: impl Into<Position>
) -> ReaperStaticResult<ItemSplit<'a>>
pub fn update(&mut self)
pub fn move_to_track(&self, track_index: usize) -> ReaperStaticResult<()>
pub fn set_muted(&mut self, muted: bool)
sourcepub fn set_mute_actual(&mut self, mute: bool)
pub fn set_mute_actual(&mut self, mute: bool)
muted (ignores solo). setting this value will not affect Item::solo_override.
sourcepub fn set_solo_override(&mut self, solo: ItemSoloOverride)
pub fn set_solo_override(&mut self, solo: ItemSoloOverride)
Basically, a way to solo particular item.
This function will not override the same parameters on other items
pub fn set_looped(&mut self, looped: bool)
pub fn set_all_takes_play(&mut self, should_play: bool)
pub fn set_time_base(&mut self, mode: TimeMode)
pub fn set_auto_stretch(&mut self, state: bool)
pub fn set_locked(&mut self, locked: bool)
pub fn set_volume(&mut self, volume: Volume)
pub fn set_snap_offset(&mut self, offset: Duration) -> ReaperStaticResult<()>
pub fn set_fade_in(&mut self, fade: ItemFade) -> ReaperStaticResult<()>
pub fn set_fade_out(&mut self, fade: ItemFade) -> ReaperStaticResult<()>
pub fn set_group_id(&mut self, id: usize) -> ReaperStaticResult<()>
sourcepub fn set_y_pos_free_mode(&mut self, y_pos: f64) -> ReaperStaticResult<()>
pub fn set_y_pos_free_mode(&mut self, y_pos: f64) -> ReaperStaticResult<()>
Y-position (relative to top of track) in pixels when track is in free mode
0 → top of track, 1 → bottom of track (will never be 1)
sourcepub fn set_height_free_mode(&mut self, height: f64)
pub fn set_height_free_mode(&mut self, height: f64)
Height in pixels, when track is in free mode
0 → no height (will never be), 1 → full track.
pub fn set_notes(&self, notes: impl Into<String>) -> ReaperStaticResult<()>
pub fn set_guid(&self, guid: GUID) -> ReaperStaticResult<()>
Trait Implementations
sourceimpl<'a, T: Debug + ProbablyMutable> Debug for Item<'a, T>
impl<'a, T: Debug + ProbablyMutable> Debug for Item<'a, T>
sourceimpl<'a> HasExtState for Item<'a, Mutable>
impl<'a> HasExtState for Item<'a, Mutable>
sourceimpl<'a, T: ProbablyMutable> KnowsProject for Item<'a, T>
impl<'a, T: ProbablyMutable> KnowsProject for Item<'a, T>
sourceimpl<'a, T: PartialEq + ProbablyMutable> PartialEq<Item<'a, T>> for Item<'a, T>
impl<'a, T: PartialEq + ProbablyMutable> PartialEq<Item<'a, T>> for Item<'a, T>
sourceimpl<'a, T: ProbablyMutable> WithReaperPtr<'a> for Item<'a, T>
impl<'a, T: ProbablyMutable> WithReaperPtr<'a> for Item<'a, T>
type Ptr = NonNull<MediaItem>
sourcefn get_pointer(&self) -> Self::Ptr
fn get_pointer(&self) -> Self::Ptr
sourcefn make_unchecked(&mut self)
fn make_unchecked(&mut self)
sourcefn make_checked(&mut self)
fn make_checked(&mut self)
sourcefn should_check(&self) -> bool
fn should_check(&self) -> bool
sourcefn require_valid(&self) -> ReaperResult<()>
fn require_valid(&self) -> ReaperResult<()>
sourcefn require_valid_2(&self, project: &Project) -> ReaperResult<()>
fn require_valid_2(&self, project: &Project) -> ReaperResult<()>
sourcefn with_valid_ptr(
&mut self,
f: impl FnMut(&mut Self) -> ReaperResult<()>
) -> ReaperResult<()>
fn with_valid_ptr(
&mut self,
f: impl FnMut(&mut Self) -> ReaperResult<()>
) -> ReaperResult<()>
impl<'a, T: ProbablyMutable> StructuralPartialEq for Item<'a, T>
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Item<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for Item<'a, T>
impl<'a, T> !Sync for Item<'a, T>
impl<'a, T> Unpin for Item<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for Item<'a, T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more