ui::Window¶
Header: winui/ui/Window.hpp.
The logical, platform-independent window: the root of a UI tree. It owns its content (and an open modal), lays it out, routes pointer, key and text input, owns keyboard focus and the Tab ring, shows popups and tooltips, and emits render commands, all without needing an OS window.
The app owns it, usually as a local in main(). ui::run(window) and show() create the OS window for it from its WindowOptions and install its host, renderer and text measurer. Closing destroys the OS window and leaves the Window a valid object that can be shown again. Everything window-level the app configures (title, WindowStyle, backdrop, icon, system menu, taskbar state) is stored here and applied once the OS window exists, so it can be set before or after show(). The first control that can take keyboard focus gets it when the window is activated. The window's actual state (state(), active(), visible(), caption_insets()) is written only by the host. The app asks for a change through request_state() and similar functions and binds to the result.
Single-owner: set_content() and show_modal() take a std::unique_ptr (or a ui:: spec) and hand back a non-owning observer. Not copyable or movable. UI-thread only, except post() and ref().
Example:
int main()
{
ui::Window window{{.title = "Demo", .size = {480, 320}}};
ui::Property<int> clicks{0};
bool unsaved = false;
window.set_content(ui::VerticalStack{
.spacing = 12.0f,
.content = {
ui::Text{.text = ui::bind(clicks, [](int n) { return std::format("Clicks: {}", n); })},
ui::Button{.text = "Click me", .on_click = [&] { ++clicks; unsaved = true; }},
},
});
window.on_closing([&] { return unsaved ? ui::Cancel : ui::Proceed; });
return ui::run(window);
}
Window¶
A window with no content and no OS window yet, Theme::light(), state() Normal. options is what it will be created with; its title, style, backdrop, chrome, system menu and size limits become the Window's own properties right away.
~Window¶
Destroys the OS window too, if the window is still shown. Not from inside one of this window's own handlers: call close() there instead.
Window¶
operator=¶
set_content¶
template <typename T>
T* set_content(std::unique_ptr<T> content, std::source_location where = std::source_location::current())
Take ownership of the content element and return a non-owning observer to it, valid until the content is replaced or the window destroyed. Replacing content drops focus, entered focus scopes, open popups and any open modal, since all of them pointed into the old tree, and bumps content_generation(). The next layout() lays the new tree out. A null content leaves the window empty.
Safe to call from a handler inside the content being replaced (a page's own "Next" button): the old tree is destroyed once the input or tick that ran the handler has returned.
where is for the thread check (ThreadCheck.hpp); leave it defaulted.
set_content¶
template <ui::SpecLike S>
Element* set_content(S&& spec, std::source_location where = std::source_location::current())
The declarative overload: hand set_content() a spec (or a ui::Spec returned from a component function), e.g. window.set_content(ui::VerticalStack{.spacing = 12, .content = {...}}), and the window takes the tree it builds.
It returns Element*, since the spec's type is erased by the time it gets here. A spec's .control field gives a typed observer to any node inside the tree.
content¶
The root of the content tree (non-owning), or nullptr before set_content().
show_modal¶
template <typename T>
T* show_modal(std::unique_ptr<T> dialog, std::source_location where = std::source_location::current())
Show dialog modally over the content, taking ownership, and return a non-owning observer valid until close_modal() takes effect. DialogControl is the usual one.
The modal is owned separately from the content and from popups opened with Element::open_popup(). An outside click doesn't dismiss it. While it is open, all pointer and key input goes to it and the Tab ring covers only the modal. Focus goes to the dialog's Element::default_focus() if that is in its ring, else its first stop, and is restored to whatever had it before once the modal closes (if that element is still in the tree). Showing a new modal replaces an open one, also from a handler of the open one; a null dialog closes the open one. where is for the thread check.
show_modal¶
template <ui::SpecLike S>
Element* show_modal(S&& spec, std::source_location where = std::source_location::current())
The declarative overload, mirroring set_content()'s: builds spec (typically a ui::Dialog) and shows the result modally. Use the spec's .control for a typed observer.
close_modal¶
Close the open modal and restore the focus it interrupted. No-op if no modal is open. A DialogControl closes itself, so this is for closing one from outside; its on_closed() then reports DialogResult::None. Safe to call from a callback inside the modal, such as a button's on_click. The modal is destroyed at the start of the next input dispatch or layout(), after that callback has returned.
has_modal¶
Whether a modal is open (a close_modal() still pending counts as open).
modal¶
The open modal (non-owning), or nullptr.
content_generation¶
A counter bumped by set_content()/show_modal()/close_modal(), every point that can destroy part of the tree while the Window itself survives. Code that holds an Element* across calls, such as the accessibility provider, records the generation it saw and stops using the pointer once the counter has changed.
visual_tree¶
The compact, data-oriented shape of the tree (stable VisualIds, dirty flags) as of the most recent layout() call; empty before the first one. Built when asked for, not by every layout pass.
layout_pass_count¶
How many times layout() has run measure and arrange. A layout() call that finds nothing dirty skips the pass and doesn't count. Useful for checking that invalidation works.
layout_size¶
The client size, in DIPs, passed to the most recent layout(); zero before the first. WindowOptions::size is the size asked for at creation.
theme¶
The theme every control in the tree measures and draws with. Theme::light() until the host reports the OS theme state, then the one resolved from theme_request(), unless the app pinned one with pin_theme().
pin_theme¶
Pins theme: the window keeps it through OS theme changes (dark mode, accent color, contrast themes) until set_theme() hands the choice back. Bumps theme_revision(), so the host re-applies the frame colors and dark-mode caption. Takes effect on the next layout()/render(). A theme with Theme::animations_enabled off has its animation durations zeroed here, as resolve_theme() does.
theme_request¶
What the theme is resolved from; WindowOptions::theme until changed. The window re-resolves it whenever the OS theme state changes, unless pin_theme() pinned a theme.
set_theme¶
Resolves the theme from request against the OS theme state last reported, and keeps following it. Unpins a theme set with pin_theme().
theme_pinned¶
Whether pin_theme() pinned the current theme.
theme_revision¶
Bumped by every pin_theme(). The host checks it to notice a theme change the app made, such as a dark mode toggle, and then updates what the OS draws for the window: the caption colors from Theme::chrome and the light or dark system backdrop.
state¶
The state the window is in, never the one last asked for. Only the host writes it (report_state()), so it is const here; bind to it as usual:
ui::Button{
.text = ui::bind(window.state(), [](ui::WindowState s) {
return std::string{s == ui::WindowState::Fullscreen ? "Exit full screen" : "Full screen"}; }),
.on_click = [w = &window] { w->toggle_fullscreen(); },
}
restores_to¶
The state restore() would land in now: what Minimized or Fullscreen goes back to (Maximized, Normal, or Fullscreen for a window minimized from full screen), Normal from Maximized and from Normal. Written by the host with state(); bind to it for a caption button:
ui::Button{
.text = ui::bind(window.restores_to(), [](ui::WindowState s) {
return std::string{s == ui::WindowState::Maximized ? "Restore to maximized" : "Restore"}; }),
.on_click = [w = &window] { w->restore(); },
}
request_state¶
Ask the host for a state. The answer arrives later through state(), and may be a refusal. Without an OS window it becomes options().initial_state, what the next one is shown in.
restore¶
Back to what was there before Minimized or Fullscreen, or Maximized to Normal. Without an OS window, options().initial_state goes back to Normal.
toggle_fullscreen¶
Fullscreen, or back out of it to the state it was entered from (the F11 idiom).
close¶
Close the window as its close button would, so on_closing() can still veto it. The one way out of a Frame::None window. No-op without a host.
force_close¶
Close the window without asking on_closing(), otherwise as close(). The way to finish a close that on_closing() held back until the user confirmed it:
bool unsaved = false; // set by the app's edits
window.on_closing([&] {
if (!unsaved)
return ui::Proceed;
window.show_modal(ui::Dialog{
.title = "Save changes?",
.primary = {.text = "Save"},
.secondary = {.text = "Don't save"},
.close = {.text = "Cancel"},
.on_closed = [&](ui::DialogResult result) {
if (result == ui::DialogResult::Primary)
save();
if (result != ui::DialogResult::Close)
window.force_close();
},
});
return ui::Cancel;
});
on_closing¶
Asked before the window closes, however that was requested (close button, Alt+F4, the taskbar, close()); return ui::Cancel to keep it open. One slot; empty, or a handler that returns nothing, lets the close through.
on_closed¶
Called once as the window goes away, while this Window and its tree still exist. It's the place to stop and join worker threads that post() to it: post() drops its work from here on, until the window is shown again. The Window object itself stays valid after it closed; it is the app's to destroy.
on_theme_changed¶
Called after the theme was resolved again: the OS switched dark mode, accent color or contrast, or set_theme() or pin_theme() asked for another. theme() is the new one, which may equal the old. For colors an app works out itself, such as a syntax highlighter's palette.
end_menu_access¶
Gives keyboard focus back to where it was before Alt, F10 or an Alt+letter moved it to a menu bar (Element::take_menu_access()). A menu bar calls it on Escape and after running an item. False, and nothing changes, when focus didn't get there that way.
placement¶
The placement to persist (WindowPlacement): where the window is, or where it was when it closed. Nullopt before the window was first shown. Read it after ui::run() returns and hand it back through ui::WindowOptions::placement on the next run.
move¶
Move the outer top-left. Without an OS window it becomes options().position, where the next one is created. A non-finite position is ignored.
resize¶
Resize the client area, the room the content gets; the frame comes on top. A maximized, minimized or full-screen window stays as it is and takes the size when restored. Without an OS window it becomes options().size, what the next one is created with. A negative, infinite or NaN size is ignored.
bounds¶
The window's position and size, as one rect; nullopt without a host.
work_area¶
The work area of the display the window is mostly on; nullopt without a host.
show¶
Shows a hidden window and brings it to the front with focus. visible() follows once the host reports it.
show_inactive¶
Shows a hidden window without activating it: it stays behind the active window, and focus stays where it is.
options¶
What the OS window is created with. title, style, backdrop, chrome, system_menu, min_size and max_size were read by the constructor, so writing them here does nothing: change those with set_title(), set_style(), set_backdrop(), set_chrome(), set_system_menu() and set_size_limits(). The other fields are read when the OS window is created, so they are writable until then; a change after the window was shown only takes effect the next time it is created.
options¶
The same, read-only.
native_handle¶
The operating system's handle of this window (an HWND on Windows), or null while it has none: before ui::run() or show() created it, and after it closed. For the OS calls libwinui does not wrap.
hide¶
Takes the window off the screen, the taskbar and Alt+Tab, and keeps it, its tree and its state for the next show().
visible¶
Whether the window is shown. Host-written, like state(); false until a host reports the window shown.
is_open¶
Whether the window is open: true from the moment ui::run() or show() created it until it closes, hidden or not. Host-written, like visible(), so it can be bound, a menu item's check mark following whether a tool window is open.
activate¶
Brings the window to the front, with focus.
set_size_limits¶
The minimum and maximum client sizes the user can drag the window to. Zero on an axis leaves it unconstrained; not applied while full screen.
min_size¶
The minimum client size last given to set_size_limits(), in DIPs (zero: none).
max_size¶
The maximum client size last given to set_size_limits(), in DIPs (zero: none).
active¶
Whether this is the foreground window, which a TitleBar dims itself by. Host-written; false until a host reports the window activated.
external_drag¶
Whether a drag from another app (files from Explorer, text from a browser) is over this window: true from when it enters until it leaves or drops, whichever drop target inside it the pointer is over. For drop zones that show only while something is dragged in; what is dragged is external_drag_data().
Example:
ui::Border{
.visible = ui::bind(window.external_drag()),
.content = ui::Text{.text = "Drop PDF files here"},
};
scale¶
Device pixels per DIP on the monitor the window is on: 1 at 100 %, 1.5 at 150 %, 2 at 200 %. Host-written, and it changes when the window moves to a monitor with another scale; 1 until a host reports one. For an image decoded at the size it is shown at, in pixels.
Example:
external_drag_data¶
What the drag from another app over this window carries, while external_drag() is true; nullptr otherwise. Valid until the drag leaves or drops.
caption_insets¶
The caption space an extended title bar must leave alone (CaptionInsets). Host-written; all zero unless WindowStyle::extend_content_into_title_bar is on.
title¶
The caption and taskbar text. Seeded from ui::WindowOptions::title at creation.
set_title¶
Stores the title and pushes it to the host if one is installed.
style¶
The frame the window is drawn with (WindowStyle). Seeded from ui::WindowOptions::style at creation.
set_style¶
Applied live by the host; while full screen it is only remembered for the way back. Edit a copy of style() and hand it back.
backdrop¶
The system backdrop (ui/WindowStyle.hpp's Backdrop). Seeded from the host's options at creation (ui::WindowOptions::backdrop) and applied live by the host afterwards.
set_backdrop¶
A request the theme or the system can decline (see Backdrop); pushed to the host at once.
chrome¶
This window's own frame colors and corners (ChromeOverrides), merged over the theme's ChromeHints by the host. Seeded from ui::WindowOptions::chrome.
set_chrome¶
Replace this window's frame overrides; applied live by the host.
hit_region_at¶
Classify a window-client point for a host that lets content stand in for the caption (a Frame::Borderless, Frame::None or Frame::Themed window, or content extended into the title bar): Caption where a press should drag the window, a caption button or the system menu over a frame the theme draws, Client everywhere else. Asks the content tree through Element::hit_region(); an open modal or popup is always Client.
cursor_at¶
The pointer cursor at a window-client point. Starting at the innermost element under the point (in the topmost open popup, the modal, or the tree) and walking up its parents, the first element that asks for a cursor decides, through set_cursor() and then its own cursor_at(). The arrow is the default. While the left button is held, the cursor found at the press stays, since the pressed element has the pointer captured. During a drag, the arrow shows over a target that accepts it and the no-entry sign elsewhere. The host asks whenever the OS needs a cursor and after each pointer event.
icon¶
The icon set with set_icon() or seeded from ui::WindowOptions::icon, or nullopt, which shows the executable's first icon resource (or the system's default without one).
set_icon¶
The caption and taskbar icon; nullopt goes back to the default one.
system_menu¶
The app's own system-menu entries, in the order set. A toggle's or radio item's is_checked() is its current state.
set_system_menu¶
Replaces the app's system-menu entries. Call again to change a check mark.
The entries are the same ui::MenuItem a menu takes, at the top level only: the OS menu shows the text, the check mark of a toggle or radio item, the disabled state and the separators, and drops icons, shortcuts and submenus. A pick invokes the item as a menu click would (a toggle flips, a radio item checks), and a bound field updates the entry live.
taskbar_progress¶
The taskbar button's progress bar. App-written, unlike state(): nothing can refuse it, so it is an ordinary Property. Write it, or drive it from a binding of your own.
taskbar_overlay¶
The badge over the taskbar button, or nullopt for none (set_taskbar_overlay()).
taskbar_overlay_description¶
What a screen reader announces for taskbar_overlay().
set_taskbar_overlay¶
A badge over the taskbar button (an unread count, a status dot); nullopt removes it. description is the badge's accessible text.
request_attention¶
Flash the taskbar button until the window is brought to the front or cancel_attention() is called. On a window already in front that is at once, so there is nothing to see; ask when active() is false, e.g. when work finishes in the background.
cancel_attention¶
Stop the flashing request_attention() started.
thumbnail_buttons¶
The taskbar thumbnail's buttons as last set (ThumbnailButton).
set_thumbnail_buttons¶
Up to seven buttons under the taskbar thumbnail. The OS fixes the set on first use; a bound field, or a command's state, updates its button live, and a call with the same number of buttons replaces them (ThumbnailButton).
layout¶
Measures and arranges the content across a client sized area (or centered at its desired size, see set_stretch_content()), then refreshes the focus ring, since the set of controls may have changed.
Does nothing while state() is Minimized. A minimized window has a 0x0 client area, and laying out at that size would only collapse the tree until it is restored.
set_parallel_layout¶
Let layout() measure large batches of independent siblings on worker threads (see ParallelLayout). On by default; {.enabled = false} keeps every measure on the UI thread. The layout is the same, bit for bit, either way.
parallel_layout¶
The parallel layout options set_parallel_layout() last set.
set_stretch_content¶
Arrange the content at the whole client size, where its own alignment and max size place it. On by default. Off centers the content at its desired size instead.
stretch_content¶
Whether the content is arranged at the whole client size (see set_stretch_content()).
set_background¶
What the host fills the client area with before drawing the content, over the theme's colors.background; nullopt goes back to that. Not drawn while a system backdrop is on, which the host leaves transparent. A tray flyout uses it for the shell's flyout surface.
background¶
The effective client background: set_background()'s color, else the theme's colors.background.
render¶
Emit render commands for the whole window, bottom to top: the content tree, connected animations, the popup layer (tooltips included), then an open modal. Does not paint background(); the host fills the client area first. Call after layout().
render¶
render() for a frame that only repaints clip (window-client DIPs), one of the rects take_damage() returned: an element that drew nowhere near it last frame, and has not changed since, is skipped. Clipped to clip through the renderer; the host fills clip first.
take_damage¶
What has to be painted again since the last call: the areas, in window-client DIPs, where the next frame differs from the last one (another color, text or place, gone or new). Elements don't have to mark themselves for this. Empty when nothing visible changed, and the whole client area for the first frame and after a change of size or background. Call after layout(), once per frame, right before rendering those areas with render(renderer, clip).
connected_animation_service¶
The window's connected animations (ui/ConnectedAnimation.hpp), drawn above the tree and below the popups.
tick¶
Advances elapsed time by delta, driving every control's tick_override(), such as a tooltip's hover delay. The host calls this from its timer, so the window itself never reads a real clock. Returns whether the tree became dirty, so the caller knows whether to repaint.
wants_ticks¶
Whether the last tick() found the window busy with time: something changed in it, an element called request_tick(), work was posted, a drag or a connected animation runs, or an on_tick() handler is set. A host that has seen no busy tick for a while stops ticking, so an idle window doesn't keep waking the process. A pending after() or every() timer, a tip waiting out its delay and an Element::request_tick_in() don't make it busy, and next_wake() says when to tick for them. Neither does a change made only by such a timed step (a caret blink, an image's next frame), as long as nothing else was marked dirty since the last tick.
next_wake¶
How long until the window has to tick again, in tick() time, or 0 when that is overdue. It's the earliest of a pending after() or every() timer, the delay of a tip set with Element::set_tool_tip(), and a wait an element asked for with Element::request_tick_in() in the last tick() or frame. Nullopt when none of them is pending. A host ticks the window once at that time and not while it waits.
on_tick¶
The app's own per-frame hook, so polling something (a worker's progress, a file watcher) doesn't take a custom Element just to get a tick_override(). Called at the start of every tick(), before the controls' own tick_override(), with the same delta. There is no fixed rate. The window ticks after every input or system event it handles and at least every 100 ms while idle. One slot, like on_key_preview(); an empty handler removes it.
after¶
Runs fn once on the UI thread, delay from now, on the window's clock (tick()). The returned Subscription owns the timer, and the timer ends with it: destroying or reset()ting it cancels the call, so keep it for as long as the call should still happen. A Subscription left unstored is destroyed at once and the call never runs; for a call that needs no canceling, use post_after(). It runs on the first tick at or after its time, which while the window is otherwise idle comes at least every 100 ms. Time keeps running while the window is hidden or minimized; a closed window does not tick.
Example:
using namespace std::chrono_literals;
ui::Property<bool> saved{false};
ui::Subscription hide_saved;
ui::Button{.text = "Save", .on_click = [&] {
saved = true;
hide_saved = window.after(2s, [&] { saved = false; }); // a second click starts over
}};
post_after¶
Runs fn once on the UI thread, delay from now, as after() does, with nothing to keep: the call cannot be canceled. It is dropped without running when the window closes first, and on a window that is closed already. Called on the UI thread, like after(); a worker thread hands work over with post().
Example:
using namespace std::chrono_literals;
const std::string link = "https://example.com/notes/42";
ui::Property<std::string> status;
ui::Button{.text = "Copy", .on_click = [&] {
ui::clipboard().set_text(link);
status = "Copied";
window.post_after(2s, [&] { status = ""; });
}};
every¶
Runs fn on the UI thread every interval, first one interval from now, until the returned Subscription is destroyed or reset(). A late tick runs it once, not once for every interval it missed, and the next run is an interval after that. An interval of zero runs it on every tick.
Example:
using namespace std::chrono_literals;
ui::Property<int> seconds{0};
ui::Subscription clock = window.every(1s, [&] { ++seconds; });
add_command¶
Makes command's .shortcut fire while this window has focus, whether or not a button or menu item offers the command, until the returned Subscription is destroyed or reset(). A key the focused control or a shortcut of an area around it takes never reaches it. The command runs only while it is enabled, with an empty parameter.
Example:
ui::Command open{.text = "Open", .shortcut = ui::Ctrl + ui::Key::O, .execute = [&] { open_file(); }};
ui::Subscription keep_open = window.add_command(open);
post¶
Run work on the UI thread at the start of the next tick(), ahead of the on_tick() hook. Unlike every other member, this one may be called from any thread. It is how a worker hands its result back without the app polling for it:
std::thread([home = window.ref(), path] {
auto image = decode(path);
home.post([image = std::move(image)]() mutable { show(std::move(image)); });
}).detach();
The thread holds a WindowRef, so work it posts after the window is gone is dropped and never reaches a destroyed object.
The host is woken, so the work doesn't wait for the idle timer.
Work posted after the window closed, or still queued then, is dropped without running. Dropped work is destroyed outside the window's lock: by the posting thread when post() refuses it, by the UI thread as the window closes when it was still queued, so its destructor may post again.
As a member, this needs the Window to exist: called on a destroyed one it is undefined behavior. A worker that can outlive the Window posts through ref() instead (WindowRef::post()), which drops the work once the Window is gone, as co_await ui::on_ui_thread(window.ref()) does.
The UI thread is the one that constructed the Window; a build with thread checks (ThreadCheck.hpp) reports any other member called from another thread.
ref¶
A weak handle to this Window for a worker that may outlive it: its WindowRef::post() is post() while this Window exists and drops the work once it is destroyed, also when another Window was built at the same address since. Callable from any thread while the Window exists.
on_key_preview¶
A window-wide shortcut: handler sees every key before Tab handling, focus scopes and the focused element do, and returns ui::Handled to consume it. It watches keys pass by, so a handler that returns nothing lets every key go on. One slot, for the app, such as an F11 full-screen toggle:
window.on_key_preview([w = &window](const ui::KeyEvent& e) {
if (e.key != ui::Key::F11 || e.action != ui::KeyAction::Down) return ui::NotHandled;
w->toggle_fullscreen();
return ui::Handled;
});
focus_content¶
Focus the first stop in the tab ring. The window does this on its own when it is first activated, so call it only to send focus back to the start later on.
focus_next¶
Advance focus to the next stop in the ring (wraps), as Tab does.
focus_previous¶
Retreat focus to the previous stop (wraps), as Shift+Tab does.
blur¶
Clear focus: no element has it afterwards.
focus¶
Move keyboard focus to element, or, when it takes no focus itself (a panel, a view's host), to the first stop of the tab ring inside it. False, and focus stays where it was, when neither is a stop in this window right now: hidden, disabled or in another window. The same as Element::focus().
push_focus¶
focus() that remembers what had focus, for a view that takes the keyboard while it is open (a page view over a list): pop_focus() gives focus back. False, and nothing is remembered, when focus() could not move focus.
Example:
void show_page(ui::Element& page_view)
{
window.push_focus(page_view); // opening the view
// ...
window.pop_focus(); // closing it: back to the thumbnail that had focus
}
pop_focus¶
Give focus back to what had it at the last push_focus() that is not yet popped. False when nothing was pushed, or what had focus is gone or no longer a stop; focus then stays put.
suspend_focus¶
The host window lost keyboard focus: clear focus, remembering which stop had it.
restore_focus¶
The host window got keyboard focus back: refocus the stop suspend_focus() remembered if it is still in the ring, otherwise the first stop, as focus_content() does.
focused¶
The element with keyboard focus (non-owning), or nullptr.
caret_bounds¶
Where text typed now would go: the focused element's Element::caret_bounds(), in client DIPs, or nullopt. The backend keeps an input method's candidate window and the emoji panel there.
focus_element¶
Focuses e if it is in the tab-focus ring and returns true. Otherwise does nothing and returns false. Unlike focus(), it doesn't look for a stop inside e. Accessibility clients set focus through it.
enter_focus_scope¶
Step into scope, making its own inner ring the tab ring until the matching exit: Tab then cycles only within it and Escape steps back out onto scope itself. Refuses (returns false, changing nothing) unless scope is a focus scope sitting in the current ring with a non-empty inner ring of its own, which lets the key that would have entered fall through to the element's ordinary handle_key() instead. Scopes nest: entering one inside an entered scope pushes onto the stack.
exit_focus_scope¶
Step back out of the innermost entered scope, restoring focus to the scope element. Returns false when no scope is entered.
entered_focus_scope¶
The innermost entered scope, or nullptr when the tab ring is the whole tree.