Loading...
Searching...
No Matches
SetControllerControlValue.hpp
1#pragma once
2#include <Process/Dataflow/Port.hpp>
3#include <Process/Process.hpp>
4#include <Process/Script/ScriptEditor.hpp>
5#include <Process/Script/ScriptProcess.hpp>
6
7#include <Scenario/Commands/ScenarioCommandFactory.hpp>
8
9#include <Dataflow/Commands/CableHelpers.hpp>
10
11#include <score/tools/Unused.hpp>
12
13#include <ossia/detail/algorithms.hpp>
14
15#include <score_plugin_scenario_export.h>
16namespace Scenario
17{
18// TODO find a way to keep this in sync with Scenario::EditScript
19class SCORE_PLUGIN_SCENARIO_EXPORT SetControllerControlValue : public score::Command
20{
21 SCORE_COMMAND_DECL(
22 Scenario::Command::CommandFactoryName(), SetControllerControlValue,
23 "Set a control")
24public:
26 const Process::ControlInlet& obj, ossia::value newval,
27 const score::DocumentContext& ctx);
28
30
31 void undo(const score::DocumentContext& ctx) const final override;
32 void redo(const score::DocumentContext& ctx) const final override;
33
34 void update(const Process::ControlInlet& obj, ossia::value newval, unused_t);
35
36protected:
37 void serializeImpl(DataStreamInput& stream) const final override;
38 void deserializeImpl(DataStreamOutput& stream) final override;
39
40private:
42 ossia::value m_old, m_new;
43 std::vector<Dataflow::SavedPort> m_oldInlets, m_oldOutlets;
44
45 Dataflow::SerializedCables m_oldCables;
46};
47}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition Port.hpp:218
Definition SetControllerControlValue.hpp:20
The Command class.
Definition Command.hpp:34
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition DocumentContext.hpp:18
Definition Unused.hpp:3