UI module

push_ui

procedureextensionexperimentalsince 0.31.0Source

Make ui the current UI for the code that follows (a second window, or tests).

Example↗
first := headless();
second := headless();
defer free_ui(*first);
defer free_ui(*second);

push_ui(*first);
push_ui(*second);
assert(current_ui() == *second);
pop_ui();
assert(current_ui() == *first);
pop_ui();
push_ui :: (ui: *UI_State)

Make ui the current UI for the code that follows (a second window, or tests).

Parameters

ui: *UI_State
the UI to make current.
Example↗
first := headless();
second := headless();
defer free_ui(*first);
defer free_ui(*second);

push_ui(*first);
push_ui(*second);
assert(current_ui() == *second);
pop_ui();
assert(current_ui() == *first);
pop_ui();

See also