Wwise SDK 2022.1.7
_host_undo_manager_8h_source
Version
menu_open
link
HostUndoManager.h
Go to the documentation of this file.
57 ak_wwise_plugin_undo_event_v1(decltype(m_interface) in_interface, decltype(m_version) in_version) :
60 ak_wwise_plugin_undo_event_v1(std::underlying_type<decltype(m_interface)>::type in_interface, decltype(m_version) in_version) :
77 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
90 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
104 * \param[out] out_csName Pointer to a static name for this event. The buffer is owned by Authoring and is
144 * This must be done prior to performing any action on PropertySets, or adding custom events, as it is important to
145 * have one unique element on the undo stack. You can open multiple groups at once, like a stack, as long as you
164 * \return The new undo group that just got created, or 0 if the system cannot open a group at the moment.
176 * in_szApplyEventName is only used for _APPLY. It is ignored elsewhere, and needs to be nullptr on
179 * in_groupId is only for validation, you can pass 0 if you do not wish to provide this validation.
181 * \akwarning Cancelling contents doesn't undo all the grouped actions. You are responsible for doing all the proper
187 * \param[in] in_groupId (Optional, pass 0) Validation to make sure the group being closed has the proper ID.
213 * This is different than not being in a group. You should always be in a group when you want to add an event.
235 * This function is useful to determine whether a complex undo operation can be started without opening a
236 * new undo group (see \ref ak_wwise_plugin_host_undo_manager_v1::OpenGroup). Otherwise, the simple fact of
280 };
290 };
320 * No pointer to the backend class should be kept inside the undo event, as the object can be deleted
321 * and recreated when the plug-in gets removed through undo. The backend will be recreated at that point,
374 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
384 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
394 * \param[out] out_csName Pointer to a static name for this event. This pointer needs to be accessible as long
457 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
467 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
477 * \param[out] out_csName Pointer to a static name for this event. The buffer is owned by Authoring and is
501 };
511 };
516 * This must be done prior to performing any action on PropertySets, or adding custom events, as it is important to
517 * have one unique element on the undo stack. You can open multiple groups at once, like a stack, as long as you
535 * \return The new undo group that just got created, or 0 if the system cannot open a group at the moment.
537 inline ak_wwise_plugin_undo_group_id OpenGroup(ak_wwise_plugin_undo_group_id in_reopenGroupId = 0)
548 * in_szApplyEventName is only used for _APPLY. It is ignored elsewhere, and needs to be nullptr on
551 * in_groupId is only for validation, you can pass 0 if you do not wish to provide this validation.
553 * \akwarning Cancelling contents doesn't undo all the grouped actions. You are responsible for doing all the proper
558 * \param[in] in_groupId (Optional, pass 0) Validation to make sure the group being closed has the proper ID.
563 ak_wwise_plugin_undo_group_close_action in_action = AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY,
588 * This is different than not being in a group. You should always be in a group when you want to add an event.
614 * This function is useful to determine whether a complex undo operation can be started without opening a
615 * new undo group (see \ref ak_wwise_plugin_host_undo_manager_v1::OpenGroup). Otherwise, the simple fact of
626 * Deriving your plug-in class from RequestUndoManager will automatically request the UndoManager
666 ak_wwise_plugin_undo_group_close_action in_closeAction = AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY)
ak_wwise_plugin_undo_event_v1()
Definition: HostUndoManager.h:54
V1::BaseUndoEvent BaseUndoEvent
Latest version of the C++ BaseUndoEvent interface.
Definition: HostUndoManager.h:637
Base instance type for providing custom undo operations through ak_wwise_plugin_undo_event_v1.
Definition: PluginDef.h:868
char * m_applyEventName
Definition: HostUndoManager.h:730
@ AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_CLOSE
Close this group session (going out of scope), but do not apply it yet.
Definition: PluginDef.h:958
bool(* GetName)(const struct ak_wwise_plugin_undo_event_instance_v1 *in_this, const char **out_csName)
Get the event name, to show after the "Undo " and "Redo " terms in the menu.
Definition: HostUndoManager.h:108
Base host-provided instance type for ak_wwise_plugin_host_undo_manager_v1.
Definition: PluginDef.h:654
bool(* AddCustomEvent)(struct ak_wwise_plugin_host_undo_manager_instance_v1 *in_this, struct ak_wwise_plugin_undo_event_pair_v1 in_event)
Adds a custom event to the currently opened group.
Definition: HostUndoManager.h:206
ak_wwise_plugin_undo_event_v1(decltype(m_interface) in_interface, decltype(m_version) in_version)
Definition: HostUndoManager.h:57
ak_wwise_plugin_interface_type m_interface
Interface type (see ak_wwise_plugin_interface_type)
Definition: PluginBaseInterface.h:121
ak_wwise_plugin_undo_event_v1(std::underlying_type< decltype(m_interface)>::type in_interface, decltype(m_version) in_version)
Definition: HostUndoManager.h:60
Host API to handle the plug-in's undo operations.
Definition: HostUndoManager.h:488
UndoManager & m_undoManager
Definition: HostUndoManager.h:728
Base API to create a custom undo event in a plug-in.
Definition: HostUndoManager.h:269
@ AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY
Close this group session permanently, and apply its operations to the englobing group.
Definition: PluginDef.h:959
bool CloseGroup(ak_wwise_plugin_undo_group_close_action in_action=AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY, ak_wwise_plugin_undo_group_id in_groupId=0, const char *in_szApplyEventName=nullptr)
Closes the last opened group, in stack ordering.
Definition: HostUndoManager.h:562
const CUndoEvent::Instance * GetInstancePointer() const
Definition: HostUndoManager.h:300
bool(* Undo)(struct ak_wwise_plugin_undo_event_instance_v1 *in_this, struct ak_wwise_plugin_backend_instance *in_backend)
Called when the user asks to undo an action.
Definition: HostUndoManager.h:83
static GluedInterface * g_cinterface
The unique instance of the CInterface interface. Defined at nullptr first, overridden by the Host onc...
Definition: PluginInfoGenerator.h:89
decltype(BaseInterface::m_version) InterfaceVersion
PluginInfoGenerator: Type for the m_version value in BaseInterface.
Definition: PluginInfoGenerator.h:50
ak_wwise_plugin_undo_group_id(* OpenGroup)(struct ak_wwise_plugin_host_undo_manager_instance_v1 *in_this, ak_wwise_plugin_undo_group_id in_reopenGroupId)
Open a group that will contain all subsequent undo events.
Definition: HostUndoManager.h:166
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_UNDO_EVENT
2021.1 Undo Event. ak_wwise_plugin_undo_event_v1
Definition: PluginBaseInterface.h:71
API to create a custom undo event in a plug-in.
Definition: HostUndoManager.h:45
bool(* Redo)(struct ak_wwise_plugin_undo_event_instance_v1 *in_this, struct ak_wwise_plugin_backend_instance *in_backend)
Called when the user asks to redo an action.
Definition: HostUndoManager.h:96
bool(* CanLogUndos)(const struct ak_wwise_plugin_host_undo_manager_instance_v1 *in_this)
Returns whether logging can occur or not.
Definition: HostUndoManager.h:242
Wwise Authoring Plug-ins - Plug-in API for property sets.
@ k_interfaceType
The interface type, as requested by this plug-in.
Definition: HostUndoManager.h:500
virtual bool GetName(const char **out_csName) const =0
Get the event name, to show after the "Undo " and "Redo " terms in the menu.
bool(* CanAddEvent)(const struct ak_wwise_plugin_host_undo_manager_instance_v1 *in_this)
Check if we are currently in a state where we can add undo events.
Definition: HostUndoManager.h:218
ak_wwise_plugin_undo_event_v1 CUndoEvent
Definition: HostUndoManager.h:258
ak_wwise_plugin_host_undo_manager_v1 CHostUndoManager
Definition: HostUndoManager.h:484
AutoUndoGroup(UndoManager &in_undoManager, const char *in_applyEventName=nullptr, ak_wwise_plugin_undo_group_id *in_reopenGroupId=nullptr, ak_wwise_plugin_undo_group_close_action in_closeAction=AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY)
Definition: HostUndoManager.h:662
bool AddCustomEvent(BaseUndoEvent *in_pEvent)
Adds a custom event to the currently opened group.
Definition: HostUndoManager.h:578
Definition: HostUndoManager.h:660
CUndoEvent::Instance * GetInstancePointer()
Definition: HostUndoManager.h:296
virtual bool GetName(const char **out_csName) const =0
Get the event name, to show after the "Undo " and "Redo " terms in the menu.
bool CanLogUndos() const
Returns whether logging can occur or not.
Definition: HostUndoManager.h:620
virtual bool Undo(BackendDerivedClass &in_backend)=0
Called when the user asks to undo an action.
Host API to handle the plug-in's undo operations.
Definition: HostUndoManager.h:127
PluginInfoGenerator: Associates an existing C Interface with a variable that can be used....
Definition: PluginInfoGenerator.h:104
int ak_wwise_plugin_undo_group_id
Unique identifier for a particular undo group. Useful to reopen an unapplied closed group session.
Definition: PluginDef.h:931
ak_wwise_plugin_undo_group_id * m_reopenGroupId
Definition: HostUndoManager.h:733
ak_wwise_plugin_undo_group_close_action
Action to apply once this undo group is closed.
Definition: PluginDef.h:957
void(* Destroy)(struct ak_wwise_plugin_undo_event_instance_v1 *in_this)
Called when the system needs to destroy your ak_wwise_plugin_undo_event_v1 instance.
Definition: HostUndoManager.h:72
Base API to create a custom undo event in a plug-in.
Definition: HostUndoManager.h:328
virtual Interface * GetInterfacePointer()=0
ak_wwise_plugin_undo_group_close_action m_closeAction
Definition: HostUndoManager.h:735
bool(* IsBusy)(const struct ak_wwise_plugin_host_undo_manager_instance_v1 *in_this)
Check if we are busy (undoing or redoing).
Definition: HostUndoManager.h:226
virtual bool Redo(BackendDerivedClass &in_backend)=0
Called when the user asks to redo an action.
bool(* CloseGroup)(struct ak_wwise_plugin_host_undo_manager_instance_v1 *in_this, ak_wwise_plugin_undo_group_close_action in_action, ak_wwise_plugin_undo_group_id in_groupId, const char *in_szApplyEventName)
Closes the last opened group, in stack ordering.
Definition: HostUndoManager.h:191
@ AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY_LAST_EVENT_NAME
Same than AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY, but copies the name of the last inner undo e...
Definition: PluginDef.h:961
std::underlying_type< InterfaceType >::type InterfaceTypeValue
PluginInfoGenerator: Underlying storage type for the m_interface value in BaseInterface.
Definition: PluginInfoGenerator.h:49
RequestedHostInterface< UndoManager > RequestUndoManager
Requests an UndoManager interface, provided as m_undoManager variable.
Definition: HostUndoManager.h:630
@ k_interfaceType
The interface type, as provided by this plug-in.
Definition: HostUndoManager.h:279
virtual bool Undo(Backend &in_backend)=0
Called when the user asks to undo an action.
@ AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_CANCEL
Close this group session permanently, and cancel all its internal operations. Undo operations are not...
Definition: PluginDef.h:962
V1::DynamicUndoEvent< BackendDerivedClass > DynamicUndoEvent
Latest version of the C++ DynamicUndoEvent template helper.
Definition: HostUndoManager.h:644
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
virtual BaseUndoEvent::Interface * GetInterfacePointer() final
Definition: HostUndoManager.h:449
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_HOST_UNDO_MANAGER
2021.1 Undo Manager host service. ak_wwise_plugin_host_undo_manager_v1
Definition: PluginBaseInterface.h:81
BaseUndoEvent()
Definition: HostUndoManager.h:304
bool CanAddEvent() const
Check if we are currently in a state where we can add undo events.
Definition: HostUndoManager.h:592
Interface description and base class for every Wwise Authoring plug-in interface.
Definition: PluginBaseInterface.h:120
virtual BaseUndoEvent::Interface * GetInterfacePointer() final
Definition: HostUndoManager.h:366
virtual bool Redo(Backend &in_backend)=0
Called when the user asks to redo an action.
A definition of an undo event, with a specific interface and instance.
Definition: PluginDef.h:926
ak_wwise_plugin_host_undo_manager_v1()
Definition: HostUndoManager.h:136
@ AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY_FIRST_EVENT_NAME
Same than AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY, but copies the name of the first inner undo ...
Definition: PluginDef.h:960
ak_wwise_plugin_undo_group_id OpenGroup(ak_wwise_plugin_undo_group_id in_reopenGroupId=0)
Open a group that will contain all subsequent undo events.
Definition: HostUndoManager.h:537
@ k_interfaceVersion
The interface version, as requested by this plug-in.
Definition: HostUndoManager.h:510
#define AK_WWISE_PLUGIN_SPECIALIZE_HOST_INTERFACE(in_name, in_varname,...)
PluginInfoGenerator: Creates a C++ host specialization for interface class specified in in_name,...
Definition: PluginInfoGenerator.h:237
@ k_interfaceVersion
The interface version, as provided by this plug-in.
Definition: HostUndoManager.h:289
ak_wwise_plugin_undo_group_id m_groupId
Definition: HostUndoManager.h:732
virtual ~BaseUndoEvent()
Definition: HostUndoManager.h:309
V1::UndoManager UndoManager
Latest version of the C++ UndoManager interface.
Definition: HostUndoManager.h:649
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)
V1::UndoEvent< Backend > UndoEvent
Latest version of the C++ UndoEvent template helper.
Definition: HostUndoManager.h:641
Definition: AudioPlugin.h:111
Was this page helpful?
Need Support?
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageTell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise