Skip to main content

Module cotis_traits

Module cotis_traits 

Source
Expand description

Cotis trait implementations wiring CotisLayoutManager into the standard frame and element configuration API.

§Default integration path

When using ElementConfig from cotis-defaults, this module provides everything needed out of the box:

§Text layout

ConfigureLeafElements::set_leaf_config on a text leaf expands the string into synthetic child nodes:

  • Lines split on \n, laid out top-to-bottom.
  • Each line becomes an LTR row with internal ChildWrapping::Text.
  • TextElementConfigWrapMode::Words creates word and spacer children with TextDrawPayload.
  • Newline / None wrap modes keep one fragment per line.

Custom config types must implement CotisLayoutCompatible and TextConfigurable to support text leaves.

§Element state queries

See secondary_traits for debugging and hit-testing hooks on the post-frame cache.

Modules§

secondary_traits
Element-state query trait implementations on CotisLayoutManager.