Functions to dynamically manipulate panels in a dockview instance.
Usage
add_panel(dock, panel, ...)
remove_panel(dock, id)
set_panel_title(dock, id, title)
select_panel(dock, id)
move_panel(dock, id, position)
move_group(dock, from, to, position = NULL)
move_group2(dock, from, to, position = NULL)
set_size(dock, id, size)Arguments
- dock
Dock proxy object created with
dock_view_proxy().- panel
A panel object (for
add_panel). See panel for parameters.- ...
Additional options (currently unused).
- id
Panel ID (character string).
- title
New panel title.
- position
For
move_group()andmove_group2(), placement relative to the destination group: one of "left", "right", "top", "bottom", "center". Formove_panel(), a placement list sharing the vocabulary ofpanel()'sposition: areferencePanelorreferenceGroup(not both) to move next to, adirection(one of "above", "below", "left", "right", "within"), and anindexused only withdirection = "within"to set the tab position in the target group. "above" / "below" / "left" / "right" put the panel in a new group on that side of the reference; "within" drops it into the reference's group. With no reference, the panel moves to a new group at the dock edge indirection.- from
Source group/panel ID (for move operations).
- to
Destination group/panel ID (for move operations).
- size
Target size for a group along its splitview axis, as a fraction between 0 and 1 of that splitview (for
set_size). The other groups in the split keep their relative sizes and share the remaining space. Sizing is best-effort: dockview's minimum group size can clamp a group, in which case the requested fraction is approximate.
Details
set_panel_title(): Sets the title of a panel dynamically.add_panel(): Adds a new panel to the dockviewremove_panel(): Removes an existing panelselect_panel(): Selects/focuses a specific panelmove_panel(): Moves an existing panel next to a reference panel or group, using the samepositionvocabulary aspanel()move_group(): Moves a group using group IDsmove_group2(): Moves a group using panel IDsset_size(): Resizes the group a panel belongs to, as a fraction of its splitview; the other groups in the split keep their relative sizes