4#ifndef __UNDO_MIXER_SELECTIONS_ACTION_H__
5#define __UNDO_MIXER_SELECTIONS_ACTION_H__
17typedef enum MixerSelectionsActionType
20 MIXER_SELECTIONS_ACTION_COPY,
22 MIXER_SELECTIONS_ACTION_PASTE,
24 MIXER_SELECTIONS_ACTION_CREATE,
25 MIXER_SELECTIONS_ACTION_DELETE,
26 MIXER_SELECTIONS_ACTION_MOVE,
27 MIXER_SELECTIONS_ACTION_CHANGE_STATUS,
28 MIXER_SELECTIONS_ACTION_CHANGE_LOAD_BEHAVIOR,
29} MixerSelectionsActionType;
31static const cyaml_strval_t mixer_selections_action_type_strings[] = {
32 {
"Copy", MIXER_SELECTIONS_ACTION_COPY },
33 {
"Paste", MIXER_SELECTIONS_ACTION_PASTE },
34 {
"Create", MIXER_SELECTIONS_ACTION_CREATE },
35 {
"Delete", MIXER_SELECTIONS_ACTION_DELETE },
36 {
"Move", MIXER_SELECTIONS_ACTION_MOVE },
37 {
"Change Status", MIXER_SELECTIONS_ACTION_CHANGE_STATUS },
38 {
"Change Load Behavior", MIXER_SELECTIONS_ACTION_CHANGE_LOAD_BEHAVIOR},
48 MixerSelectionsActionType type;
137mixer_selections_action_new (
140 MixerSelectionsActionType type,
142 unsigned int to_track_name_hash,
150#define mixer_selections_action_new_create( \
151 slot_type, to_tr, to_slot, setting, num_plugins, error) \
152 mixer_selections_action_new ( \
153 NULL, NULL, MIXER_SELECTIONS_ACTION_CREATE, slot_type, to_tr, to_slot, \
154 setting, num_plugins, 0, CARLA_BRIDGE_NONE, error)
156#define mixer_selections_action_new_copy( \
157 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
158 mixer_selections_action_new ( \
159 ms, port_connections_mgr, MIXER_SELECTIONS_ACTION_COPY, slot_type, to_tr, \
160 to_slot, NULL, 0, 0, CARLA_BRIDGE_NONE, error)
162#define mixer_selections_action_new_paste( \
163 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
164 mixer_selections_action_new ( \
165 ms, port_connections_mgr, MIXER_SELECTIONS_ACTION_PASTE, slot_type, to_tr, \
166 to_slot, NULL, 0, 0, CARLA_BRIDGE_NONE, error)
168#define mixer_selections_action_new_move( \
169 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
170 mixer_selections_action_new ( \
171 ms, port_connections_mgr, MIXER_SELECTIONS_ACTION_MOVE, slot_type, to_tr, \
172 to_slot, NULL, 0, 0, CARLA_BRIDGE_NONE, error)
174#define mixer_selections_action_new_delete(ms, port_connections_mgr, error) \
175 mixer_selections_action_new ( \
176 ms, port_connections_mgr, MIXER_SELECTIONS_ACTION_DELETE, 0, 0, 0, NULL, \
177 0, 0, CARLA_BRIDGE_NONE, error)
179#define mixer_selections_action_new_change_status(ms, new_val, error) \
180 mixer_selections_action_new ( \
181 ms, NULL, MIXER_SELECTIONS_ACTION_CHANGE_STATUS, 0, 0, 0, NULL, 0, \
182 new_val, CARLA_BRIDGE_NONE, error)
184#define mixer_selections_action_new_change_load_behavior( \
185 ms, new_bridge_mode, error) \
186 mixer_selections_action_perform ( \
187 ms, NULL, MIXER_SELECTIONS_ACTION_CHANGE_LOAD_BEHAVIOR, 0, 0, 0, NULL, 0, \
188 0, new_bridge_mode, error)
194mixer_selections_action_perform (
197 MixerSelectionsActionType type,
199 unsigned int to_track_name_hash,
207#define mixer_selections_action_perform_create( \
208 slot_type, to_tr, to_slot, setting, num_plugins, error) \
209 mixer_selections_action_perform ( \
210 NULL, NULL, MIXER_SELECTIONS_ACTION_CREATE, slot_type, to_tr, to_slot, \
211 setting, num_plugins, 0, CARLA_BRIDGE_NONE, error)
213#define mixer_selections_action_perform_copy( \
214 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
215 mixer_selections_action_perform ( \
216 ms, port_connections_mgr, MIXER_SELECTIONS_ACTION_COPY, slot_type, to_tr, \
217 to_slot, NULL, 0, 0, CARLA_BRIDGE_NONE, error)
219#define mixer_selections_action_perform_paste( \
220 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
221 mixer_selections_action_perform ( \
222 ms, port_connections_mgr, MIXER_SELECTIONS_ACTION_PASTE, slot_type, to_tr, \
223 to_slot, NULL, 0, 0, CARLA_BRIDGE_NONE, error)
225#define mixer_selections_action_perform_move( \
226 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
227 mixer_selections_action_perform ( \
228 ms, port_connections_mgr, MIXER_SELECTIONS_ACTION_MOVE, slot_type, to_tr, \
229 to_slot, NULL, 0, 0, CARLA_BRIDGE_NONE, error)
231#define mixer_selections_action_perform_delete(ms, port_connections_mgr, error) \
232 mixer_selections_action_perform ( \
233 ms, port_connections_mgr, MIXER_SELECTIONS_ACTION_DELETE, 0, 0, 0, NULL, \
234 0, 0, CARLA_BRIDGE_NONE, error)
236#define mixer_selections_action_perform_change_status(ms, new_val, error) \
237 mixer_selections_action_perform ( \
238 ms, NULL, MIXER_SELECTIONS_ACTION_CHANGE_STATUS, 0, 0, 0, NULL, 0, \
239 new_val, CARLA_BRIDGE_NONE, error)
241#define mixer_selections_action_perform_change_load_behavior( \
242 ms, new_bridge_mode, error) \
243 mixer_selections_action_perform ( \
244 ms, NULL, MIXER_SELECTIONS_ACTION_CHANGE_LOAD_BEHAVIOR, 0, 0, 0, NULL, 0, \
245 0, new_bridge_mode, error)
CarlaBridgeMode
Carla bridge mode.
Port connections manager.
Restrict selections to a channel.
CarlaBridgeMode new_bridge_mode
Used when changing load behavior.
unsigned int to_track_name_hash
To track position.
PluginSetting * setting
PluginSetting to use when creating.
bool new_channel
Whether the plugins will be copied/moved into a new channel, if applicable.
AutomationTrack * ats[16000]
Automation tracks associated with the plugins.
PortConnectionsManager * connections_mgr_after
A clone of the port connections after applying the action.
MixerSelections * deleted_ms
Deleted plugins (ie, plugins replaced during move/copy).
MixerSelections * ms_before
Clone of mixer selections at start.
PortConnectionsManager * connections_mgr_before
A clone of the port connections at the start of the action.
AutomationTrack * deleted_ats[16000]
Automation tracks associated with the deleted plugins.
int new_val
Used when changing status.
int to_slot
Starting target slot.
PluginSlotType slot_type
Type of starting slot to move plugins to.
int num_plugins
Number of plugins to create, when creating new plugins.
Selections to be used for the timeline's current selections, copying, undoing, etc.
A setting for a specific plugin descriptor.
The base plugin Inheriting plugins must have this as a child.
Port connections manager.
Track to be inserted into the Project's Tracklist.
Base struct to be inherited by implementing undoable actions.