Expand description
The panel menu: one context menu for a panel wherever it is, docked
(its tab, which egui_stack opens), floating (its title and its tabs)
or detached (its window’s tabs).
It is a declared menu
(MENU_PANEL), its entries made when it opens by list providers that
read where the panel is, each running a workbench command with the
panel in its arguments:
- docked: Move to each area its rules allow, and Float when it may;
floating or detached: Dock back (where it floated from); floating:
Dock in each side bar and the bottom panel (
palette.dock); - Detach into a window; Move to window ▸ (the detached windows, by their panels’ titles); Move group to window ▸ (its tab group whole, to a window or a new one);
- Move to group ▸ (the docked tab groups, by their panels’ titles);
- Zen this panel: the panel alone, full size, in its window
(
workbench.zenwith the panel); - Close.
A floating panel’s menu opens through crate::menus::context_menu,
so it is a pop.popup.open on the bus like every context menu.
A tab group has two more ways to open a panel in it, both asking
pop.panel.open with here (the workbench.panel.open command):
- the group menu (
MENU_GROUP, a right click on the empty part of its tab bar): Open panel ▸, every panel its place allows that is not one of its tabs, an open one moving there; - the “+” at the end of its tab bar
(
DockControls::add_buttons): the closed panels its place allows (MENU_GROUP_ADD).
Both list first “New <panel>” for each panel declared with several
instances its place allows (pop.panel.open with instance: "new").
The same entries, opening where the panel’s area is, are the list
LIST_NEW_INSTANCES, in the View menu and for an application’s own
Window menu (MenuItem::list).
Constants§
- CMD_
PANEL_ CLOSE - Closes a panel (
panel). - CMD_
PANEL_ DETACH - Moves a panel into a window of its own (
panel;group: its tab group whole). - CMD_
PANEL_ DOCK_ BACK - Docks a floating or detached panel back where it floated from
(
panel). - CMD_
PANEL_ FLOAT - Floats a docked panel, where its area is (
panel;group: its tab group whole). - CMD_
PANEL_ MOVE - Docks a panel in an area (
panel,area). - CMD_
PANEL_ MOVE_ TO_ GROUP - Docks a panel in the tab group holding
group(panel,group). - CMD_
PANEL_ OPEN - Opens a panel through
pop.panel.open(panel;place:last, the default,hereor an area’s name;group: a panel of the tab groupheremeans, else the focused panel’s). - CMD_
PANEL_ PICK - “Open panel…”: a quick pick in the command palette of every declared
panel (and “New
<panel>” for those declared with several), the chosen one opened where it was (workbench.panel.open,place: "last").Ctrl+Shift+O. - LIST_
NEW_ INSTANCES - “New
<panel>” for each panel declared with several instances, opening a new one in the panel’s area: in the View menu, and for an application’s Window menu. - MENU_
GROUP - A tab group’s menu (
args.group: a panel of the group): Open panel ▸. - MENU_
GROUP_ ADD - The menu under a tab bar’s “+” (
args.group): the closed panels that may open in the group. - MENU_
GROUP_ OPEN - Its submenu listing the panels that may open in the group.
- MENU_
PANEL - The panel menu (
args.panel: the panel it acts on). - MENU_
PANEL_ GROUPS - Its submenu listing the docked tab groups the panel may join.
- MENU_
PANEL_ GROUP_ WINDOWS - Its submenu moving the panel’s tab group into a window.
- MENU_
PANEL_ WINDOWS - Its submenu listing the detached windows the panel may join.
Functions§
- context_
menu - Opens the panel menu on a widget’s secondary click (or Shift+F10 and
the
Menukey while it has the focus), as a context menu: a floating panel’s title, a tab of a floating group. - menu_
args - The menu’s arguments for a panel: the panel, and which submenus have
entries (
has_windows,group_moves,has_groups). - panel_
pick - “Open panel…”’s quick pick: “New
<panel>” for each panel declared with several instances, then every declared panel by title, each opening where it was.