ScreenplayHtml.h header
#include <ew/app/ScreenplayHtml.h>
Namespace ew::app
ScreenplayRevisionStyle struct
struct ew::app::ScreenplayRevisionStyle
Revision styling for a paged screenplay – how a revised script prints on coloured stock. When label is non-empty each page header carries it (a revision name such as "Rev. Blue"); when pageColor is a non-empty CSS colour each page is tinted with it. Both empty renders the plain white original draft.
Members
QString ew::app::ScreenplayRevisionStyle::label
The revision label shown at the top-left of every page (empty for none).
QString ew::app::ScreenplayRevisionStyle::pageColor
The stock-paper CSS colour tinting every page (empty leaves pages white).
bool operator==(const ScreenplayRevisionStyle &, const ScreenplayRevisionStyle &)=default
Styles compare equal when both fields match.
Functions
QString ew::app::revisionColorStock(const QString &revision)
The light "stock paper" CSS colour for a screenplay revision (the value of the Fountain "Revision" title-page field), following the industry issue order White, Blue, Pink, Yellow, Green, Goldenrod, Salmon, Cherry, Buff. Matches a colour named anywhere in revision, else a numeric revision (0/1 = white) indexed into that order; returns an empty string for the white original or an unrecognized name (the page stays white).
QString ew::app::screenplayHtml(const std::vector< ScreenplayElement > &elements)
Renders elements as an industry-formatted screenplay in HTML: a monospace (Courier) page with each element laid out to convention – scene headings bold and upper-cased, action full width, character cues and dialogue indented, parentheticals indented further, transitions right-aligned, centered text centered, and page breaks as a rule. Structural section headings and synopses are shown dimmed (they are editing aids, not printed script). The HTML is self-contained and suits a preview pane or export. Element text is HTML-escaped.
QString ew::app::screenplayPagedHtml(const std::vector< ScreenplayPage > &pages, const ScreenplayRevisionStyle &revision={}, bool forPrint=false)
Renders pages (from paginateScreenplay) as a paged script: each page carries a top-right page number and the pages are divided by a rule, so the writer sees page breaks, the "(MORE)" / "NAME (CONT'D)" split markers the pagination inserts, and where the script falls on the page. Scene numbering runs continuously across pages. Same Courier styling and escaping as screenplayHtml. revision optionally tints the pages and labels them for a revised draft (see ScreenplayRevisionStyle); the default renders the white original. When forPrint is true, each page after the first starts a new physical page (CSS page-break-before) instead of the on-screen dashed divider, so laying the HTML out onto a QPdfWriter yields one script page per printed sheet; leave it false for a continuous scrolling preview.