summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Control.cs
blob: 8788058a38623c9110f74fbe07340aecc1309d8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System.Collections.Generic;

namespace UnityEditor.Timeline
{
    class Control
    {
        readonly List<Manipulator> m_Manipulators = new List<Manipulator>();

        public bool HandleManipulatorsEvents(WindowState state)
        {
            var isHandled = false;

            foreach (var manipulator in m_Manipulators)
            {
                isHandled = manipulator.HandleEvent(state);
                if (isHandled)
                    break;
            }

            return isHandled;
        }

        public void AddManipulator(Manipulator m)
        {
            m_Manipulators.Add(m);
        }
    }
}