2#include "ScenarioPoint.hpp"
4#include <Scenario/Document/Interval/Slot.hpp>
6#include <score/statemachine/StateMachineUtils.hpp>
7#include <score/tools/Clamp.hpp>
20 if(point.date.impl < 0)
22 point.y = clamp(point.y, 0.004, 0.99);
44 static constexpr const int user_type = N;
46 : PositionedEvent<Scenario::Point>{pt, QEvent::Type(QEvent::User + N)}
51template <
typename Element,
int N>
79static const constexpr int ClickOnNothing
80 = ScenarioElement::Nothing + score::Modifier::Click_tag::value;
81static const constexpr int ClickOnTimeSync
82 = ScenarioElement::TimeSync + score::Modifier::Click_tag::value;
83static const constexpr int ClickOnEvent
84 = ScenarioElement::Event + score::Modifier::Click_tag::value;
85static const constexpr int ClickOnInterval
86 = ScenarioElement::Interval + score::Modifier::Click_tag::value;
87static const constexpr int ClickOnState
88 = ScenarioElement::State + score::Modifier::Click_tag::value;
89static const constexpr int ClickOnSlotHandle
90 = ScenarioElement::SlotHandle_e + score::Modifier::Click_tag::value;
91static const constexpr int ClickOnTrigger
92 = ScenarioElement::Trigger + score::Modifier::Click_tag::value;
93static const constexpr int ClickOnLeftBrace
94 = ScenarioElement::LeftBrace + score::Modifier::Click_tag::value;
95static const constexpr int ClickOnRightBrace
96 = ScenarioElement::RightBrace + score::Modifier::Click_tag::value;
98static const constexpr int MoveOnNothing
99 = ScenarioElement::Nothing + score::Modifier::Move_tag::value;
100static const constexpr int MoveOnTimeSync
101 = ScenarioElement::TimeSync + score::Modifier::Move_tag::value;
102static const constexpr int MoveOnEvent
103 = ScenarioElement::Event + score::Modifier::Move_tag::value;
104static const constexpr int MoveOnInterval
105 = ScenarioElement::Interval + score::Modifier::Move_tag::value;
106static const constexpr int MoveOnState
107 = ScenarioElement::State + score::Modifier::Move_tag::value;
108static const constexpr int MoveOnSlotHandle
109 = ScenarioElement::SlotHandle_e + score::Modifier::Move_tag::value;
110static const constexpr int MoveOnTrigger
111 = ScenarioElement::Trigger + score::Modifier::Move_tag::value;
112static const constexpr int MoveOnLeftBrace
113 = ScenarioElement::LeftBrace + score::Modifier::Move_tag::value;
114static const constexpr int MoveOnRightBrace
115 = ScenarioElement::RightBrace + score::Modifier::Move_tag::value;
117static const constexpr int ReleaseOnNothing
118 = ScenarioElement::Nothing + score::Modifier::Release_tag::value;
119static const constexpr int ReleaseOnTimeSync
120 = ScenarioElement::TimeSync + score::Modifier::Release_tag::value;
121static const constexpr int ReleaseOnEvent
122 = ScenarioElement::Event + score::Modifier::Release_tag::value;
123static const constexpr int ReleaseOnInterval
124 = ScenarioElement::Interval + score::Modifier::Release_tag::value;
125static const constexpr int ReleaseOnState
126 = ScenarioElement::State + score::Modifier::Release_tag::value;
127static const constexpr int ReleaseOnSlotHandle
128 = ScenarioElement::SlotHandle_e + score::Modifier::Release_tag::value;
129static const constexpr int ReleaseOnTrigger
130 = ScenarioElement::Trigger + score::Modifier::Release_tag::value;
131static const constexpr int ReleaseOnLeftBrace
132 = ScenarioElement::LeftBrace + score::Modifier::Release_tag::value;
133static const constexpr int ReleaseOnRightBrace
134 = ScenarioElement::RightBrace + score::Modifier::Release_tag::value;
137using ClickOnNothing_Event = PositionedScenarioEvent<ClickOnNothing>;
138using ClickOnTimeSync_Event
139 = PositionedWithId_ScenarioEvent<TimeSyncModel, ClickOnTimeSync>;
140using ClickOnEvent_Event = PositionedWithId_ScenarioEvent<EventModel, ClickOnEvent>;
141using ClickOnInterval_Event
142 = PositionedWithId_ScenarioEvent<IntervalModel, ClickOnInterval>;
143using ClickOnState_Event = PositionedWithId_ScenarioEvent<StateModel, ClickOnState>;
145using ClickOnLeftBrace_Event
146 = PositionedWithId_ScenarioEvent<IntervalModel, ClickOnLeftBrace>;
147using ClickOnRightBrace_Event
148 = PositionedWithId_ScenarioEvent<IntervalModel, ClickOnRightBrace>;
151using MoveOnNothing_Event = PositionedScenarioEvent<MoveOnNothing>;
152using MoveOnTimeSync_Event
153 = PositionedWithId_ScenarioEvent<TimeSyncModel, MoveOnTimeSync>;
154using MoveOnEvent_Event = PositionedWithId_ScenarioEvent<EventModel, MoveOnEvent>;
155using MoveOnInterval_Event
156 = PositionedWithId_ScenarioEvent<IntervalModel, MoveOnInterval>;
157using MoveOnState_Event = PositionedWithId_ScenarioEvent<StateModel, MoveOnState>;
159using MoveOnLeftBrace_Event
160 = PositionedWithId_ScenarioEvent<IntervalModel, MoveOnLeftBrace>;
161using MoveOnRightBrace_Event
162 = PositionedWithId_ScenarioEvent<IntervalModel, MoveOnRightBrace>;
165using ReleaseOnNothing_Event = PositionedScenarioEvent<ReleaseOnNothing>;
166using ReleaseOnTimeSync_Event
167 = PositionedWithId_ScenarioEvent<TimeSyncModel, ReleaseOnTimeSync>;
168using ReleaseOnEvent_Event = PositionedWithId_ScenarioEvent<EventModel, ReleaseOnEvent>;
169using ReleaseOnInterval_Event
170 = PositionedWithId_ScenarioEvent<IntervalModel, ReleaseOnInterval>;
171using ReleaseOnState_Event = PositionedWithId_ScenarioEvent<StateModel, ReleaseOnState>;
172using ReleaseOnTrigger_Event
174using ReleaseOnLeftBrace_Event
175 = PositionedWithId_ScenarioEvent<IntervalModel, ReleaseOnLeftBrace>;
176using ReleaseOnRightBrace_Event
177 = PositionedWithId_ScenarioEvent<IntervalModel, ReleaseOnRightBrace>;
188 : NumberedEvent<ClickOnSlotHandle>()
194 : NumberedEvent<ClickOnSlotHandle>()
205 : NumberedEvent<MoveOnSlotHandle>()
211 : NumberedEvent<MoveOnSlotHandle>()
224 : NumberedEvent<ReleaseOnSlotHandle>()
230 : NumberedEvent<ReleaseOnSlotHandle>()
239QString debug_StateMachineIDs()
243 auto object =
static_cast<ScenarioElement
>(N % 10);
244 auto modifier =
static_cast<score::Modifier_tagme
>((N - object) % 1000 / 100);
247 case score::Modifier_tagme::Click:
250 case score::Modifier_tagme::Move:
253 case score::Modifier_tagme::Release:
260 case ScenarioElement::Nothing:
263 case ScenarioElement::TimeSync:
266 case ScenarioElement::Event:
269 case ScenarioElement::Interval:
272 case ScenarioElement::State:
275 case ScenarioElement::SlotOverlay_e:
276 txt +=
"SlotOverlay_e";
278 case ScenarioElement::SlotHandle_e:
279 txt +=
"SlotHandle_e";
281 case ScenarioElement::Trigger:
284 case ScenarioElement::LeftBrace:
287 case ScenarioElement::RightBrace:
The id_base_t class.
Definition Identifier.hpp:57
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Utilities for OSSIA data structures.
Definition DeviceInterface.hpp:33
Base toolkit upon which the software is built.
Definition Application.cpp:90
Definition ScenarioPaletteBaseEvents.hpp:186
Definition ScenarioPaletteBaseEvents.hpp:203
Definition ScenarioPoint.hpp:13
Definition ScenarioPaletteBaseEvents.hpp:43
Definition ScenarioPaletteBaseEvents.hpp:53
Definition ScenarioPaletteBaseEvents.hpp:222
Definition StateMachineUtils.hpp:18
Definition StateMachineUtils.hpp:28
Definition StateMachineUtils.hpp:46