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

Class encapsulating a UI Delegate request that may change over time. More...

#include <UIDelegateRequest.hpp>

Public Types

using Ptr = UIDelegateRequestPtr
 
using ConstPtr = UIDelegateRequestConstPtr
 
using StateChangedCallback = std::function< void(UIDelegateStateInterfacePtr)>
 Callback type for the UI delegate to notify the host of state changes. More...
 

Public Member Functions

std::any nativeData ()
 Arbitrary data object included with the request. More...
 
EntityReferences entityReferences ()
 List of entity references associated with the request. More...
 
trait::TraitsDatas entityTraitsDatas ()
 List of traits and their properties associated with the request. More...
 
std::optional< StateChangedCallbackstateChangedCallback ()
 Callback to be called by the UI delegate to notify the host of state changes. More...
 
 ~UIDelegateRequest ()=default
 
 UIDelegateRequest (const UIDelegateRequest &other)=delete
 
 UIDelegateRequest (UIDelegateRequest &&other) noexcept=default
 
UIDelegateRequestoperator= (const UIDelegateRequest &other)=delete
 
UIDelegateRequestoperator= (UIDelegateRequest &&other) noexcept=default
 

Static Public Member Functions

static Ptr make (hostApi::UIDelegateRequestInterfacePtr uiDelegateRequestInterface)
 Constructs a new UIDelegateRequest wrapping a host implementation. More...
 

Detailed Description

Class encapsulating a UI Delegate request that may change over time.

The host provides instances of this class to a UI delegate when initiating a request for UI delegation, and when updating an ongoing request.

As well as providing information for initialising/updating a specific request, this class also holds a callback that should be used to notify the host of relevant updates to the UI delegate's internal state.

Member Typedef Documentation

using StateChangedCallback = std::function<void(UIDelegateStateInterfacePtr)>

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

Constructor & Destructor Documentation

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

Member Function Documentation

EntityReferences entityReferences ( )

List of entity references associated with the request.

For example, this could be the "current selection", for which the UI delegate is expected to provide actions or additional information.

trait::TraitsDatas entityTraitsDatas ( )

List of traits and their properties associated with the request.

For example, this could be data that's intended to be published, allowing the UI delegate a chance to augment or finesse the published data.

static Ptr make ( hostApi::UIDelegateRequestInterfacePtr  uiDelegateRequestInterface)
static

Constructs a new UIDelegateRequest wrapping a host implementation.

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

Arbitrary data object included with the request.

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

For example, it could be a container widget to be populated by the UI delegate.

Note that for Python UI delegates, this must contain a CPython PyObject*.

UIDelegateRequest& operator= ( const UIDelegateRequest other)
delete
UIDelegateRequest& operator= ( UIDelegateRequest &&  other)
defaultnoexcept
std::optional<StateChangedCallback> stateChangedCallback ( )

Callback to be called by the UI delegate to notify the host of state changes.

For example, when the user selects an entity in a browser.


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