annatomic 0.4.0

The Annatomic annotation editor is intended to be used for the [RIDGES corpus](https://www.linguistik.hu-berlin.de/en/institut-en/professuren-en/korpuslinguistik/research/ridges-projekt). It is based on [graphANNIS](https://github.com/korpling/graphANNIS) and thus is internal data model is in principle suitable for a wide range of annotation concepts. "
Documentation
use std::collections::BTreeSet;

use egui::Ui;

use crate::app::{actions::GraphAction, project::EditorStateUpdates};

pub(crate) mod corpus_structure;
pub(crate) mod edit;
pub(crate) mod export;
pub(crate) mod import;
pub(crate) mod start;

#[cfg(test)]
mod tests;

pub(crate) trait Editor: Send {
    fn show(&mut self, ui: &mut Ui);
    fn has_pending_updates(&self) -> bool;
    fn take_pending_updates(&mut self) -> Vec<GraphAction>;
    fn editor_state_updates(&self, action: &GraphAction) -> anyhow::Result<EditorStateUpdates>;
    /// Returns the name of the node that is currently edited.
    fn get_edited_node(&self) -> &str;

    /// Get the names of the nodes that are currently selected.
    fn get_selected_nodes(&self) -> BTreeSet<String>;

    fn consume_shortcuts(&mut self, _ctx: &egui::Context) {}
    fn add_edit_menu_entries(&mut self, _ui: &mut egui::Ui) {}
    fn any_mut(&mut self) -> &mut dyn std::any::Any;
}