4#ifndef __UNDO_MIXER_SELECTIONS_ACTION_H__
5#define __UNDO_MIXER_SELECTIONS_ACTION_H__
17enum class 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,
38 MixerSelectionsActionType type;
127mixer_selections_action_new (
130 MixerSelectionsActionType type,
132 unsigned int to_track_name_hash,
140#define mixer_selections_action_new_create( \
141 slot_type, to_tr, to_slot, setting, num_plugins, error) \
142 mixer_selections_action_new ( \
143 NULL, NULL, MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_CREATE, \
144 slot_type, to_tr, to_slot, setting, num_plugins, 0, CarlaBridgeMode::None, \
147#define mixer_selections_action_new_copy( \
148 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
149 mixer_selections_action_new ( \
150 ms, port_connections_mgr, \
151 MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_COPY, slot_type, to_tr, \
152 to_slot, NULL, 0, 0, CarlaBridgeMode::None, error)
154#define mixer_selections_action_new_paste( \
155 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
156 mixer_selections_action_new ( \
157 ms, port_connections_mgr, \
158 MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_PASTE, slot_type, \
159 to_tr, to_slot, NULL, 0, 0, CarlaBridgeMode::None, error)
161#define mixer_selections_action_new_move( \
162 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
163 mixer_selections_action_new ( \
164 ms, port_connections_mgr, \
165 MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_MOVE, slot_type, to_tr, \
166 to_slot, NULL, 0, 0, CarlaBridgeMode::None, error)
168#define mixer_selections_action_new_delete(ms, port_connections_mgr, error) \
169 mixer_selections_action_new ( \
170 ms, port_connections_mgr, \
171 MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_DELETE, 0, 0, 0, NULL, \
172 0, 0, CarlaBridgeMode::None, error)
174#define mixer_selections_action_new_change_status(ms, new_val, error) \
175 mixer_selections_action_new ( \
176 ms, NULL, MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_CHANGE_STATUS, \
177 0, 0, 0, NULL, 0, new_val, CarlaBridgeMode::None, error)
179#define mixer_selections_action_new_change_load_behavior( \
180 ms, new_bridge_mode, error) \
181 mixer_selections_action_perform ( \
183 MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_CHANGE_LOAD_BEHAVIOR, \
184 0, 0, 0, NULL, 0, 0, new_bridge_mode, error)
190mixer_selections_action_perform (
193 MixerSelectionsActionType type,
195 unsigned int to_track_name_hash,
203#define mixer_selections_action_perform_create( \
204 slot_type, to_tr, to_slot, setting, num_plugins, error) \
205 mixer_selections_action_perform ( \
206 NULL, NULL, MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_CREATE, \
207 slot_type, to_tr, to_slot, setting, num_plugins, 0, CarlaBridgeMode::None, \
210#define mixer_selections_action_perform_copy( \
211 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
212 mixer_selections_action_perform ( \
213 ms, port_connections_mgr, \
214 MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_COPY, slot_type, to_tr, \
215 to_slot, NULL, 0, 0, CarlaBridgeMode::None, error)
217#define mixer_selections_action_perform_paste( \
218 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
219 mixer_selections_action_perform ( \
220 ms, port_connections_mgr, \
221 MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_PASTE, slot_type, \
222 to_tr, to_slot, NULL, 0, 0, CarlaBridgeMode::None, error)
224#define mixer_selections_action_perform_move( \
225 ms, port_connections_mgr, slot_type, to_tr, to_slot, error) \
226 mixer_selections_action_perform ( \
227 ms, port_connections_mgr, \
228 MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_MOVE, slot_type, to_tr, \
229 to_slot, NULL, 0, 0, CarlaBridgeMode::None, error)
231#define mixer_selections_action_perform_delete(ms, port_connections_mgr, error) \
232 mixer_selections_action_perform ( \
233 ms, port_connections_mgr, \
234 MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_DELETE, \
235 ENUM_INT_TO_VALUE (ZPluginSlotType, 0), 0, 0, NULL, 0, 0, \
236 CarlaBridgeMode::None, error)
238#define mixer_selections_action_perform_change_status(ms, new_val, error) \
239 mixer_selections_action_perform ( \
240 ms, NULL, MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_CHANGE_STATUS, \
241 ENUM_INT_TO_VALUE (ZPluginSlotType, 0), 0, 0, NULL, 0, new_val, \
242 CarlaBridgeMode::None, error)
244#define mixer_selections_action_perform_change_load_behavior( \
245 ms, new_bridge_mode, error) \
246 mixer_selections_action_perform ( \
248 MixerSelectionsActionType::MIXER_SELECTIONS_ACTION_CHANGE_LOAD_BEHAVIOR, \
249 ENUM_INT_TO_VALUE (ZPluginSlotType, 0), 0, 0, NULL, 0, 0, new_bridge_mode, \
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.
ZPluginSlotType slot_type
Type of starting slot to move plugins to.
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.
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.