[][src]Struct liriodendron::log::action::Action

pub struct Action {
    grid_id: usize,
    grid: Grid,
    tool: Tool,
    checked: bool,
}

Represents a user action

Fields

grid_id: usizegrid: Gridtool: Toolchecked: bool

The log grid's coordinates and the user interface grid's coordinates are different. In log grid's coordinates starts to 0, but in the the user interface, it depends of the terminal size and where the grid area is supposed to be on the user interface. The log have to modify it's own grid's coordinates system to fit with the grid's coordinates system. The checked member allows to know if the log fitted its grid's coordinates system for the tested action. The checked member only matters for cells setter tools.

Methods

impl Action[src]

pub fn new((grid, grid_id): (Grid, usize), tool: Tool) -> Action[src]

pub fn get_grid_id(&self) -> usize[src]

pub fn get_grid(&self) -> Grid[src]

pub fn get_tool(&self) -> Tool[src]

pub fn is_checked(&self) -> bool[src]

pub fn corrected(&self, left: Option<u16>, top: Option<u16>) -> Action[src]

Creates a new Action object with fitted grid's coordinates to the user interface system.

Trait Implementations

impl Clone for Action[src]

impl Copy for Action[src]

impl PartialEq<Action> for Action[src]

Auto Trait Implementations

impl RefUnwindSafe for Action

impl Send for Action

impl Sync for Action

impl Unpin for Action

impl UnwindSafe for Action

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,