|
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< UpdateRequestCallback > | updateRequestCallback () |
| 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 | |
| UIDelegateState & | operator= (const UIDelegateState &other)=delete |
| UIDelegateState & | operator= (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... | |
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.
| using ConstPtr = UIDelegateStateConstPtr |
| using Ptr = UIDelegateStatePtr |
| using UpdateRequestCallback = std::function<void(std::optional<UIDelegateRequestInterfacePtr>)> |
Callback type for the host to notify the UI delegate of changes to the initial request.
|
default |
|
delete |
|
defaultnoexcept |
| 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 |
Constructs a new UIDelegateState wrapping a manager UI delegate's implementation.
| uiDelegateStateInterface | Implementation of the underlying state. |
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*.
|
delete |
|
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.
Copyright 2013-2023 The Foundry Visionmongers Ltd. OpenAssetIO is released under the Apache 2.0 License