Struct egui::containers::panel::CentralPanel
source · [−]pub struct CentralPanel { /* private fields */ }
Expand description
A panel that covers the remainder of the screen, i.e. whatever area is left after adding other panels.
CentralPanel
must be added after all other panels.
NOTE: Any Window
s and Area
s will cover the top-level CentralPanel
.
See the module level docs for more details.
egui::CentralPanel::default().show(ctx, |ui| {
ui.label("Hello World!");
});
Implementations
sourceimpl CentralPanel
impl CentralPanel
sourceimpl CentralPanel
impl CentralPanel
sourcepub fn show_inside<R>(
self,
ui: &mut Ui,
add_contents: impl FnOnce(&mut Ui) -> R
) -> InnerResponse<R>
pub fn show_inside<R>(
self,
ui: &mut Ui,
add_contents: impl FnOnce(&mut Ui) -> R
) -> InnerResponse<R>
Show the panel inside a Ui
.
Trait Implementations
sourceimpl Default for CentralPanel
impl Default for CentralPanel
sourcefn default() -> CentralPanel
fn default() -> CentralPanel
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for CentralPanel
impl Send for CentralPanel
impl Sync for CentralPanel
impl Unpin for CentralPanel
impl UnwindSafe for CentralPanel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more