Exemple #1
0
            public static void SetValueForEdge(IEnumerable <ITimelineItem> items, AttractedEdge edge, double value, WindowState state)
            {
                var handler = new MoveItemHandler(state);

                foreach (var item in items)
                {
                    handler.Grab(new[] { item }, item.parentTrack);
                    handler.OnAttractedEdge(null, ManipulateEdges.Both, edge, value);
                    handler.Drop();
                }
            }
Exemple #2
0
            public void OnExitDrag()
            {
                if (m_MoveItemHandler == null)
                {
                    return;
                }

                m_MoveItemHandler.Drop();
                m_MoveItemHandler = null;
                GUIUtility.ExitGUI();
            }
        void DropItems()
        {
            // Order matters here: m_MoveItemHandler.movingItems is destroyed during call to Drop()
            foreach (var movingItem in m_MoveItemHandler.movingItems)
            {
                foreach (var item in movingItem.items)
                {
                    item.gui.StopDrag();
                }
            }

            m_MoveItemHandler.Drop();
        }
Exemple #4
0
            public void OnSetValue(IEnumerable <ITimelineItem> items, double value, WindowState state)
            {
                if (!items.Any())
                {
                    return;
                }

                m_MoveItemHandler = new MoveItemHandler(state);
                m_MoveItemHandler.Grab(items, items.First().parentTrack);
                m_MoveItemHandler.OnAttractedEdge(null, ManipulateEdges.Both, AttractedEdge.None, value);
                m_MoveItemHandler.Drop();
                m_MoveItemHandler = null;
            }