Module day
Expand description
When a conversation’s day changes, and the clock each line carries.
One rule, used by both apps: a conversation’s lines are ordered by instant; a day divider appears before the first line of each local day, and never otherwise; and every line can name its own time. A divider carries the day in the person’s language — “Today”, “Yesterday”, the weekday inside the last week, then the date — so a line from three days ago never reads as “14:32” with no day anywhere near it.
The local zone is read once (ConversationClock::local) and threaded
through, so a paint pass cannot straddle two offsets and a test can pin a
zone instead of hoping the machine is in one.
Structs§
- Conversation
Clock - The local zone and “now”, read once per pass.
- Conversation
Day - The local calendar day an instant falls on.
- DayBreaks
- Walks a conversation’s lines and says which of them start a new day.
- DayDivider
DayDividerFaceas a widget, for a list built of widgets: a band across its column with the day’s label at its centre, where a conversation’s day changes.- DayDivider
Face - The day divider: a caption centred in a band, ruled out to both sides.
Functions§
- day_
break_ indices - The indices of
dayswhose day differs from the one before (the first is always included). - line_
height - The height of one line of
roleintheme— what a conversation row reserves for its time or its delivery line.