DVUI

processEventsCustom

Call this once per frame before the grid body cells are created. Used when multiple focusable widgets are in a single grid cell. The passed in cellConverter must identify the correct cursor cell for a physical screen positon.

Parameters

#
self:*KeyboardNavigation
*KeyboardNavigation
grid:*GridWidget
*GridWidget
cellConverter:fn ( grid: *GridWidget, point: Point.Physical, ) ?Cell
fn ( grid: *GridWidget, point: Point.Physical, ) ?Cell

Source

Implementation

#
pub fn processEventsCustom(self: *KeyboardNavigation, grid: *GridWidget, cellConverter: fn (
        grid: *GridWidget,
        point: Point.Physical,
    ) ?Cell) void {
        self.enforceCursorLimits();

        self.is_focused = self.last_focused_widget == dvui.focusedWidgetId() and dvui.lastFocusedIdInFrame() == .zero;

        for (dvui.events()) |*e| {
            self.processEvent(e, grid, cellConverter);
        }
    }