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)}
51 template <
typename Element,
int N>
79 static const constexpr
int ClickOnNothing
80 = ScenarioElement::Nothing + score::Modifier::Click_tag::value;
81 static const constexpr
int ClickOnTimeSync
82 = ScenarioElement::TimeSync + score::Modifier::Click_tag::value;
83 static const constexpr
int ClickOnEvent
84 = ScenarioElement::Event + score::Modifier::Click_tag::value;
85 static const constexpr
int ClickOnInterval
86 = ScenarioElement::Interval + score::Modifier::Click_tag::value;
87 static const constexpr
int ClickOnState
88 = ScenarioElement::State + score::Modifier::Click_tag::value;
89 static const constexpr
int ClickOnSlotHandle
90 = ScenarioElement::SlotHandle_e + score::Modifier::Click_tag::value;
91 static const constexpr
int ClickOnTrigger
92 = ScenarioElement::Trigger + score::Modifier::Click_tag::value;
93 static const constexpr
int ClickOnLeftBrace
94 = ScenarioElement::LeftBrace + score::Modifier::Click_tag::value;
95 static const constexpr
int ClickOnRightBrace
96 = ScenarioElement::RightBrace + score::Modifier::Click_tag::value;
98 static const constexpr
int MoveOnNothing
99 = ScenarioElement::Nothing + score::Modifier::Move_tag::value;
100 static const constexpr
int MoveOnTimeSync
101 = ScenarioElement::TimeSync + score::Modifier::Move_tag::value;
102 static const constexpr
int MoveOnEvent
103 = ScenarioElement::Event + score::Modifier::Move_tag::value;
104 static const constexpr
int MoveOnInterval
105 = ScenarioElement::Interval + score::Modifier::Move_tag::value;
106 static const constexpr
int MoveOnState
107 = ScenarioElement::State + score::Modifier::Move_tag::value;
108 static const constexpr
int MoveOnSlotHandle
109 = ScenarioElement::SlotHandle_e + score::Modifier::Move_tag::value;
110 static const constexpr
int MoveOnTrigger
111 = ScenarioElement::Trigger + score::Modifier::Move_tag::value;
112 static const constexpr
int MoveOnLeftBrace
113 = ScenarioElement::LeftBrace + score::Modifier::Move_tag::value;
114 static const constexpr
int MoveOnRightBrace
115 = ScenarioElement::RightBrace + score::Modifier::Move_tag::value;
117 static const constexpr
int ReleaseOnNothing
118 = ScenarioElement::Nothing + score::Modifier::Release_tag::value;
119 static const constexpr
int ReleaseOnTimeSync
120 = ScenarioElement::TimeSync + score::Modifier::Release_tag::value;
121 static const constexpr
int ReleaseOnEvent
122 = ScenarioElement::Event + score::Modifier::Release_tag::value;
123 static const constexpr
int ReleaseOnInterval
124 = ScenarioElement::Interval + score::Modifier::Release_tag::value;
125 static const constexpr
int ReleaseOnState
126 = ScenarioElement::State + score::Modifier::Release_tag::value;
127 static const constexpr
int ReleaseOnSlotHandle
128 = ScenarioElement::SlotHandle_e + score::Modifier::Release_tag::value;
129 static const constexpr
int ReleaseOnTrigger
130 = ScenarioElement::Trigger + score::Modifier::Release_tag::value;
131 static const constexpr
int ReleaseOnLeftBrace
132 = ScenarioElement::LeftBrace + score::Modifier::Release_tag::value;
133 static const constexpr
int ReleaseOnRightBrace
134 = ScenarioElement::RightBrace + score::Modifier::Release_tag::value;
137 using ClickOnNothing_Event = PositionedScenarioEvent<ClickOnNothing>;
138 using ClickOnTimeSync_Event
139 = PositionedWithId_ScenarioEvent<TimeSyncModel, ClickOnTimeSync>;
140 using ClickOnEvent_Event = PositionedWithId_ScenarioEvent<EventModel, ClickOnEvent>;
141 using ClickOnInterval_Event
142 = PositionedWithId_ScenarioEvent<IntervalModel, ClickOnInterval>;
143 using ClickOnState_Event = PositionedWithId_ScenarioEvent<StateModel, ClickOnState>;
145 using ClickOnLeftBrace_Event
146 = PositionedWithId_ScenarioEvent<IntervalModel, ClickOnLeftBrace>;
147 using ClickOnRightBrace_Event
148 = PositionedWithId_ScenarioEvent<IntervalModel, ClickOnRightBrace>;
151 using MoveOnNothing_Event = PositionedScenarioEvent<MoveOnNothing>;
152 using MoveOnTimeSync_Event
153 = PositionedWithId_ScenarioEvent<TimeSyncModel, MoveOnTimeSync>;
154 using MoveOnEvent_Event = PositionedWithId_ScenarioEvent<EventModel, MoveOnEvent>;
155 using MoveOnInterval_Event
156 = PositionedWithId_ScenarioEvent<IntervalModel, MoveOnInterval>;
157 using MoveOnState_Event = PositionedWithId_ScenarioEvent<StateModel, MoveOnState>;
159 using MoveOnLeftBrace_Event
160 = PositionedWithId_ScenarioEvent<IntervalModel, MoveOnLeftBrace>;
161 using MoveOnRightBrace_Event
162 = PositionedWithId_ScenarioEvent<IntervalModel, MoveOnRightBrace>;
165 using ReleaseOnNothing_Event = PositionedScenarioEvent<ReleaseOnNothing>;
166 using ReleaseOnTimeSync_Event
167 = PositionedWithId_ScenarioEvent<TimeSyncModel, ReleaseOnTimeSync>;
168 using ReleaseOnEvent_Event = PositionedWithId_ScenarioEvent<EventModel, ReleaseOnEvent>;
169 using ReleaseOnInterval_Event
170 = PositionedWithId_ScenarioEvent<IntervalModel, ReleaseOnInterval>;
171 using ReleaseOnState_Event = PositionedWithId_ScenarioEvent<StateModel, ReleaseOnState>;
172 using ReleaseOnTrigger_Event
174 using ReleaseOnLeftBrace_Event
175 = PositionedWithId_ScenarioEvent<IntervalModel, ReleaseOnLeftBrace>;
176 using 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>()
239 QString 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:14
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