Skip to main content

Annotatable

Trait Annotatable 

Source
pub trait Annotatable {
Show 27 methods // Required methods 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 get_messages(&self) -> Vec<CommentMessage>; fn is_visible(&self) -> bool; fn get_center_time(&self) -> BigInt; fn get_start_time(&self) -> BigInt; fn get_end_time(&self) -> BigInt; fn is_attached(&self, removed_ref: &DisplayedItemRef) -> bool; fn get_time_info(&self, time_formatter: &TimeFormatter) -> String; 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; // Provided methods fn draw_quick_menu( &self, ui: &mut Ui, msgs: &mut Vec<Message>, waves: &WaveData, viewport_rect: Rect, position: Pos2, ) { ... } 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) { ... }
}

Required Methods§

Source

fn get_id(&self) -> Id

Source

fn get_type(&self) -> &str

Source

fn set_name(&mut self, name: String)

Source

fn get_name(&self) -> String

Source

fn is_selected(&mut self)

Source

fn set_visibility(&mut self, visible: bool)

Source

fn show_comments(&self) -> bool

Source

fn show_comment_box(&self) -> bool

Source

fn set_show_comments(&mut self, show: bool)

Source

fn get_comment_box(&self) -> Comment

Source

fn get_comment_box_mut(&mut self) -> &mut Comment

Source

fn get_messages(&self) -> Vec<CommentMessage>

Source

fn is_visible(&self) -> bool

Source

fn get_center_time(&self) -> BigInt

Source

fn get_start_time(&self) -> BigInt

Source

fn get_end_time(&self) -> BigInt

Source

fn is_attached(&self, removed_ref: &DisplayedItemRef) -> bool

Checks whether the annotation is attached to the given Item.

Source

fn get_time_info(&self, time_formatter: &TimeFormatter) -> String

Source

fn get_from_wave(&self) -> Option<GraphicsY>

Source

fn get_to_wave(&self) -> Option<GraphicsY>

Source

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, )

Source

fn get_comment_position( &self, viewport: &Viewport, ctx: &DrawingContext<'_>, waves: &WaveData, offset: f32, ) -> Pos2

Provided Methods§

Source

fn draw_quick_menu( &self, ui: &mut Ui, msgs: &mut Vec<Message>, waves: &WaveData, viewport_rect: Rect, position: Pos2, )

Source

fn draw_hover_info( &self, group_name: String, ui: &mut Ui, (time_start_str, time_end_str): (&str, &str), )

Source

fn hide_annotation(&self, ui: &mut Ui, stroke: Stroke, center: Pos2) -> Rect

Source

fn draw_comment_box( &self, ui: &mut Ui, viewport_idx: usize, msgs: &mut Vec<Message>, comment_position: Pos2, ) -> (Id, Comment)

Source

fn update_comment_box(&mut self, comment: Comment)

Implementors§