Struct egui_extras::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.

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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> 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,

§

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>,

§

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>,

§

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,