Manipulate edge groups, that is groups pinned to one of the four edges of a dock, from the server. See https://dockview.dev/docs/core/groups/edgeGroups.
Usage
add_edge_group(dock, edge_group)
remove_edge_group(dock, position)
set_edge_group_collapsed(dock, position, collapsed)
set_edge_group_visible(dock, position, visible)
set_edge_group_size(dock, position, size)Arguments
- dock
Dock proxy object created with
dock_view_proxy().- edge_group
An edge group object created with
edge_group().- position
Edge position. One of
"left","right","top","bottom".- collapsed
Whether the edge group should be collapsed.
- visible
Whether the edge group should be visible.
- size
Target size of the edge group, as a fraction between 0 and 1 of the dock's width (left and right rails) or height (top and bottom ones).
Details
add_edge_group(): pins a new edge group to the requested edge.remove_edge_group(): removes the edge group pinned toposition, disposing of the panels it holds.set_edge_group_visible(): shows or hides the edge group atpositionwithout removing it. An invisible rail renders at zero and keeps whatever collapsed state it had.set_edge_group_collapsed(): collapses the edge group atpositionto itscollapsed_size, or expands it again. A collapsed rail keeps its header strip standing, which is what distinguishes it from an invisible one. This is the server-side equivalent of the user gesture, a click on the rail's active tab.It is the only route to the collapsed state of a dock that is already running. The state can also be declared two other ways, neither of which needs this:
edge_group(collapsed = TRUE)at construction, and theedgeGroupsentry of a payload handed torestore_dock(), which carriescollapsedbesidesizeandvisibleand is honoured on restore.set_edge_group_size(): resizes the edge group atpositionalong its own axis, tosizeof the dock: of its width for a"left"or"right"rail, of its height for a"top"or"bottom"one. A fraction rather than pixels, as forset_size(), since the server does not know how large the dock is. It is converted to pixels when the call lands, and the rail then holds that width as the dock resizes, as rails do. dockview clamps it to the rail'sminimum_size/maximum_sizeand to the space available. On a collapsed rail the size is the one it expands to.
Read either state back with is_edge_group_visible() and
is_edge_group_collapsed(), and the size, in pixels, from
get_edge_groups().