ScreenplayPagination.h header
#include <ew/app/ScreenplayPagination.h>
Namespace ew::app
ScreenplayPage struct
struct ew::app::ScreenplayPage
One paginated page of a screenplay: its 1-based number and the elements printed on it. When a speech is split across a page boundary the page carries the synthetic "(MORE)" foot marker and the following page a repeated "NAME (CONT'D)" cue, so a page's elements are print-ready rather than a raw slice of the input.
Members
int ew::app::ScreenplayPage::number = 1
The 1-based page number.
std::vector<ScreenplayElement> ew::app::ScreenplayPage::elements
The elements printed on this page, in order.
std::vector<bool> ew::app::ScreenplayPage::revised
Parallel to elements: true where that element is a revision (changed since the last marked draft), so the renderer can flag it with a change mark. All false unless paginateScreenplay was given revision flags; the synthetic "(MORE)" / "(CONT'D)" markers are never flagged.
bool operator==(const ScreenplayPage &, const ScreenplayPage &)=default
Pages compare equal when all fields match.
Functions
std::vector< ScreenplayPage > ew::app::paginateScreenplay(const std::vector< ScreenplayElement > &elements, int linesPerPage=55, const std::vector< bool > &revised={})
Breaks elements into pages the way a standard US-Letter, 12-pt Courier screenplay paginates: about linesPerPage text lines per page (55 by default), each element measured at its industry column width (action full width, dialogue and parentheticals indented). A forced page break (===) ends a page; structural sections and synopses are editing aids and are not counted. A speech that would cross a page boundary is split with a "(MORE)" at the foot and the character cue repeated as "NAME (CONT'D)" atop the next page; a scene heading or character cue that would be orphaned as a page's last line is pushed to the next page. revised, when non-empty, is parallel to elements (see revisedElements) and is carried onto each page's revised flags so changed lines can be marked. Returns the pages in order – always at least one, even for empty input. linesPerPage below 1 falls back to the default.
int ew::app::screenplayPageCount(const std::vector< ScreenplayElement > &elements)
The number of pages elements occupies – the script's length in pages, which for a screenplay is roughly its running time in minutes. Equivalent to paginateScreenplay(elements).size().