Beispiel #1
0
 internal void CreateManipulator(NodeModel model, DynamoManipulationExtension manipulatorContext)
 {
     var creators = registeredManipulatorCreators.Where(pair => pair.Key.IsInstanceOfType(model)).SelectMany(pair => pair.Value);
     activeManipulators[model.GUID] = new CompositeManipulator(
         creators.Select(x => x.Create(model, manipulatorContext)).
         Where(x => x != null).ToList());
 }
        internal void CreateManipulator(NodeModel model, DynamoManipulationExtension manipulatorContext)
        {
            var creators = registeredManipulatorCreators.Where(pair => pair.Key.IsInstanceOfType(model)).SelectMany(pair => pair.Value);

            activeManipulators[model.GUID] = new CompositeManipulator(
                creators.Select(x => x.Create(model, manipulatorContext)).
                Where(x => x != null).ToList());
        }
Beispiel #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="node">Node for which manipulator is created.</param>
        /// <param name="manipulatorContext">Context for manipulator</param>
        protected NodeManipulator(NodeModel node, DynamoManipulationExtension manipulatorContext)
        {
            this.manipulatorContext = manipulatorContext;
            Node = node;

            AttachBaseHandlers();

            CameraPosition = BackgroundPreviewViewModel.GetCameraPosition();

            DrawManipulator();
        }
Beispiel #4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="node">Node for which manipulator is created.</param>
        /// <param name="manipulatorContext">Context for manipulator</param>
        protected NodeManipulator(NodeModel node, DynamoManipulationExtension manipulatorContext)
        {
            Node                       = node;
            WorkspaceModel             = manipulatorContext.WorkspaceModel;
            BackgroundPreviewViewModel = manipulatorContext.BackgroundPreviewViewModel;
            RenderPackageFactory       = manipulatorContext.RenderPackageFactory;
            CommandExecutive           = manipulatorContext.CommandExecutive;
            UniqueId                   = manipulatorContext.UniqueId;
            ExtensionName              = manipulatorContext.Name;

            AttachBaseHandlers();

            DrawManipulator();
        }
        public INodeManipulator Create(NodeModel node, DynamoManipulationExtension manipulatorContext)
        {
            var dsFunction = node as DSFunction;
            if (dsFunction == null) return null;

            var name = dsFunction.CreationName;

            IEnumerable<INodeManipulatorFactory> creators;
            if (manipulatorCreators.TryGetValue(name, out creators))
            {
                return new CompositeManipulator(creators.Select(x => x.Create(node, manipulatorContext)).ToList());
            }
            return null;
        }
Beispiel #6
0
        public INodeManipulator Create(NodeModel node, DynamoManipulationExtension manipulatorContext)
        {
            var dsFunction = node as DSFunction;

            if (dsFunction == null)
            {
                return(null);
            }

            var name = dsFunction.CreationName;

            IEnumerable <INodeManipulatorFactory> creators;

            if (manipulatorCreators.TryGetValue(name, out creators))
            {
                return(new CompositeManipulator(creators.Select(x => x.Create(node, manipulatorContext)).ToList()));
            }
            return(null);
        }
Beispiel #7
0
 /// <summary>
 /// Create a set of manipulators for the given node by inspecting its numeric inputs
 /// </summary>
 /// <param name="node"></param>
 /// <param name="manipulatorContext"></param>
 /// <returns></returns>
 public abstract INodeManipulator Create(NodeModel node, DynamoManipulationExtension manipulatorContext);
Beispiel #8
0
 /// <summary>
 /// Create a set of manipulators for the given node by inspecting its numeric inputs
 /// </summary>
 /// <param name="node"></param>
 /// <param name="manipulatorContext"></param>
 /// <returns></returns>
 public abstract INodeManipulator Create(NodeModel node, DynamoManipulationExtension manipulatorContext);
Beispiel #9
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="node">Node for which manipulator is created.</param>
        /// <param name="manipulatorContext">Context for manipulator</param>
        protected NodeManipulator(NodeModel node, DynamoManipulationExtension manipulatorContext)
        {
            Node = node;
            WorkspaceModel = manipulatorContext.WorkspaceModel;
            BackgroundPreviewViewModel = manipulatorContext.BackgroundPreviewViewModel;
            RenderPackageFactory = manipulatorContext.RenderPackageFactory;
            CommandExecutive = manipulatorContext.CommandExecutive;
            UniqueId = manipulatorContext.UniqueId;
            ExtensionName = manipulatorContext.Name;
                
            AttachBaseHandlers();

            DrawManipulator();
        }
 internal MousePointManipulator(DSFunction node, DynamoManipulationExtension manipulatorContext)
     : base(node, manipulatorContext)
 {
 }
 public INodeManipulator Create(NodeModel node, DynamoManipulationExtension manipulatorContext)
 {
     return new MousePointManipulator(node as DSFunction, manipulatorContext);
 }
 internal PointOnCurveManipulator(DSFunction node, DynamoManipulationExtension manipulatorContext)
     : base(node, manipulatorContext)
 {
 }
Beispiel #13
0
 internal PointOnCurveManipulator(DSFunction node, DynamoManipulationExtension manipulatorContext)
     : base(node, manipulatorContext)
 {
 }
Beispiel #14
0
 public INodeManipulator Create(NodeModel node, DynamoManipulationExtension manipulatorContext)
 {
     return(new PointOnCurveManipulator(node as DSFunction, manipulatorContext));
 }
Beispiel #15
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="node">Node for which manipulator is created.</param>
        /// <param name="manipulatorContext">Context for manipulator</param>
        protected NodeManipulator(NodeModel node, DynamoManipulationExtension manipulatorContext)
        {
            this.manipulatorContext = manipulatorContext;
            Node = node;
            
            AttachBaseHandlers();

            CameraPosition = BackgroundPreviewViewModel.GetCameraPosition();

            DrawManipulator();
        }
 internal MousePointManipulator(DSFunction node, DynamoManipulationExtension manipulatorContext)
     : base(node, manipulatorContext)
 {
 }