pub enum Annotation {
Arrow(ArrowAnnotation),
Rect(RectAnnotation),
}Variants§
Arrow(ArrowAnnotation)
Rect(RectAnnotation)
Trait Implementations§
Source§impl Annotatable for Annotation
impl Annotatable for Annotation
fn get_id(&self) -> Id
fn get_type(&self) -> &str
fn set_name(&mut self, name: String)
fn get_name(&self) -> String
fn is_selected(&mut self)
fn set_visibility(&mut self, visible: bool)
fn show_comments(&self) -> bool
fn show_comment_box(&self) -> bool
fn set_show_comments(&mut self, show: bool)
fn get_comment_box(&self) -> Comment
fn get_comment_box_mut(&mut self) -> &mut Comment
fn is_visible(&self) -> bool
fn get_center_time(&self) -> BigInt
fn get_start_time(&self) -> BigInt
fn get_end_time(&self) -> BigInt
Source§fn is_attached(&self, removed_ref: &DisplayedItemRef) -> bool
fn is_attached(&self, removed_ref: &DisplayedItemRef) -> bool
Checks whether the annotation is attached to the given Item.
fn get_from_wave(&self) -> Option<GraphicsY>
fn get_to_wave(&self) -> Option<GraphicsY>
fn draw( &self, ui: &mut Ui, waves: &WaveData, viewport_idx: usize, ctx: &mut DrawingContext<'_>, theme: &SurferTheme, msgs: &mut Vec<Message>, y_offset: f32, to_screen: RectTransform, time_formatter: &TimeFormatter, )
fn get_comment_position( &self, viewport: &Viewport, ctx: &DrawingContext<'_>, waves: &WaveData, offset: f32, ) -> Pos2
fn get_time_info(&self, time_formatter: &TimeFormatter) -> String
fn get_messages(&self) -> Vec<CommentMessage>
fn draw_hover_info( &self, group_name: String, ui: &mut Ui, (time_start_str, time_end_str): (&str, &str), )
fn hide_annotation(&self, ui: &mut Ui, stroke: Stroke, center: Pos2) -> Rect
fn draw_comment_box( &self, ui: &mut Ui, viewport_idx: usize, msgs: &mut Vec<Message>, comment_position: Pos2, ) -> (Id, Comment)
fn update_comment_box(&mut self, comment: Comment)
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for Annotation
impl<'de> Deserialize<'de> for Annotation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Annotation
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnsafeUnpin for Annotation
impl UnwindSafe for Annotation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more