pub struct Drawer { /* private fields */ }Expand description
A slide-in side panel. Attach to any widget’s paint via .drawer(open, ..)
(see DrawerApi) or use directly: when open, it pushes a dimmed scrim +
a left-anchored panel overlay. Tapping the scrim closes it.
Customization (D115/Phase 32 Step 1): Drawer::full_screen makes the
panel cover the whole window (mobile nav-page style); Drawer::background
and Drawer::scrim_color replace the theme-derived defaults.
Implementations§
Source§impl Drawer
impl Drawer
pub fn new( open: Atom<bool>, panel: impl Fn() -> BoxedWidget + Send + Sync + 'static, ) -> Self
pub fn width(self, w: f32) -> Self
Sourcepub fn full_screen(self) -> Self
pub fn full_screen(self) -> Self
Cover the entire window instead of a fixed-width side panel — the full-screen navigation-page presentation. There is no scrim area left to tap, so dismissal is the panel content’s job (or Escape).
Sourcepub fn background(self, c: Color) -> Self
pub fn background(self, c: Color) -> Self
Panel fill — defaults to the theme’s surface.
Sourcepub fn scrim_color(self, c: Color) -> Self
pub fn scrim_color(self, c: Color) -> Self
Scrim (barrier) color over the content behind the panel — defaults to black at ~47% opacity.
Sourcepub fn material(self, m: ShaderMaterial) -> Self
pub fn material(self, m: ShaderMaterial) -> Self
Per-instance shader material — replaces the panel fill when
resolved. Beats the theme’s DrawerMaterial default (D124 Step 5).