% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/flowchart.R
\name{flowchart}
\alias{flowchart}
\title{Create a flowchart object}
\usage{
flowchart(..., default_box_fn = boxGrob)
}
\arguments{
\item{...}{Either a set of [`boxGrob`] objects, text strings, or lists of these.
Text strings will be automatically wrapped in [`boxGrob`] (or `default_box_fn`).}

\item{default_box_fn}{The function to use for converting text/content into a box
(default: [`boxGrob`]).}
}
\value{
A `list` of class `Gmisc_list_of_boxes`.
}
\description{
This function initializes a flowchart object, which is essentially a list of boxes
with the class `Gmisc_list_of_boxes`. It serves as the starting point for the
S3 pipeline, allowing for fluent chaining of [`align`], [`spread`], [`move`],
and [`connect`] operations.
}
\examples{
library(grid)
grid.newpage()

# Create a flowchart with auto-conversion of text
fc <- flowchart(
  start = "Start",
  process = "Process",
  end = "End"
)

# Use the pipeline
fc |>
  align(axis = "y") |>
  connect("start", "process", type = "vertical") |>
  connect("process", "end", type = "vertical") |>
  print()
}
\seealso{
Other flowchart components:
\code{\link[=align]{align()}},
\code{\link[=append]{append()}},
\code{\link[=boxGrob]{boxGrob()}},
\code{\link[=boxHeaderGrob]{boxHeaderGrob()}},
\code{\link[=boxPropGrob]{boxPropGrob()}},
\code{\link{boxShapes}},
\code{\link[=connectGrob]{connectGrob()}},
\code{\link[=coords]{coords()}},
\code{\link[=distance]{distance()}},
\code{\link[=equalizeWidths]{equalizeWidths()}},
\code{\link[=insert]{insert()}},
\code{\link[=move]{move()}},
\code{\link[=moveBox]{moveBox()}},
\code{\link[=spread]{spread()}}
}
\concept{flowchart components}
