Example #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());
 }
Example #2
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());
        }
Example #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();
        }
Example #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;
        }
Example #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);
        }
Example #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);
Example #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);
Example #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)
 {
 }
Example #13
0
 internal PointOnCurveManipulator(DSFunction node, DynamoManipulationExtension manipulatorContext)
     : base(node, manipulatorContext)
 {
 }
Example #14
0
 public INodeManipulator Create(NodeModel node, DynamoManipulationExtension manipulatorContext)
 {
     return(new PointOnCurveManipulator(node as DSFunction, manipulatorContext));
 }
Example #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)
 {
 }