DVUI

dataGet

Retrieve the value for key (id+name).

Can be called from any thread.

If called from non-GUI thread or outside Window.begin/Window.end, you must pass a pointer to the Window you want to add the value to.

If you want a pointer to the stored value, use dataGetPtr.

If you want to get the contents of a stored slice, use dataGetSlice.

Parameters

#
win:?*Window
?*Window
id:Id
Id
name:[]const u8
[]const u8
T:type
type

Source

Implementation

#
pub fn dataGet(win: ?*Window, id: Id, name: []const u8, comptime T: type) ?T {
    return data.get(win, .widget(id, name), T);
}