pub struct Prepared {
pub frame: Frame,
pub content_ui: Ui,
/* private fields */
}Available on crate feature
egui only.Fields§
§frame: FrameThe frame that was prepared.
The margin has already been read and used, but the rest of the fields may be modified.
content_ui: UiAdd your widgets to this UI so it ends up within the frame.
Implementations§
Source§impl Prepared
impl Prepared
Sourcepub fn allocate_space(&self, ui: &mut Ui) -> Response
pub fn allocate_space(&self, ui: &mut Ui) -> Response
Allocate the space that was used by Self::content_ui.
This MUST be called, or the parent ui will not know how much space this widget used.
This can be called before or after Self::paint.
Sourcepub fn paint(&self, ui: &Ui)
pub fn paint(&self, ui: &Ui)
Paint the frame.
This can be called before or after Self::allocate_space.
Sourcepub fn end(self, ui: &mut Ui) -> Response
pub fn end(self, ui: &mut Ui) -> Response
Convenience for calling Self::allocate_space and Self::paint.
Returns the outer rect, i.e. including the outer margin.
Auto Trait Implementations§
impl !RefUnwindSafe for Prepared
impl !UnwindSafe for Prepared
impl Forget for Prepared
impl Freeze for Preparedwhere
NonZero<u64>: Freeze,
*const ArcInner<RwLock<ContextImpl>> is !null: Freeze,
PhantomData<ArcInner<RwLock<ContextImpl>>>: Freeze,
*const ArcInner<Style> is !null: Freeze,
PhantomData<ArcInner<Style>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<f32>: Freeze,
*const dyn Fn(usize, &Style) -> Option<Color32> + Sync + Send is !null: Freeze,
PhantomData<dyn Fn(usize, &Style) -> Option<Color32> + Sync + Send>: Freeze,
*const ArcInner<UiStack> is !null: Freeze,
PhantomData<ArcInner<UiStack>>: Freeze,
impl Move for Prepared
impl Send for Prepared
impl Sync for Prepared
impl Unpin for Prepared
impl UnsafeUnpin for Preparedwhere
NonZeroU64Inner: UnsafeUnpin,
*const ArcInner<RwLock<ContextImpl>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<ContextImpl>>>: UnsafeUnpin,
*const ArcInner<Style> is !null: UnsafeUnpin,
PhantomData<ArcInner<Style>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<f32>: UnsafeUnpin,
*const dyn Fn(usize, &Style) -> Option<Color32> + Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Fn(usize, &Style) -> Option<Color32> + Sync + Send>: UnsafeUnpin,
*const ArcInner<UiStack> is !null: UnsafeUnpin,
PhantomData<ArcInner<UiStack>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more