TimelineMarkerLayout.h header

#include <ew/app/TimelineMarkerLayout.h>

Namespace ew::app

Functions

std::vector< int > ew::app::timelineMarkerLabelRows(const std::vector< int > &positions, const std::vector< int > &widths)

Assigns each marker label a stacking row so their labels never overlap horizontally (TL-19). Each label occupies the pixel span [position, position + width]; labels are considered left-to-right and each is placed on the lowest row whose previous label has already ended. positions and widths are parallel (marker order); the returned vector is parallel too – rows[i] is marker i's 0-based label row. Extra entries in the longer vector are ignored; an empty input yields an empty result. Pure: the caller supplies pixel positions, so the view is not needed to test it.