% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layouts-class.R
\name{new_dock_layouts}
\alias{new_dock_layouts}
\alias{validate_dock_layouts}
\alias{dock_layouts}
\alias{dock_view}
\alias{is_dock_layouts}
\alias{view_ids}
\alias{active_view}
\alias{active_view<-}
\alias{view_can_crud}
\alias{dock_layouts<-}
\alias{board_views}
\alias{as_dock_layouts}
\title{Dock views (layouts)}
\usage{
new_dock_layouts(...)

validate_dock_layouts(x)

dock_layouts(...)

dock_view(..., active = FALSE)

is_dock_layouts(x)

view_ids(x)

active_view(x)

active_view(x) <- value

view_can_crud(x)

dock_layouts(x) <- value

board_views(x)

as_dock_layouts(x, ...)
}
\arguments{
\item{...}{Generic consistency}

\item{x}{Object}

\item{active}{Logical; mark this view as the initially active one.
At most one view in a \code{dock_layouts()} may be active.}

\item{value}{Replacement value}
}
\value{
\code{dock_layouts()} returns a \code{dock_layouts} object.
\code{dock_view()} returns a list (the view spec) with the \code{active}
attribute set when requested.
\code{is_dock_layouts()} returns a boolean.
\code{active_view()} returns a string and \verb{active_view<-()} returns
the modified \code{dock_layouts} object invisibly.
\code{view_ids()} returns all IDs (block + extension) found in a layout
specification. The \code{view_can_crud()} helper returns \code{FALSE} when the
dock is locked.
}
\description{
A \code{dock_board} always holds a \code{dock_layouts} object (multi-view tabs).
Single-page boards are a degenerate case: one auto-named "Page" view.
Blocks and extensions are shared across views via the board's DAG;
view membership is a layout concern only.
}
\details{
Multiple views are defined via \code{dock_layouts()}, which accepts named
list elements -- each a (possibly nested) list of block and extension
IDs (the same format accepted by \code{create_dock_layout(grid = ...)}).
A view can be marked as the initially active one by tagging its spec
with \code{attr(view, "active") <- TRUE}, conveniently produced by
\code{\link[=dock_view]{dock_view()}}. If no view is tagged, the first one is used. View CRUD
is enabled unless the dock is locked (see \code{is_dock_locked()}).
}
\examples{
# Explicit constructor (first view is active by default)
ly <- dock_layouts(
  Analysis = list("dataset_1", "head_1"),
  Overview = list("dag_extension")
)
is_dock_layouts(ly)
active_view(ly)

# Mark a specific view as initially active
ly2 <- dock_layouts(
  Analysis = list("dataset_1"),
  Overview = dock_view("dag_extension", active = TRUE)
)
active_view(ly2)

}
