MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / Clay_BeginLayout

Function Clay_BeginLayout

include/clay.h:4355–4372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4353
4354CLAY_WASM_EXPORT("Clay_BeginLayout")
4355void Clay_BeginLayout(void) {
4356 Clay_Context* context = Clay_GetCurrentContext();
4357 Clay__InitializeEphemeralMemory(context);
4358 context->generation++;
4359 context->dynamicElementIndex = 0;
4360 // Set up the root container that covers the entire window
4361 Clay_Dimensions rootDimensions = {context->layoutDimensions.width, context->layoutDimensions.height};
4362 if (context->debugModeEnabled) {
4363 rootDimensions.width -= (float)Clay__debugViewWidth;
4364 }
4365 context->booleanWarnings = CLAY__INIT(Clay_BooleanWarnings) CLAY__DEFAULT_STRUCT;
4366 Clay__OpenElementWithId(CLAY_ID("Clay__RootContainer"));
4367 Clay__ConfigureOpenElement(CLAY__INIT(Clay_ElementDeclaration) {
4368 .layout = { .sizing = {CLAY_SIZING_FIXED((rootDimensions.width)), CLAY_SIZING_FIXED(rootDimensions.height)} }
4369 });
4370 Clay__int32_tArray_Add(&context->openLayoutElementStack, 0);
4371 Clay__LayoutElementTreeRootArray_Add(&context->layoutElementTreeRoots, CLAY__INIT(Clay__LayoutElementTreeRoot) { .layoutElementIndex = 0 });
4372}
4373
4374void Clay__CloneElementsWithExitTransition() {
4375 Clay_Context* context = Clay_GetCurrentContext();

Callers 1

layout_beginMethod · 0.85

Calls 3

Clay_GetCurrentContextFunction · 0.85
Clay__OpenElementWithIdFunction · 0.85

Tested by

no test coverage detected