internal static bool AddToDocument(SceneView view, IProjectItem projectItem, Point dropPoint, ISceneInsertionPoint insertionPoint) { AssetDocumentType assetDocumentType = projectItem.DocumentType as AssetDocumentType; if (assetDocumentType != null) { return(assetDocumentType.AddToDocument(projectItem, (IView)view, insertionPoint, new Rect(dropPoint, new Vector(double.PositiveInfinity, double.PositiveInfinity)))); } return(projectItem.DocumentType.AddToDocument(projectItem, (IView)view)); }
internal static bool CanInsertTo(SceneView view, IProjectItem projectItem, ISceneInsertionPoint insertionPoint) { AssetDocumentType assetDocumentType = projectItem.DocumentType as AssetDocumentType; if (assetDocumentType != null) { return(assetDocumentType.CanInsertTo(projectItem, (IView)view, insertionPoint)); } return(projectItem.DocumentType.CanInsertTo(projectItem, (IView)view)); }
protected override bool InternalCanCreateInstance(ISceneInsertionPoint insertionPoint) { AssetDocumentType assetDocumentType = this.projectItem.DocumentType as AssetDocumentType; IView view = (IView)insertionPoint.SceneNode.ViewModel.DefaultView; if (assetDocumentType != null) { return(assetDocumentType.CanInsertTo(this.projectItem, view, insertionPoint)); } return(this.projectItem.DocumentType.CanInsertTo(this.projectItem, view)); }
protected override SceneNode InternalCreateInstance(ISceneInsertionPoint insertionPoint, Rect rect, OnCreateInstanceAction action) { AssetDocumentType assetDocumentType = this.projectItem.DocumentType as AssetDocumentType; if (assetDocumentType != null) { assetDocumentType.AddToDocument(this.projectItem, (IView)insertionPoint.SceneNode.ViewModel.DefaultView, insertionPoint, rect); } else { this.projectItem.DocumentType.AddToDocument(this.projectItem, (IView)insertionPoint.SceneNode.ViewModel.DefaultView); } return((SceneNode)null); }