pub struct Prepared {
pub frame: Frame,
pub content_ui: Ui,
/* private fields */
}
Fields§
§frame: Frame
The frame that was prepared.
The margin has already been read and used, but the rest of the fields may be modified.
content_ui: Ui
Add 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
.
Auto Trait Implementations§
impl Freeze for Prepared
impl !RefUnwindSafe for Prepared
impl Send for Prepared
impl Sync for Prepared
impl Unpin for Prepared
impl !UnwindSafe for Prepared
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