wijjit.core.overlay.Overlay
- class wijjit.core.overlay.Overlay(element, layer_type, z_index, close_on_click_outside=True, close_on_escape=True, trap_focus=False, on_close=None, dimmed_background=False, previous_focus=None, previous_focus_state=None)[source]
Represents a UI overlay (modal, dropdown, tooltip, etc.).
- Parameters:
element (
Element) – The element to render as an overlaylayer_type (
LayerType) – Which layer this overlay belongs toz_index (
int) – Computed z-index (layer_base + stack_position)close_on_click_outside (
bool) – Whether clicking outside closes this overlayclose_on_escape (
bool) – Whether ESC key closes this overlaytrap_focus (
bool) – Whether to trap focus within this overlayon_close (
CallableorNone) – Callback when overlay is closeddimmed_background (
bool) – Whether to dim the background behind this overlayprevious_focus (
ElementorNone) – Element that had focus before this overlay openedprevious_focus_state (
tupleorNone) – Saved focus manager state (elements list, current index)
- __init__(element, layer_type, z_index, close_on_click_outside=True, close_on_escape=True, trap_focus=False, on_close=None, dimmed_background=False, previous_focus=None, previous_focus_state=None)
Methods
__init__(element, layer_type, z_index[, ...])Attributes