Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::ui::KeyBindingRef Class Reference

Deferred observing slot, published only by a complete successful registration. Construction may allocate; copies never own a scene or action. More...

#include <key_binding.hpp>

Public Member Functions

 KeyBindingRef ()
 Create an unpublished slot; may throw std::bad_alloc.
std::expected< KeyBindingId, ManagedError > id () const
std::expected< void, ManagedError > setEnabled (bool value, std::source_location origin=std::source_location::current()) const
std::expected< void, ManagedError > setVisible (bool value, std::source_location origin=std::source_location::current()) const
std::expected< void, ManagedError > setText (TextValue label, TextValue description, KeyTextResolver resolver={}, std::source_location origin=std::source_location::current()) const
std::expected< void, ManagedError > rebind (const KeySelection &selection, std::source_location origin=std::source_location::current()) const
std::expected< void, ManagedError > unbind (std::source_location origin=std::source_location::current()) const
std::expected< void, ManagedError > remove (std::source_location origin=std::source_location::current()) const

Friends

class KeyInfo

Detailed Description

Deferred observing slot, published only by a complete successful registration. Construction may allocate; copies never own a scene or action.

Member Function Documentation

◆ id()

std::expected< KeyBindingId, ManagedError > portals::ui::KeyBindingRef::id ( ) const
Returns
Published immutable identity, CLOSED or WRONG_THREAD.

◆ rebind()

std::expected< void, ManagedError > portals::ui::KeyBindingRef::rebind ( const KeySelection & selection,
std::source_location origin = std::source_location::current() ) const
Parameters
selectionNew alternatives.
originCall site.
Returns
Pure checked publication.

◆ remove()

std::expected< void, ManagedError > portals::ui::KeyBindingRef::remove ( std::source_location origin = std::source_location::current()) const
Parameters
originCall site.
Returns
Pure checked retirement.

◆ setEnabled()

std::expected< void, ManagedError > portals::ui::KeyBindingRef::setEnabled ( bool value,
std::source_location origin = std::source_location::current() ) const
Parameters
valueNew state.
originCall site.
Returns
Pure checked publication.

◆ setText()

std::expected< void, ManagedError > portals::ui::KeyBindingRef::setText ( TextValue label,
TextValue description,
KeyTextResolver resolver = {},
std::source_location origin = std::source_location::current() ) const
Parameters
labelNew label.
descriptionNew explanation.
resolverLocal resolver.
originCall site.
Returns
Pure checked publication.

◆ setVisible()

std::expected< void, ManagedError > portals::ui::KeyBindingRef::setVisible ( bool value,
std::source_location origin = std::source_location::current() ) const
Parameters
valueNew state.
originCall site.
Returns
Pure checked publication.

◆ unbind()

std::expected< void, ManagedError > portals::ui::KeyBindingRef::unbind ( std::source_location origin = std::source_location::current()) const
Parameters
originCall site.
Returns
Pure checked unbinding.

The documentation for this class was generated from the following file: