Loading...
Searching...
No Matches
ProcessFlags.hpp
1#pragma once
2#include <ossia/detail/config.hpp>
3
4#include <cinttypes>
5namespace Process
6{
7class ProcessModel;
8class ProcessModelFactory;
9class LayerFactory;
10class EffectFactory;
11
12#define SCORE_FLAG(i) (1 << i)
16enum ProcessFlags : int64_t
17{
19 SupportsTemporal = SCORE_FLAG(0),
20
22 TimeIndependent = SCORE_FLAG(1),
23
25 SupportsState = SCORE_FLAG(2),
26
28 RequiresCustomData = SCORE_FLAG(3),
29
31 PutInNewSlot = SCORE_FLAG(4),
32
34 HandlesLooping = SCORE_FLAG(5),
35
37 ControlSurface = SCORE_FLAG(6),
38
40 FullyCustomItem = SCORE_FLAG(7),
41
44 CanCreateControls = SCORE_FLAG(8),
45
47 CreateControls = SCORE_FLAG(9),
48
50 Snapshottable = SCORE_FLAG(10),
51
53 Recordable = SCORE_FLAG(11),
54
56 ItemRequiresUniqueFocus = SCORE_FLAG(12),
57
59 DynamicPorts = SCORE_FLAG(13),
60
61 SupportsLasting = SupportsTemporal | TimeIndependent,
62 ExternalEffect
65};
66
67constexpr ProcessFlags operator|(ProcessFlags a, ProcessFlags b) noexcept
68{
69 return ProcessFlags((int64_t)a | (int64_t)b);
70}
71
72constexpr ProcessFlags operator|=(ProcessFlags& a, ProcessFlags b) noexcept
73{
74 return a = a | b;
75}
76
81class ProcessFlags_k;
82}
Metadata to retrieve the ProcessFlags of a process.
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
ProcessFlags
Various settings for processes.
Definition ProcessFlags.hpp:17
@ ControlSurface
The process supports being exposed to the ControlSurface.
Definition ProcessFlags.hpp:37
@ SupportsState
Can be loaded in a state.
Definition ProcessFlags.hpp:25
@ HandlesLooping
The presenter / view already handles rendering when the model loops.
Definition ProcessFlags.hpp:34
@ Snapshottable
The process is snapshottable.
Definition ProcessFlags.hpp:50
@ CreateControls
The process is currently creating new controls (the runtime state changed by the user)
Definition ProcessFlags.hpp:47
@ SupportsTemporal
Can be loaded as a process of an interval.
Definition ProcessFlags.hpp:19
@ Recordable
The process is recordable.
Definition ProcessFlags.hpp:53
@ CanCreateControls
Definition ProcessFlags.hpp:44
@ DynamicPorts
The process has a variable structure, e.g. its ports can change dynamically.
Definition ProcessFlags.hpp:59
@ PutInNewSlot
When created in an interval, go on the top slot or in a new slot.
Definition ProcessFlags.hpp:31
@ FullyCustomItem
The process's item handles all the decoration (won't be title, etc)
Definition ProcessFlags.hpp:40
@ RequiresCustomData
Action from the user required upon creation.
Definition ProcessFlags.hpp:28
@ ItemRequiresUniqueFocus
The process has an editable widget which must unfocus & unselect other items.
Definition ProcessFlags.hpp:56
@ TimeIndependent
The process won't change if the parent duration changes (eg it's a filter)
Definition ProcessFlags.hpp:22