Exemplo n.º 1
0
        /// <summary>
        /// Not yet documented.
        /// </summary>
        public static DragHandle BeginDragHandle(object key, object obj, bool isVirtualDragHandle, DragAndDropMethods defaultMethod = DragAndDropMethods.Move)
        {
            Update();

            if (Event.current.type == EventType.Repaint)
            {
                GUIHelper.BeginLayoutMeasuring();
            }

            var dragHandle = GUIHelper.GetTemporaryContext <DragHandle>(draggableKey, key).Value;

            dragHandle.Object            = obj;
            dragHandle.DragAndDropMethod = defaultMethod;
            dragHandle.LayoutDepth       = dragHandles.Count;
            dragHandles.Push(dragHandle);

            dragHandle.SourceWindow = GUIHelper.CurrentWindow;
            return(dragHandle);
        }