Screen

Struct Screen 

Source
pub struct Screen {
    pub max_id: u64,
    pub nodes: HashMap<NodeID, Node>,
    pub arrows: Vec<(NodeID, NodeID)>,
    pub work_path: Option<String>,
    pub config: Config,
    pub dims: Coords,
    pub is_test: bool,
    pub tag_db: TagDB,
    /* private fields */
}

Fields§

§max_id: u64§nodes: HashMap<NodeID, Node>§arrows: Vec<(NodeID, NodeID)>§work_path: Option<String>§config: Config§dims: Coords§is_test: bool§tag_db: TagDB

Implementations§

Source§

impl Screen

Source

pub fn with_node<B, F>(&self, k: NodeID, f: F) -> Option<B>
where F: FnMut(&Node) -> B,

Source

pub fn handle_event(&mut self, evt: Event) -> bool

Source

pub fn arrange(&mut self)

Source

pub fn recursive_child_filter_map<F, B>( &self, node_id: NodeID, filter_map: &mut F, ) -> Vec<B>
where F: FnMut(&Node) -> Option<B>,

Source

pub fn flush(&mut self)

Source

pub fn should_auto_arrange(&self) -> bool

Source

pub fn run(&mut self)

Source

pub fn drawn_at(&self, node_id: NodeID) -> Option<&Coords>

Source

pub fn lookup(&self, coords: Coords) -> Option<&NodeID>

Source

pub fn assert_node_consistency(&self)

Source

pub fn save(&self)

Source

pub fn cleanup(&mut self)

Source

pub fn start_raw_mode(&mut self)

Source

pub fn occupied(&self, coords: Coords) -> bool

Source

pub fn add_or_remove_arrow(&mut self)

Source

pub fn draw(&mut self)

Trait Implementations§

Source§

impl Default for Screen

Source§

fn default() -> Screen

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Screen

§

impl RefUnwindSafe for Screen

§

impl Send for Screen

§

impl Sync for Screen

§

impl Unpin for Screen

§

impl UnwindSafe for Screen

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Typeable for T
where T: Any,

Source§

fn get_type(&self) -> TypeId

Get the TypeId of this object.