OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system

Class encapsulating the UI Delegate state that may change over time. More...

#include <UIDelegateState.hpp>

Public Types

using Ptr = UIDelegateStatePtr
 
using ConstPtr = UIDelegateStateConstPtr
 
using UpdateRequestCallback = std::function< void(std::optional< UIDelegateRequestInterfacePtr >)>
 Callback type for the host to notify the UI delegate of changes to the initial request. More...
 

Public Member Functions

std::any nativeData ()
 Arbitrary data object included with the state. More...
 
EntityReferences entityReferences ()
 List of entity references considered relevant to the host by the UI delegate. More...
 
trait::TraitsDatas entityTraitsDatas ()
 List of traits and their properties considered relevant to the host by the UI delegate. More...
 
std::optional< UpdateRequestCallbackupdateRequestCallback ()
 Callback to be called by the host to notify the UI delegate that the request has changed. More...
 
 ~UIDelegateState ()=default
 
 UIDelegateState (const UIDelegateState &other)=delete
 
 UIDelegateState (UIDelegateState &&other) noexcept=default
 
UIDelegateStateoperator= (const UIDelegateState &other)=delete
 
UIDelegateStateoperator= (UIDelegateState &&other) noexcept=default
 

Static Public Member Functions

static Ptr make (managerApi::UIDelegateStateInterfacePtr uiDelegateStateInterface)
 Constructs a new UIDelegateState wrapping a manager UI delegate's implementation. More...
 

Detailed Description

Class encapsulating the UI Delegate state that may change over time.

The UI Delegate provides instances of this class to a host upon initiating a request for UI delegation, and when notifying of UI state changes.

As well as providing the initial/updated UI state, this class also holds a callback that can be used to update the parameters of the associated ongoing request.

Member Typedef Documentation

using UpdateRequestCallback = std::function<void(std::optional<UIDelegateRequestInterfacePtr>)>

Callback type for the host to notify the UI delegate of changes to the initial request.

Constructor & Destructor Documentation

~UIDelegateState ( )
default
UIDelegateState ( const UIDelegateState other)
delete
UIDelegateState ( UIDelegateState &&  other)
defaultnoexcept

Member Function Documentation

EntityReferences entityReferences ( )

List of entity references considered relevant to the host by the UI delegate.

For example, this could be the entities chosen by the user in a browser.

trait::TraitsDatas entityTraitsDatas ( )

List of traits and their properties considered relevant to the host by the UI delegate.

For example, this could include additional data to be published, which the host may or may not wish to further process.

static Ptr make ( managerApi::UIDelegateStateInterfacePtr  uiDelegateStateInterface)
static

Constructs a new UIDelegateState wrapping a manager UI delegate's implementation.

Note
Instances of this class should not be constructed directly by the host.
Parameters
uiDelegateStateInterfaceImplementation of the underlying state.
Returns
Newly created instance wrapped in a std::shared_ptr.
std::any nativeData ( )

Arbitrary data object included with the state.

It is up to the host to document what should be placed in here, if anything.

For example, it could be the top-level widget created by the UI delegate, ready to be inserted into the UI hierarchy by the host.

Note that for Python hosts, this must return a CPython PyObject*.

UIDelegateState& operator= ( const UIDelegateState other)
delete
UIDelegateState& operator= ( UIDelegateState &&  other)
defaultnoexcept
std::optional<UpdateRequestCallback> updateRequestCallback ( )

Callback to be called by the host to notify the UI delegate that the request has changed.

For example, if the current selection has changed.

If the host calls the callback with an empty optional (None in Python), this notifies the UI delegate that the request is finished (e.g. the UI element is about to be destroyed) and any dangling state should be cleaned up. See also UIDelegate::close.


The documentation for this class was generated from the following file:
  • /src/src/openassetio-ui/include/openassetio/ui/hostApi/UIDelegateState.hpp