DVUI

handle

Mark the event as handled

In general, the dvui.WidgetData passed here should be the same one that matched this event, using dvui.matchEvent or similar. This makes it possible to see which widget handled the event.

Parameters

#
self:*Event
*Event
src:std.builtin.SourceLocation
std.builtin.SourceLocation
wd:*const dvui.WidgetData
*const dvui.WidgetData

Source

Implementation

#
pub fn handle(self: *Event, src: std.builtin.SourceLocation, wd: *const dvui.WidgetData) void {
    if (dvui.debug.logEvents(null)) {
        dvui.log.debug("{s}:{d} {f} handled by {s} ({x})", .{ src.file, src.line, self, wd.options.name orelse "???", wd.id });
    }
    self.handled = true;
}