pub struct FramePlugin { /* private fields */ }Expand description
The plugin: FramePlugin::own() draws the frame by default,
FramePlugin::system() leaves it to the system until the setting
says otherwise.
Implementations§
Source§impl FramePlugin
impl FramePlugin
Sourcepub fn name(self, name: &str) -> Self
pub fn name(self, name: &str) -> Self
The name shown after the system menu button; without one, the
application’s (AppBuilder::name).
Sourcepub fn logo(
self,
image: impl Fn(&Context) -> ImageSource<'static> + Send + Sync + 'static,
) -> Self
pub fn logo( self, image: impl Fn(&Context) -> ImageSource<'static> + Send + Sync + 'static, ) -> Self
The application’s logo, drawn after the system menu button and
before its name, a toolbar icon’s size (size.icon.toolbar), so the
application keeps the frame’s menu block instead of replacing it.
image gives the logo’s image each frame: a texture the
application loaded once (ImageSource::Texture), or a source egui’s
image loaders read (egui::include_image!).
use egui_pop_api::frame::FramePlugin;
let frame = FramePlugin::own().logo(|_| egui::ImageSource::Uri("file://logo.png".into()));Need (image): an application’s logo in its own title bar, beside its name.
Sourcepub fn layout_controls(self, on: bool) -> Self
pub fn layout_controls(self, on: bool) -> Self
Draws VS Code’s layout controls at the end of the title bar
(off by default): the “Customize layout” button and the area
toggles (crate::layout_controls::show, the
egui_pop.frame.layout block of the zones::CAPTION zone,
before the application’s own items).
Trait Implementations§
Source§impl Clone for FramePlugin
impl Clone for FramePlugin
Source§fn clone(&self) -> FramePlugin
fn clone(&self) -> FramePlugin
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FramePlugin
impl Debug for FramePlugin
Source§impl Default for FramePlugin
impl Default for FramePlugin
Source§fn default() -> FramePlugin
fn default() -> FramePlugin
Source§impl Plugin for FramePlugin
impl Plugin for FramePlugin
fn id(&self) -> PluginId
Source§fn title(&self) -> String
fn title(&self) -> String
Source§fn enabled(&self, _ctx: &Ctx<'_>) -> bool
fn enabled(&self, _ctx: &Ctx<'_>) -> bool
Source§fn disconnect(&mut self, _ctx: &mut Ctx<'_>)
fn disconnect(&mut self, _ctx: &mut Ctx<'_>)
Auto Trait Implementations§
impl Freeze for FramePlugin
impl !RefUnwindSafe for FramePlugin
impl Send for FramePlugin
impl Sync for FramePlugin
impl Unpin for FramePlugin
impl UnsafeUnpin for FramePlugin
impl !UnwindSafe for FramePlugin
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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