// ======================================== // method // ======================================== public override void ConfigureEditor(IEditor editor) { var editorHandle = new MoveEditorHandle() { Cursor = Cursors.SizeAll }; var facade = MemopadApplication.Instance; editorHandle.KeyMap = facade.KeySchema.MemoContentEditorKeyMap; editor.InstallEditorHandle(editorHandle); editor.InstallHandle(new CompositeEdgePointAndAnchorHandle() { Cursor = Cursors.Cross }); Func <bool> orth = () => Model.Kind == MemoEdgeKind.Orthogonal || Model.Kind == MemoEdgeKind.OrthogonalMidpoint; editor.InstallHandle(new CompositeNewEdgePointHandle(orth) { Cursor = Cursors.Cross }); editor.InstallRole(new EdgeRole()); editor.InstallRole(new SelectRole()); editor.InstallRole(new RemoveRole()); editor.InstallRole(new CopyRole()); editor.InstallRole(new MoveEdgeRole()); editor.InstallRole(new ConnectRole()); editor.InstallRole(new ReorderRole()); }
public override void ConfigureEditor(IEditor editor) { var editorHandle = new MoveEditorHandle() { Cursor = Cursors.SizeAll }; var facade = MemopadApplication.Instance; editorHandle.KeyMap = facade.KeySchema.MemoContentEditorKeyMap; editor.InstallEditorHandle(editorHandle); editor.InstallHandle(new CompositeEdgePointAndAnchorHandle() { Cursor = Cursors.Cross }); Func <bool> orth = () => Figure.Router != null && (Figure.Router.GetType() == typeof(OrthogonalRouter) || Figure.Router.GetType() == typeof(OrthogonalMidpointRouter)); editor.InstallHandle(new CompositeNewEdgePointHandle(orth) { Cursor = Cursors.Cross }); editor.InstallRole(new EdgeRole()); editor.InstallRole(new SelectRole()); editor.InstallRole(new RemoveRole()); editor.InstallRole(new CopyRole()); editor.InstallRole(new MoveEdgeRole()); editor.InstallRole(new ConnectRole()); editor.InstallRole(new ReorderRole()); }
// ======================================== // method // ======================================== public override void ConfigureEditor(IEditor editor) { var editorHandle = new MoveEditorHandle() { Cursor = Cursors.SizeAll }; var facade = MemopadApplication.Instance; editorHandle.KeyMap = facade.KeySchema.MemoContentEditorKeyMap; editor.InstallEditorHandle(editorHandle); editor.InstallHandle(new CompositeCommentAnchorHandle() { Cursor = Cursors.Cross }); //editor.InstallHandle(new CompositeEdgePointAndAnchorHandle() { Cursor = Cursors.Cross }); //editor.InstallHandle(new CompositeNewEdgePointHandle() { Cursor = Cursors.Cross }); editor.InstallRole(new EdgeRole()); editor.InstallRole(new SelectRole()); editor.InstallRole(new RemoveRole()); editor.InstallRole(new CopyRole()); editor.InstallRole(new MoveEdgeRole()); //editor.InstallRole(new ConnectRole()); editor.InstallRole(new ConnectCommentRole()); editor.InstallRole(new ReorderRole()); }
// ======================================== // method // ======================================== public override void ConfigureEditor(IEditor editor) { var editorHandle = new MoveEditorHandle() { Cursor = Cursors.SizeAll }; var facade = MemopadApplication.Instance; editorHandle.KeyMap = facade.KeySchema.MemoContentEditorKeyMap; editor.InstallEditorHandle(editorHandle); editor.InstallHandle(new SelectionIndicatingHandle()); editor.InstallRole(new SelectRole()); editor.InstallRole(new MoveRole(false)); editor.InstallRole(new RemoveRole()); editor.InstallRole(new CopyRole()); editor.InstallRole(new ReorderRole()); }
// ======================================== // method // ======================================== public override void ConfigureEditor(IEditor editor) { var editorHandle = new MoveEditorHandle() { Cursor = Cursors.SizeAll }; var facade = MemopadApplication.Instance; editorHandle.KeyMap = facade.KeySchema.MemoContentEditorKeyMap; editor.InstallEditorHandle(editorHandle); editor.InstallHandle( new ResizeHandle(Directions.Left) { Cursor = Cursors.SizeWE } ); editor.InstallHandle( new ResizeHandle(Directions.Up) { Cursor = Cursors.SizeNS } ); editor.InstallHandle( new ResizeHandle(Directions.Right) { Cursor = Cursors.SizeWE } ); editor.InstallHandle( new ResizeHandle(Directions.Down) { Cursor = Cursors.SizeNS } ); editor.InstallHandle( new ResizeHandle(Directions.UpLeft) { Cursor = Cursors.SizeNWSE } ); editor.InstallHandle( new ResizeHandle(Directions.UpRight) { Cursor = Cursors.SizeNESW } ); editor.InstallHandle( new ResizeHandle(Directions.DownLeft) { Cursor = Cursors.SizeNESW } ); editor.InstallHandle( new ResizeHandle(Directions.DownRight) { Cursor = Cursors.SizeNWSE } ); editor.InstallRole(new SelectRole()); editor.InstallRole(new ResizeRole()); editor.InstallRole(new RemoveRole()); editor.InstallRole(new CopyRole()); editor.InstallRole(new ReorderRole()); var export = new ExportRole(); export.RegisterExporter("PNG", ExportPngFile); export.RegisterExporter("JPEG", ExportJpegFile); editor.InstallRole(export); }
// ======================================== // method // ======================================== public override void ConfigureEditor(IEditor editor) { var editorHandle = new MoveEditorHandle() { Cursor = Cursors.SizeAll }; var facade = MemopadApplication.Instance; editorHandle.KeyMap = facade.KeySchema.MemoContentEditorKeyMap; editor.InstallEditorHandle(editorHandle); editor.InstallHandle( new ResizeHandle(Directions.Left) { Cursor = Cursors.SizeWE } ); editor.InstallHandle( new ResizeHandle(Directions.Up) { Cursor = Cursors.SizeNS } ); editor.InstallHandle( new ResizeHandle(Directions.Right) { Cursor = Cursors.SizeWE } ); editor.InstallHandle( new ResizeHandle(Directions.Down) { Cursor = Cursors.SizeNS } ); editor.InstallHandle( new ResizeHandle(Directions.UpLeft) { Cursor = Cursors.SizeNWSE } ); editor.InstallHandle( new ResizeHandle(Directions.UpRight) { Cursor = Cursors.SizeNESW } ); editor.InstallHandle( new ResizeHandle(Directions.DownLeft) { Cursor = Cursors.SizeNESW } ); editor.InstallHandle( new ResizeHandle(Directions.DownRight) { Cursor = Cursors.SizeNWSE } ); editor.InstallRole(new SelectRole()); editor.InstallRole(new FocusRole(UmlClassifierHelper.InitUmlInterfaceFocus, UmlClassifierHelper.CommitInterfaceFocus)); editor.InstallRole(new ResizeRole()); editor.InstallRole(new RemoveRole()); //editor.InstallRole(new CopyRole()); editor.InstallRole(new ReorderRole()); //editor.InstallRole(new SetPlainTextFontRole(FontModificationKinds.Name)); var editorFocus = new StyledTextFocus(); editorFocus.KeyMap = facade.KeySchema.MemoContentSingleLineFocusKeyMap; editorFocus.Figure.Padding = editorFocus.Figure.Padding.GetTopChanged(4); editor.InstallFocus(editorFocus); }