// arrow routing - just create a composite of arrow modifications internal void onStartRoute() { if (!undoEnabled) { return; } currRouteCmd = new CompositeCmd(document, "Route"); }
// tree collapse or expand internal void onStartExpand() { if (!undoEnabled) { return; } currExpandCmd = new CompositeCmd(document, "Expand"); }
// save positions of all items on layout internal void onStartLayout(string title) { if (!undoEnabled) { return; } currLayoutCmd = new CompositeCmd(document, title); foreach (ChartObject item in document.Objects) { currLayoutCmd.AddSubCmd(new ModifyItemCmd(item)); } }
public CompositeCmd StartComposite(string title, bool saveZOrder) { if (!undoEnabled) { return(null); } if (currCompositeCmd != null) { return(currCompositeCmd); } currCompositeCmd = new CompositeCmd(document, title, saveZOrder); currCompositeCmd.setContext(defaultCmdContext); return(currCompositeCmd); }
public void CutToClipboard() { CopyToClipboard(); // that returns the active composite if somebody has already created one CompositeCmd composite = frmFlowChart.FlowChart.UndoManager.StartComposite("_Kenwalt.SysCAD_"); // delete selected items frmFlowChart.State.Remove(frmFlowChart.FlowChart); if (composite != null && composite.Title == "_Kenwalt.SysCAD_") { // this is our own composite cmd composite.Title = "Cut"; composite.Execute(); } }
public bool PasteSelection(Diagram doc, SelectionCopy data, CompositeCmd cmd, Vector offset);