TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::PostLayoutContext Class Reference

Context for post-layout callbacks (AddPostLayout). More...

#include <gui_core/graphics/gui_custom_draw_context.h>

Public Member Functions

 PostLayoutContext (ElementStorage &storage, ElementRef ref, IntRect elementRectLayout, IntRect innerRectLayout, float3x2 contentTransform) noexcept
 Built by the layout pass; callbacks receive it.
ElementRef Ref () const noexcept
 The registered element, its border-box and padding-box, and its contentTransform.
IntRect ElementRect () const noexcept
IntRect ElementInnerRect () const noexcept
float3x2 ContentTransform () const noexcept
IntRect GetElementRect (const ElementRef &ref) const noexcept
 Lookups for other elements, as on CustomDrawContext but with rects in layout space.
IntRect GetInnerRect (const ElementRef &ref) const noexcept
ElementRef GetParentRef (const ElementRef &ref) const noexcept
ElementRef GetNextSiblingRef (const ElementRef &ref) const noexcept
int2 GetContentSize (const ElementRef &ref) const noexcept
int2 GetInnerSize (const ElementRef &ref) const noexcept

Detailed Description

Context for post-layout callbacks (AddPostLayout).

Fires once per registered element AFTER layout completes and BEFORE rendering starts. Read-only - no drawing primitives.

Use this for state updates that depend on final geometry. For example:

  • cache an inner-rect size for use by next frame's UI code,
  • compute screen-space endpoints from layout rects for a custom subsystem,
  • record a transformed origin for a separate AddCustomDraw to consume.

All rects returned are in LAYOUT space (pre-transform, window-local). The element's contentTransform is exposed verbatim for callers that need to map points themselves.

Constructor & Destructor Documentation

◆ PostLayoutContext()

tachyon::PostLayoutContext::PostLayoutContext ( ElementStorage & storage,
ElementRef ref,
IntRect elementRectLayout,
IntRect innerRectLayout,
float3x2 contentTransform )
inlinenoexcept

Built by the layout pass; callbacks receive it.

Member Function Documentation

◆ Ref()

ElementRef tachyon::PostLayoutContext::Ref ( ) const
inlinenoexcept

The registered element, its border-box and padding-box, and its contentTransform.

◆ ElementRect()

IntRect tachyon::PostLayoutContext::ElementRect ( ) const
inlinenoexcept

◆ ElementInnerRect()

IntRect tachyon::PostLayoutContext::ElementInnerRect ( ) const
inlinenoexcept

◆ ContentTransform()

float3x2 tachyon::PostLayoutContext::ContentTransform ( ) const
inlinenoexcept

◆ GetElementRect()

IntRect tachyon::PostLayoutContext::GetElementRect ( const ElementRef & ref) const
noexcept

Lookups for other elements, as on CustomDrawContext but with rects in layout space.

◆ GetInnerRect()

IntRect tachyon::PostLayoutContext::GetInnerRect ( const ElementRef & ref) const
noexcept

◆ GetParentRef()

ElementRef tachyon::PostLayoutContext::GetParentRef ( const ElementRef & ref) const
noexcept

◆ GetNextSiblingRef()

ElementRef tachyon::PostLayoutContext::GetNextSiblingRef ( const ElementRef & ref) const
noexcept

◆ GetContentSize()

int2 tachyon::PostLayoutContext::GetContentSize ( const ElementRef & ref) const
noexcept

◆ GetInnerSize()

int2 tachyon::PostLayoutContext::GetInnerSize ( const ElementRef & ref) const
noexcept

The documentation for this class was generated from the following file: