pub struct ArrowAnnotation {
pub from: WavePoint,
pub to: WavePoint,
pub created_at: DateTime<Local>,
pub length: f32,
pub head_mode: ArrowHeadMode,
pub annotation_data: AnnotationData,
}Fields§
§from: WavePoint§to: WavePoint§created_at: DateTime<Local>§length: f32§head_mode: ArrowHeadMode§annotation_data: AnnotationDataImplementations§
Source§impl ArrowAnnotation
impl ArrowAnnotation
pub(crate) fn new( id: Id, from: WavePoint, to: WavePoint, head_mode: ArrowHeadMode, num: i32, ) -> Self
pub fn created_at_string(&self) -> String
pub fn toggle_arrow_visibility(&mut self)
fn hit_radius(&self) -> f32
fn segments(&self) -> Option<ArrowSegments>
Sourcepub fn hit_distance_screen(&self, pointer: Pos2) -> Option<f32>
pub fn hit_distance_screen(&self, pointer: Pos2) -> Option<f32>
Returns the pointer distance to the arrow if it is inside the hit radius.
fn paint_arrow_head(&self, ui: &mut Ui, tip: Pos2, left: Pos2, right: Pos2)
Trait Implementations§
Source§impl Annotatable for ArrowAnnotation
impl Annotatable for ArrowAnnotation
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 set_show_comments(&mut self, show: bool)
fn show_comment_box(&self) -> bool
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_comment_box(&self) -> Comment
fn get_comment_box_mut(&mut self) -> &mut Comment
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 ArrowAnnotation
impl Clone for ArrowAnnotation
Source§fn clone(&self) -> ArrowAnnotation
fn clone(&self) -> ArrowAnnotation
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 ArrowAnnotation
impl<'de> Deserialize<'de> for ArrowAnnotation
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
Source§impl Serialize for ArrowAnnotation
impl Serialize for ArrowAnnotation
Auto Trait Implementations§
impl Freeze for ArrowAnnotation
impl RefUnwindSafe for ArrowAnnotation
impl Send for ArrowAnnotation
impl Sync for ArrowAnnotation
impl Unpin for ArrowAnnotation
impl UnsafeUnpin for ArrowAnnotation
impl UnwindSafe for ArrowAnnotation
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