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§
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
Sourcefn 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.