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
impl GridLayout
fn prev_col_width(&self, col: usize) -> f32
fn prev_row_height(&self, row: usize) -> f32
pub(crate) fn wrap_text(&self) -> bool
pub(crate) fn available_rect(&self, region: &Region) -> Rect
pub(crate) fn next_cell(&self, cursor: Rect, child_size: Vec2) -> Rect
pub(crate) fn align_size_within_rect(&self, size: Vec2, frame: Rect) -> Rect
pub(crate) fn justify_and_align(&self, frame: Rect, size: Vec2) -> Rect
pub(crate) fn advance( &mut self, cursor: &mut Rect, _frame_rect: Rect, widget_rect: Rect, )
fn paint_row(&mut self, cursor: &Rect, painter: &Painter)
pub(crate) fn end_row(&mut self, cursor: &mut Rect, painter: &Painter)
pub(crate) fn save(&self)
Auto Trait Implementations§
impl Freeze for GridLayout
impl !RefUnwindSafe for GridLayout
impl Send for GridLayout
impl Sync for GridLayout
impl Unpin for GridLayout
impl !UnwindSafe for GridLayout
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