DVUI

matchEvent

Parameters

#
self:*ScaleWidget
*ScaleWidget
e:*Event
*Event

Source

Implementation

#
pub fn matchEvent(self: *ScaleWidget, e: *Event) bool {
    // normal match logic except we ignore mouse capture
    return (self.init_options.pinch_zoom != .none) and
        !e.handled and
        e.evt == .mouse and
        (self.init_options.pinch_zoom == .global or e.evt.mouse.floating_win == dvui.subwindowCurrentId()) and
        self.data().borderRectScale().r.contains(e.evt.mouse.p) and
        dvui.clipGet().contains(e.evt.mouse.p) and
        (e.evt.mouse.button == .touch0 or e.evt.mouse.button == .touch1);
}