|
OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system
|
Abstract interface encapsulating the UI Delegate state that may change over time. More...
#include <UIDelegateStateInterface.hpp>
Public Types | |
| using | Ptr = UIDelegateStateInterfacePtr |
| using | ConstPtr = UIDelegateStateInterfaceConstPtr |
| using | UpdateRequestCallback = std::function< void(std::optional< UIDelegateRequestPtr >)> |
| Callback type for the host to notify the UI delegate of changes to the initial request. More... | |
Public Member Functions | |
| virtual | ~UIDelegateStateInterface ()=default |
| Defaulted destructor. More... | |
| virtual std::any | nativeData () |
| Arbitrary data object included with the state. More... | |
| virtual EntityReferences | entityReferences () |
| List of entity references considered relevant to the host by the UI delegate. More... | |
| virtual trait::TraitsDatas | entityTraitsDatas () |
| List of traits and their properties considered relevant to the host by the UI delegate. More... | |
| virtual std::optional< UpdateRequestCallback > | updateRequestCallback () |
| Callback to be called by the host to notify the UI delegate that the request has changed. More... | |
Abstract interface encapsulating the UI Delegate state that may change over time.
The UI Delegate is expected to subclass this class and implement its methods. Instances are then be provided to a host upon initiating a request for UI delegation, and when notifying the host of UI state changes.
This class also holds a callback, which the host can use to update the parameters of the ongoing request.
| using Ptr = UIDelegateStateInterfacePtr |
| using UpdateRequestCallback = std::function<void(std::optional<UIDelegateRequestPtr>)> |
Callback type for the host to notify the UI delegate of changes to the initial request.
|
virtualdefault |
Defaulted destructor.
|
virtual |
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.
|
virtual |
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.
|
virtual |
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*.
|
virtual |
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 UIDelegateInterface::close.
Copyright 2013-2023 The Foundry Visionmongers Ltd. OpenAssetIO is released under the Apache 2.0 License