PaperForge.Flow (PaperForge v0.5.0)

Copy Markdown View Source

Builder for unified document layout blocks.

Summary

Types

t()

@type t() :: %PaperForge.Flow{blocks: [PaperForge.Layout.Block.t()]}

Functions

custom(flow, fun, options \\ [])

@spec custom(
  t(),
  (PaperForge.Page.t(), PaperForge.PageContext.t() -> PaperForge.Page.t()),
  keyword()
) :: t()

heading(flow, text, options \\ [])

@spec heading(t(), binary(), keyword()) :: t()

image(flow, source, options \\ [])

@spec image(t(), binary(), keyword()) :: t()

keep_together(flow, block)

@spec keep_together(t(), (t() -> t()) | PaperForge.Layout.Block.t()) :: t()

list(flow, items, options \\ [])

@spec list(t(), [term()], keyword()) :: t()

new()

@spec new() :: t()

page_break(flow)

@spec page_break(t()) :: t()

paragraph(flow, text, options \\ [])

@spec paragraph(t(), binary(), keyword()) :: t()

section(flow, section_id, options, fun)

@spec section(t(), atom(), keyword(), (t() -> t())) :: t()

separator(flow, options \\ [])

@spec separator(
  t(),
  keyword()
) :: t()

spacer(flow, height, options \\ [])

@spec spacer(t(), number(), keyword()) :: t()

table(flow, columns, rows, options \\ [])

@spec table(t(), [term()], [[term()]], keyword()) :: t()