DVUI

context

Context menu activated by mouse right click and touch "long press" (0.5s).

Pass a screen space pixel rect in init_opts, then .activePoint() says whether to show a menu.

The menu code should happen before .deinit(), but don't put regular widgets directly inside Context.

Only valid between Window.beginand Window.end.

Parameters

#
src:std.builtin.SourceLocation
std.builtin.SourceLocation
init_opts:ContextWidget.InitOptions
ContextWidget.InitOptions
opts:Options
Options

Source

Implementation

#
pub fn context(src: std.builtin.SourceLocation, init_opts: ContextWidget.InitOptions, opts: Options) *ContextWidget {
    var ret = widgetAlloc(ContextWidget);
    ret.init(src, init_opts, opts);
    ret.processEvents();
    return ret;
}