Wwise SDK 2021.1.14
版本
menu_open
link
HostUndoManager.h
Go to the documentation of this file.
58 ak_wwise_plugin_undo_event_v1(decltype(m_interface) in_interface, decltype(m_version) in_version) :
61 ak_wwise_plugin_undo_event_v1(std::underlying_type<decltype(m_interface)>::type in_interface, decltype(m_version) in_version) :
78 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
91 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
105 * \param[out] out_csName Pointer to a static name for this event. The buffer is owned by Authoring and is
145 * This must be done prior to performing any action on PropertySets, or adding custom events, as it is important to
146 * have one unique element on the undo stack. You can open multiple groups at once, like a stack, as long as you
165 * \return The new undo group that just got created, or 0 if the system cannot open a group at the moment.
177 * in_szApplyEventName is only used for _APPLY. It is ignored elsewhere, and needs to be nullptr on
180 * in_groupId is only for validation, you can pass 0 if you do not wish to provide this validation.
182 * \akwarning Cancelling contents doesn't undo all the grouped actions. You are responsible for doing all the proper
188 * \param[in] in_groupId (Optional, pass 0) Validation to make sure the group being closed has the proper ID.
214 * This is different than not being in a group. You should always be in a group when you want to add an event.
236 * This function is useful to determine whether a complex undo operation can be started without opening a
237 * new undo group (see \ref ak_wwise_plugin_host_undo_manager_v1::OpenGroup). Otherwise, the simple fact of
281 };
291 };
321 * No pointer to the backend class should be kept inside the undo event, as the object can be deleted
322 * and recreated when the plug-in gets removed through undo. The backend will be recreated at that point,
375 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
385 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
395 * \param[out] out_csName Pointer to a static name for this event. This pointer needs to be accessible as long
458 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
468 * \akwarning The backend instance is provided to you. You should never keep pointers to any plug-in instances
478 * \param[out] out_csName Pointer to a static name for this event. The buffer is owned by Authoring and is
502 };
512 };
517 * This must be done prior to performing any action on PropertySets, or adding custom events, as it is important to
518 * have one unique element on the undo stack. You can open multiple groups at once, like a stack, as long as you
536 * \return The new undo group that just got created, or 0 if the system cannot open a group at the moment.
538 inline ak_wwise_plugin_undo_group_id OpenGroup(ak_wwise_plugin_undo_group_id in_reopenGroupId = 0)
549 * in_szApplyEventName is only used for _APPLY. It is ignored elsewhere, and needs to be nullptr on
552 * in_groupId is only for validation, you can pass 0 if you do not wish to provide this validation.
554 * \akwarning Cancelling contents doesn't undo all the grouped actions. You are responsible for doing all the proper
559 * \param[in] in_groupId (Optional, pass 0) Validation to make sure the group being closed has the proper ID.
564 ak_wwise_plugin_undo_group_close_action in_action = AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY,
589 * This is different than not being in a group. You should always be in a group when you want to add an event.
615 * This function is useful to determine whether a complex undo operation can be started without opening a
616 * new undo group (see \ref ak_wwise_plugin_host_undo_manager_v1::OpenGroup). Otherwise, the simple fact of
627 * Deriving your plug-in class from RequestUndoManager will automatically request the UndoManager
667 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:55
V1::BaseUndoEvent BaseUndoEvent
Latest version of the C++ BaseUndoEvent interface.
Definition: HostUndoManager.h:638
Base instance type for providing custom undo operations through ak_wwise_plugin_undo_event_v1.
Definition: PluginDef.h:867
char * m_applyEventName
Definition: HostUndoManager.h:731
@ 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:947
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:109
Base host-provided instance type for ak_wwise_plugin_host_undo_manager_v1.
Definition: PluginDef.h:653
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:207
ak_wwise_plugin_undo_event_v1(decltype(m_interface) in_interface, decltype(m_version) in_version)
Definition: HostUndoManager.h:58
ak_wwise_plugin_interface_type m_interface
Interface type (see ak_wwise_plugin_interface_type)
Definition: PluginBaseInterface.h:118
ak_wwise_plugin_undo_event_v1(std::underlying_type< decltype(m_interface)>::type in_interface, decltype(m_version) in_version)
Definition: HostUndoManager.h:61
Host API to handle the plug-in's undo operations.
Definition: HostUndoManager.h:489
UndoManager & m_undoManager
Definition: HostUndoManager.h:729
Base API to create a custom undo event in a plug-in.
Definition: HostUndoManager.h:270
@ AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY
Close this group session permanently, and apply its operations to the englobing group.
Definition: PluginDef.h:948
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:563
const CUndoEvent::Instance * GetInstancePointer() const
Definition: HostUndoManager.h:301
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:84
static GluedInterface * g_cinterface
The unique instance of the CInterface interface. Defined at nullptr first, overridden by the Host onc...
Definition: PluginInfoGenerator.h:90
decltype(BaseInterface::m_version) InterfaceVersion
PluginInfoGenerator: Type for the m_version value in BaseInterface.
Definition: PluginInfoGenerator.h:51
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:167
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_UNDO_EVENT
2021.1 Undo Event. ak_wwise_plugin_undo_event_v1
Definition: PluginBaseInterface.h:72
API to create a custom undo event in a plug-in.
Definition: HostUndoManager.h:46
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:97
bool(* CanLogUndos)(const struct ak_wwise_plugin_host_undo_manager_instance_v1 *in_this)
Returns whether logging can occur or not.
Definition: HostUndoManager.h:243
Wwise Authoring Plug-ins - Plug-in API for property sets.
@ k_interfaceType
The interface type, as requested by this plug-in.
Definition: HostUndoManager.h:501
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:219
ak_wwise_plugin_undo_event_v1 CUndoEvent
Definition: HostUndoManager.h:259
ak_wwise_plugin_host_undo_manager_v1 CHostUndoManager
Definition: HostUndoManager.h:485
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:663
bool AddCustomEvent(BaseUndoEvent *in_pEvent)
Adds a custom event to the currently opened group.
Definition: HostUndoManager.h:579
Definition: HostUndoManager.h:661
CUndoEvent::Instance * GetInstancePointer()
Definition: HostUndoManager.h:297
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:621
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:128
PluginInfoGenerator: Associates an existing C Interface with a variable that can be used....
Definition: PluginInfoGenerator.h:105
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:920
ak_wwise_plugin_undo_group_id * m_reopenGroupId
Definition: HostUndoManager.h:734
ak_wwise_plugin_undo_group_close_action
Action to apply once this undo group is closed.
Definition: PluginDef.h:946
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:73
Base API to create a custom undo event in a plug-in.
Definition: HostUndoManager.h:329
virtual Interface * GetInterfacePointer()=0
ak_wwise_plugin_undo_group_close_action m_closeAction
Definition: HostUndoManager.h:736
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:227
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:192
@ 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:950
std::underlying_type< InterfaceType >::type InterfaceTypeValue
PluginInfoGenerator: Underlying storage type for the m_interface value in BaseInterface.
Definition: PluginInfoGenerator.h:50
RequestedHostInterface< UndoManager > RequestUndoManager
Requests an UndoManager interface, provided as m_undoManager variable.
Definition: HostUndoManager.h:631
@ k_interfaceType
The interface type, as provided by this plug-in.
Definition: HostUndoManager.h:280
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:951
V1::DynamicUndoEvent< BackendDerivedClass > DynamicUndoEvent
Latest version of the C++ DynamicUndoEvent template helper.
Definition: HostUndoManager.h:645
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
virtual BaseUndoEvent::Interface * GetInterfacePointer() final
Definition: HostUndoManager.h:450
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_HOST_UNDO_MANAGER
2021.1 Undo Manager host service. ak_wwise_plugin_host_undo_manager_v1
Definition: PluginBaseInterface.h:82
BaseUndoEvent()
Definition: HostUndoManager.h:305
bool CanAddEvent() const
Check if we are currently in a state where we can add undo events.
Definition: HostUndoManager.h:593
Interface description and base class for every Wwise Authoring plug-in interface.
Definition: PluginBaseInterface.h:117
virtual BaseUndoEvent::Interface * GetInterfacePointer() final
Definition: HostUndoManager.h:367
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:915
ak_wwise_plugin_host_undo_manager_v1()
Definition: HostUndoManager.h:137
@ 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:949
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:538
@ k_interfaceVersion
The interface version, as requested by this plug-in.
Definition: HostUndoManager.h:511
#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:238
@ k_interfaceVersion
The interface version, as provided by this plug-in.
Definition: HostUndoManager.h:290
ak_wwise_plugin_undo_group_id m_groupId
Definition: HostUndoManager.h:733
virtual ~BaseUndoEvent()
Definition: HostUndoManager.h:310
V1::UndoManager UndoManager
Latest version of the C++ UndoManager interface.
Definition: HostUndoManager.h:650
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)
V1::UndoEvent< Backend > UndoEvent
Latest version of the C++ UndoEvent template helper.
Definition: HostUndoManager.h:642
Definition: AudioPlugin.h:112