/// <summary> /// Configures table editing specific parts. /// </summary> private void ConfigureTableEditing() { //Create a new TEIM instance which also allows drag and drop tableEditorInputMode = new TableEditorInputMode { //Enable drag & drop StripeDropInputMode = { Enabled = true }, //Maximal level for both reparent and drag and drop is 2 ReparentStripeHandler = new ReparentStripeHandler { MaxColumnLevel = 2, MaxRowLevel = 2 }, //Set the priority higher than for the handle input mode so that handles win if both gestures are possible Priority = graphEditorInputMode.HandleInputMode.Priority + 1 }; //Add to GEIM graphEditorInputMode.Add(tableEditorInputMode); //Tooltip and context menu stuff for tables graphEditorInputMode.ContextMenuItems = GraphItemTypes.Node; graphEditorInputMode.PopulateItemContextMenu += graphEditorInputMode_PopulateItemContextMenu; graphEditorInputMode.PopulateItemContextMenu += graphEditorInputMode_PopulateNodeContextMenu; graphEditorInputMode.MouseHoverInputMode.QueryToolTip += MouseHoverInputMode_QueryToolTip; // we don't provide candidates for the pool nodes, so tell the input mode not to create edges, if // there aren't any candidates. That way, we can start marquee selection inside pool nodes graphEditorInputMode.CreateEdgeInputMode.UseHitItemsCandidatesOnly = true; graphEditorInputMode.AllowGroupingOperations = true; }
/// <summary> /// Configures table editing specific parts. /// </summary> private void ConfigureTableEditing() { //Create a new TEIM instance which also allows drag and drop tableEditorInputMode = new TableEditorInputMode { //Enable drag & drop StripeDropInputMode = { Enabled = true }, //Maximal level for both reparent and drag and drop is 2 ReparentStripeHandler = new ReparentStripeHandler { MaxColumnLevel = 2, MaxRowLevel = 2 }, //Set the priority higher than for the handle input mode so that handles win if both gestures are possible Priority = graphEditorInputMode.HandleInputMode.Priority + 1 }; //Add to GEIM graphEditorInputMode.Add(tableEditorInputMode); //Tooltip and context menu stuff for tables graphEditorInputMode.ContextMenuItems = GraphItemTypes.Node; graphEditorInputMode.PopulateItemContextMenu += graphEditorInputMode_PopulateItemContextMenu; graphEditorInputMode.PopulateItemContextMenu += graphEditorInputMode_PopulateNodeContextMenu; graphEditorInputMode.MouseHoverInputMode.QueryToolTip += MouseHoverInputMode_QueryToolTip; }