Loading...
Searching...
No Matches
PresetDrop.hpp
1#pragma once
2#include <score_plugin_scenario_export.h>
3
4#include <functional>
5#include <optional>
6#include <vector>
7
8namespace Process
9{
10class ProcessModel;
11}
12
13namespace Scenario
14{
15enum class PresetDrop
16{
17 Controls,
18 ControlsAndState,
19 Copy
20};
21
23{
24 bool controls{};
25 bool controlsAndState{};
26 bool copy{};
27};
28
30SCORE_PLUGIN_SCENARIO_EXPORT PresetDropChoices presetDropChoices(
31 const std::vector<const Process::ProcessModel*>& processes, bool copy,
32 bool withState = true);
33
35SCORE_PLUGIN_SCENARIO_EXPORT std::optional<PresetDrop> choosePresetDrop(
36 const std::vector<const Process::ProcessModel*>& processes, bool copy);
37
39SCORE_PLUGIN_SCENARIO_EXPORT extern std::function<std::optional<PresetDrop>(
40 const PresetDropChoices&)>
42}
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
std::function< std::optional< PresetDrop >(const PresetDropChoices &)> presetDropChooser
Replaces choosePresetDrop when set.
Definition PresetDrop.cpp:12
PresetDropChoices presetDropChoices(const std::vector< const Process::ProcessModel * > &processes, bool copy, bool withState)
withState serializes the processes to find whether they have a state.
Definition PresetDrop.cpp:14
std::optional< PresetDrop > choosePresetDrop(const std::vector< const Process::ProcessModel * > &processes, bool copy)
With Ctrl held, a menu at the cursor lists the choices; empty if dismissed.
Definition PresetDrop.cpp:32
@ Copy
An independent copy.
Definition PresetDrop.hpp:23