Type Drawer

type Drawer struct {
	// contains filtered or unexported fields
}

Drawer is a modal edge surface. Drag state and snap-point policy remain caller-owned until pointer capture is available in the runtime.

Constructors

BeginDrawer#

func BeginDrawer(canvas *ui.Canvas, theme ui.Theme, viewport ui.Rect, options DrawerOptions) Drawer

BeginDrawer creates a drawer declaration.

Methods

Actions#

func (drawer Drawer) Actions(layout DrawerLayout, actions ...ButtonAction)

Actions paints the footer's buttons against its right edge, in the order given, so the last one sits at the corner (see ButtonRow). A disabled drawer makes every action inert. Call it between Begin and End.

Begin#

func (drawer Drawer) Begin(title, description string) DrawerLayout

Begin paints the drawer and leaves its layer/scope active for body UI.

Disabled#

func (drawer Drawer) Disabled() Drawer

Disabled keeps dismiss and close semantics visible while making them inert.

End#

func (drawer Drawer) End()

End closes the layer and installs modal focus and Escape routing. It also ends what the drawer animates in and out.

Paint#

func (drawer Drawer) Paint(title, description string) DrawerLayout

Paint paints a complete drawer and closes its modal layer.

WithHandle#

func (drawer Drawer) WithHandle() Drawer

WithHandle enables the explicit swipe-handle visual used by Base UI.