[−][src]Struct egui::Region
This describes the bounds and existing contents of an Ui
.
It is what is used and updated by Layout
when adding new widgets.
Fields
min_rect: Rect
This is the minimal size of the Ui
.
When adding new widgets, this will generally expand.
Always finite.
The bounding box of all child widgets, but not necessarily a tight bounding box
since Ui
can start with a non-zero min_rect size.
max_rect: Rect
The maximum size of this Ui
. This is a soft max
meaning new widgets will try not to expand beyond it,
but if they have to, they will.
Text will wrap at max_rect.right()
.
Some widgets (like separator lines) will try to fill the full max_rect
width of the ui.
max_rect
will always be at least the size of min_rect
.
If the max_rect
size is zero, it is a signal that child widgets should be as small as possible.
If the max_rect
size is infinite, it is a signal that child widgets should take up as much room as they want.
Implementations
impl Region
[src]
pub fn max_rect_finite(&self) -> Rect
[src]
This is like max_rect
, but will never be infinite.
If the desired rect is infinite ("be as big as you want")
this will be bounded by min_rect
instead.
pub fn expand_to_include_rect(&mut self, rect: Rect)
[src]
Expand the min_rect
and max_rect
of this ui to include a child at the given rect.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Region
[src]
impl Send for Region
[src]
impl Sync for Region
[src]
impl Unpin for Region
[src]
impl UnwindSafe for Region
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,