pub struct Areas {
pub state: Area,
pub status: Area,
pub input: Area,
pub purpose: Option<Area>,
pub pos_idx: usize,
pub nb_pos: usize,
}Expand description
the areas of the various parts of a panel. It’s also where a state usually checks how many panels there are, and their respective positions
Fields§
§state: Area§status: Area§input: Area§purpose: Option<Area>§pos_idx: usize§nb_pos: usizeImplementations§
Source§impl Areas
impl Areas
Sourcepub fn create(
present_panels: &mut [Panel],
layout_instructions: &LayoutInstructions,
insertion_idx: usize,
screen: Screen,
with_preview: bool,
) -> Self
pub fn create( present_panels: &mut [Panel], layout_instructions: &LayoutInstructions, insertion_idx: usize, screen: Screen, with_preview: bool, ) -> Self
compute an area for a new panel which will be inserted
pub fn resize_all( panels: &mut [Panel], layout_instructions: &LayoutInstructions, screen: Screen, with_preview: bool, )
pub fn is_first(&self) -> bool
pub fn is_last(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Areas
impl RefUnwindSafe for Areas
impl Send for Areas
impl Sync for Areas
impl Unpin for Areas
impl UnwindSafe for Areas
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more