Struct egui::grid::GridLayout

source ·
pub(crate) struct GridLayout {
Show 14 fields ctx: Context, style: Arc<Style>, id: Id, is_first_frame: bool, prev_state: State, curr_state: State, initial_available: Rect, num_columns: Option<usize>, spacing: Vec2, min_cell_size: Vec2, max_cell_size: Vec2, color_picker: Option<Box<dyn Send + Sync + Fn(usize, &Style) -> Option<Color32>>>, col: usize, row: usize,
}

Fields§

§ctx: Context§style: Arc<Style>§id: Id§is_first_frame: bool

First frame (no previous know state).

§prev_state: State

State previous frame (if any). This can be used to predict future sizes of cells.

§curr_state: State

State accumulated during the current frame.

§initial_available: Rect§num_columns: Option<usize>§spacing: Vec2§min_cell_size: Vec2§max_cell_size: Vec2§color_picker: Option<Box<dyn Send + Sync + Fn(usize, &Style) -> Option<Color32>>>§col: usize§row: usize

Implementations§

source§

impl GridLayout

source

pub(crate) fn new(ui: &Ui, id: Id, prev_state: Option<State>) -> Self

source§

impl GridLayout

source

fn prev_col_width(&self, col: usize) -> f32

source

fn prev_row_height(&self, row: usize) -> f32

source

pub(crate) fn wrap_text(&self) -> bool

source

pub(crate) fn available_rect(&self, region: &Region) -> Rect

source

pub(crate) fn next_cell(&self, cursor: Rect, child_size: Vec2) -> Rect

source

pub(crate) fn align_size_within_rect(&self, size: Vec2, frame: Rect) -> Rect

source

pub(crate) fn justify_and_align(&self, frame: Rect, size: Vec2) -> Rect

source

pub(crate) fn advance( &mut self, cursor: &mut Rect, _frame_rect: Rect, widget_rect: Rect, )

source

fn paint_row(&self, cursor: &Rect, painter: &Painter)

source

pub(crate) fn end_row(&mut self, cursor: &mut Rect, painter: &Painter)

source

pub(crate) fn save(&self)

Auto Trait Implementations§

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.