DVUI

subwindowAdd

Called by floating widgets to participate in subwindow stacking - the order in which multiple subwindows are drawn and which subwindow mouse events are tagged with.

Only valid between Window.beginand Window.end.

Parameters

#
id:Id
Id
rect:Rect
Rect
rect_pixels:Rect.Physical
Rect.Physical
modal:bool
bool
stay_above_parent_window:?Id
?Id
mouse_events:bool
bool

Source

Implementation

#
pub fn subwindowAdd(id: Id, rect: Rect, rect_pixels: Rect.Physical, modal: bool, stay_above_parent_window: ?Id, mouse_events: bool) void {
    const cw = currentWindow();
    cw.subwindows.add(cw.gpa, id, rect, rect_pixels, modal, stay_above_parent_window, mouse_events) catch |err| {
        logError(@src(), err, "Could not insert {f} {f} into subwindow list, events in this or other subwindows might not work properly", .{ id, rect_pixels });
    };
}