Tunable defaults for the dismissal policy. More...
#include <overlay_dismissal.hpp>
Public Attributes | |
| bool | trigger_press_passes_through = true |
| A press that dismisses an open overlay is delivered to the control under it when that control is a DIFFERENT overlay TRIGGER (View::overlay_trigger()), so switching from one dropdown to a sibling costs one press rather than two — the behaviour of the macOS menu bar and of every multi-menu toolbar. | |
| bool | passive_input_outside_overlay_blocked = true |
| While any shown overlay is open, a PASSIVE pointer input — a wheel or two-finger scroll, a trackpad magnify or rotate — at a point outside every shown overlay is dropped (PassivePointerRoute::blocked), the way scrolling elsewhere does nothing while a macOS menu is open. | |
Tunable defaults for the dismissal policy.
One configuration for the process, deliberately: this is a framework default, not per-editor state, and it is read-only on the press path.
| bool pulp::view::OverlayDismissalPolicy::passive_input_outside_overlay_blocked = true |
While any shown overlay is open, a PASSIVE pointer input — a wheel or two-finger scroll, a trackpad magnify or rotate — at a point outside every shown overlay is dropped (PassivePointerRoute::blocked), the way scrolling elsewhere does nothing while a macOS menu is open.
A non-modal popover therefore no longer leaves the content behind it scrollable or zoomable: a user scrolling a menu who drifts off its edge must not zoom the plot underneath. Passive input still never dismisses.
Set false to restore the earlier rule, under which only a MODAL overlay blocked passive input outside it and a non-modal popover let it through to the tree.
| bool pulp::view::OverlayDismissalPolicy::trigger_press_passes_through = true |
A press that dismisses an open overlay is delivered to the control under it when that control is a DIFFERENT overlay TRIGGER (View::overlay_trigger()), so switching from one dropdown to a sibling costs one press rather than two — the behaviour of the macOS menu bar and of every multi-menu toolbar.
Scoped to triggers on purpose. Passing every dismissing press through would mean clicking away from a menu also operates whatever control happens to sit under the click, which is a real hazard rather than a hypothetical one; an overlay that asked to consume its outside click still consumes it everywhere else.
A press on the trigger that opened the overlay is never passed through: that press is a toggle, and delivering it would reopen the menu it closed. See the anchor section above.
Set false to restore strict consume-everywhere dismissal.