% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paintr-options.R
\name{ptr_options}
\alias{ptr_options}
\title{Get or Set ggpaintr Package Options}
\usage{
ptr_options(...)
}
\arguments{
\item{...}{Named logical arguments — one per setting to update. Setting
names must match the registry above.}
}
\value{
When called with no arguments, a named list of all current setting
values. When called with named arguments, the previous values of the
updated settings, returned invisibly.
}
\description{
Combined getter/setter for ggpaintr's global settings, modeled after base
\code{\link[base:options]{base::options()}}. Calling with no arguments returns all current settings
as a named list. Passing one or more named logical arguments sets those
settings and invisibly returns the previous values, suitable for the
\code{do.call(ptr_options, old)} round-trip pattern used by
\code{withr::with_options()} and \code{on.exit()}.
}
\section{Available settings}{


\describe{
\item{\code{verbose}}{
Logical. When \code{TRUE}, ggpaintr emits informative messages such as
"Layer foo() removed (no arguments provided)." Default \code{FALSE} —
these messages are intended for debugging the formula pipeline and
are off by default. Underlying option: \code{options(ggpaintr.verbose = ...)}.
}
\item{\code{gate_draw}}{
Logical. When \code{TRUE} (the default), the rendered plot updates only
when the user clicks the "Update plot" button — every placeholder
change is batched until the click. When \code{FALSE}, the button is
omitted from the UI and the plot re-renders reactively on every
placeholder change (live mode). Read once when the app is built, so
set it before calling \code{\link[=ptr_app]{ptr_app()}} / \code{\link[=ptr_ui]{ptr_ui()}}. Underlying option:
\code{options(ggpaintr.gate_draw = ...)}.
}
\item{\code{suppress_warnings}}{
Logical. When \code{TRUE}, R warnings emitted while the plot is drawn
(e.g. \code{loess} fit warnings such as "all data on boundary of
neighborhood" or "Failed to fit group N") are silenced rather than
printed to the console. Default \code{FALSE} — warnings surface as usual.
Only the plot-drawing step is wrapped; errors still propagate to the
inline error pane. Read once when the app is built, so set it before
calling \code{\link[=ptr_app]{ptr_app()}} / \code{\link[=ptr_ui]{ptr_ui()}}. Underlying option:
\code{options(ggpaintr.suppress_warnings = ...)}.
}
}
}

\examples{
# Inspect current values
ptr_options()

# Silence the "Layer ... removed" notice for one block
old <- ptr_options(verbose = FALSE)
on.exit(do.call(ptr_options, old), add = TRUE)
}
