egui_extras

Struct Column

Source
pub struct Column { /* private fields */ }
Expand description

Specifies the properties of a column, like its width range.

Implementations§

Source§

impl Column

Source

pub fn auto() -> Self

Automatically sized based on content.

If you have many thousands of rows and are therefore using TableBody::rows or TableBody::heterogeneous_rows, then the automatic size will only be based on the currently visible rows.

Source

pub fn auto_with_initial_suggestion(suggested_width: f32) -> Self

Automatically sized.

The given fallback is a loose suggestion, that may be used to wrap cell contents, if they contain a wrapping layout. In most cases though, the given value is ignored.

Source

pub fn initial(width: f32) -> Self

With this initial width.

Source

pub fn exact(width: f32) -> Self

Always this exact width, never shrink or grow.

Source

pub fn remainder() -> Self

Take all the space remaining after the other columns have been sized.

If you have multiple Column::remainder they all share the remaining space equally.

Source

pub fn resizable(self, resizable: bool) -> Self

Can this column be resized by dragging the column separator?

If you don’t call this, the fallback value of TableBuilder::resizable is used (which by default is false).

Source

pub fn clip(self, clip: bool) -> Self

If true: Allow the column to shrink enough to clip the contents. If false: The column will always be wide enough to contain all its content.

Clipping can make sense if you expect a column to contain a lot of things, and you don’t want it too take up too much space. If you turn on clipping you should also consider calling Self::at_least.

Default: false.

Source

pub fn at_least(self, minimum: f32) -> Self

Won’t shrink below this width (in points).

Default: 0.0

Source

pub fn at_most(self, maximum: f32) -> Self

Won’t grow above this width (in points).

Default: f32::INFINITY

Source

pub fn range(self, range: impl Into<Rangef>) -> Self

Allowed range of movement (in points), if in a resizable Table.

Source

pub fn auto_size_this_frame(self, auto_size_this_frame: bool) -> Self

If set, the column will be automatically sized based on the content this frame.

Do not set this every frame, just on a specific action.

Trait Implementations§

Source§

impl Clone for Column

Source§

fn clone(&self) -> Column

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Column

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Column

Source§

fn eq(&self, other: &Column) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Column

Source§

impl StructuralPartialEq for Column

Auto Trait Implementations§

§

impl Freeze for Column

§

impl RefUnwindSafe for Column

§

impl Send for Column

§

impl Sync for Column

§

impl Unpin for Column

§

impl UnwindSafe for Column

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,