private void DisplayNodeOptionsAtPosition(ParentConnection parentConnection)
        {
            GenericMenu genericMenu = new GenericMenu();

            genericMenu.AddItem(new GUIContent("Remove child from parent"), false, () => _window.RemoveChildFromParent(parentConnection.Child));
            genericMenu.ShowAsContext();
        }
        public void HandleEventFor(ParentConnection parentConnection, Event nodeEvent)
        {
            switch (nodeEvent.type)
            {
            case EventType.MouseDown:

                if (IsLeftMouseClick(nodeEvent.button))
                {
                    if (parentConnection.IsPointOverConnection(nodeEvent.mousePosition))
                    {
                        _window.Select(parentConnection);
                        nodeEvent.Use();
                    }
                }
                else if (IsRightMouseClick(nodeEvent.button) && _window.IsSelected(parentConnection))
                {
                    DisplayNodeOptionsAtPosition(parentConnection);
                    nodeEvent.Use();
                }

                break;
            }
        }