Move-only weak cancellation token; owns no callback, widget, tree or router. Destruction/disconnect may run on any thread and prevents future admission. Already admitted delivery keeps its callable and widget alive until return. Tokens may outlive the router. Eligibility and focus retirement are checked on UI, without background polling.
More...
#include <action.hpp>
|
|
| PointerCapture ()=default |
| | Construct an empty disconnected token.
|
|
| ~PointerCapture () |
| | Disconnect without user callbacks or tree access, on any thread.
|
| | PointerCapture (PointerCapture &&other) noexcept |
| | Transfer cancellation responsibility and empty the source.
|
| PointerCapture & | operator= (PointerCapture &&other) noexcept |
| | Disconnect the old token, then transfer; self-assignment is a no-op.
|
|
| PointerCapture (const PointerCapture &)=delete |
|
PointerCapture & | operator= (const PointerCapture &)=delete |
|
void | disconnect () noexcept |
| | Idempotently deny future admission, without cancelling an already admitted call.
|
| bool | connected () const noexcept |
| | Observe cancellation flags without consulting live UI/tree eligibility.
|
|
|
class | EventRouter |
|
struct | detail::PointerCaptureAccess |
Move-only weak cancellation token; owns no callback, widget, tree or router. Destruction/disconnect may run on any thread and prevents future admission. Already admitted delivery keeps its callable and widget alive until return. Tokens may outlive the router. Eligibility and focus retirement are checked on UI, without background polling.
◆ PointerCapture()
| portals::PointerCapture::PointerCapture |
( |
PointerCapture && | other | ) |
|
|
noexcept |
Transfer cancellation responsibility and empty the source.
- Parameters
-
| other | Token to transfer; any thread, without invoking callbacks. |
◆ connected()
| bool portals::PointerCapture::connected |
( |
| ) |
const |
|
nodiscardnoexcept |
Observe cancellation flags without consulting live UI/tree eligibility.
- Returns
- True while capture and its action binding remain connected; false after disconnection, release or router retirement. Use EventRouter::pointerCapture for checked effective eligibility.
- Note
- Any thread; no allocation, callbacks, mutation or tree access.
◆ operator=()
Disconnect the old token, then transfer; self-assignment is a no-op.
- Parameters
-
| other | Token to empty and transfer. |
- Returns
- This token; any thread, without callbacks or tree access.
The documentation for this class was generated from the following file: