public rMindDeviceOutput(rMindBaseController parent) : base(parent) { m_element_type = rElementType.RET_DEVICE_OUTPUT; AddSetter(); AddSetter(); content = new Border { IsHitTestVisible = false, Margin = new Windows.UI.Xaml.Thickness(4, 0, 0, 0), CornerRadius = new Windows.UI.Xaml.CornerRadius(0, 4, 4, 0), Background = ColorContainer.rMindColors.Current().GetSolidBrush((Color)ColorHelper.FromArgb(255, 51, 51, 51)), Child = new FontIcon() { Glyph = "\uE964", FontSize = 32, Foreground = ColorContainer.rMindColors.Current().GetSolidBrush(Colors.White) } }; Grid.SetColumn(content, 1); Grid.SetColumnSpan(content, 2); Grid.SetRowSpan(content, 2); // #2E4DA0 AccentColor = (Color)ColorHelper.FromArgb(255, 46, 77, 160); SetBorderRadius(new Windows.UI.Xaml.CornerRadius(4)); Template.UseLayoutRounding = true; Template.Children.Add(content); }
rMindBaseElement Create(rMindBaseController controller, double x, double y) { var container = new rMindBaseElement(controller); container.CreateNode(); container.Translate(new rMind.Types.Vector2(x, y)); return(container); }
public void Back() { if (m_bread_crumbs.Count < 2) { return; } m_current_controller?.Unsubscribe(); m_bread_crumbs.Remove(m_current_controller); m_current_controller = m_bread_crumbs.LastOrDefault(); m_current_controller?.Subscribe(m_canvas, m_scroll); }
public MathNodeBase(rMindBaseController parent) : base(parent) { Header = "A * B"; nodeA = new Node(this) { HLSLValueBaseType = Values.HLSLValueBaseType.ADAPTIVE, Label = "A", Stroke = new SolidColorBrush(Colors.MediumVioletRed), UseAccentColor = false, ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Left, }; output = new Node(this) { HLSLValueBaseType = Values.HLSLValueBaseType.ADAPTIVE, Label = "OUT", Stroke = new SolidColorBrush(Colors.MediumVioletRed), UseAccentColor = false, ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, }; AddRow(new rMind.Content.Row.rMindRow { InputNode = nodeA, OutputNode = output, }); nodeB = new Node(this) { HLSLValueBaseType = Values.HLSLValueBaseType.ADAPTIVE, Label = "B", Stroke = new SolidColorBrush(Colors.MediumVioletRed), UseAccentColor = false, ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Left, }; AddRow(new rMind.Content.Row.rMindRow { InputNode = nodeB, OutputNodeType = rMindNodeConnectionType.None }); CanExpand = false; CanEdit = false; }
public void SetController(rMindBaseController controller) { if (controller != null && controller.CanvasController == null) { controller.SetParent(this); } if (m_root_controller == null) { m_root_controller = controller; } if (m_bread_crumbs.Contains(controller)) { // Переход по хлебным крошкам. var idx = m_bread_crumbs.IndexOf(controller); m_current_controller?.Unsubscribe(); m_current_controller = controller; if (m_draw) { m_current_controller.Subscribe(m_canvas, m_scroll); } var remove = m_bread_crumbs.Where(x => m_bread_crumbs.IndexOf(x) > idx).ToList(); foreach (var item in remove) { m_bread_crumbs.Remove(item); } return; } m_current_controller?.Unsubscribe(); if (controller == null) { return; } m_current_controller = controller; if (m_draw) { m_current_controller.Subscribe(m_canvas, m_scroll); } m_bread_crumbs.Add(m_current_controller); }
public Material(rMindBaseController parent) : base(parent) { var row = new rMindRow { InputNode = new Node(this) { HLSLValueBaseType = HLSLValueBaseType.FLOAT4, IDS = "color", Label = "Color", ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Left, Stroke = new SolidColorBrush(Colors.White) }, OutputNodeType = rMindNodeConnectionType.None }; AddRow(row); }
public PSNormal(rMindBaseController parent) : base(parent) { AccentColor = Colors.LimeGreen; output = new Node(this) { HLSLValueBaseType = Values.HLSLValueBaseType.FLOAT3, Label = "ps input :: normal", Stroke = new SolidColorBrush(Colors.MediumVioletRed), UseAccentColor = false, ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, }; AddRow(new rMind.Content.Row.rMindRow { OutputNode = output, InputNodeType = rMind.Nodes.rMindNodeConnectionType.None }); output.Column = 1; }
public Luminosity(rMindBaseController parent) : base(parent) { AccentColor = Colors.DarkOrange; var output = new Node(this) { HLSLValueBaseType = Values.HLSLValueBaseType.FLOAT, HLSLValueSubType = Values.HLSLValueSubType.NONE, Label = "luminosity", Stroke = new SolidColorBrush(Colors.DeepSkyBlue), UseAccentColor = false, ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, }; AddRow(new rMind.Content.Row.rMindRow { OutputNode = output, InputNodeType = rMind.Nodes.rMindNodeConnectionType.None }); output.Column = 1; }
public RowContainerBase(rMindBaseController parent) : base(parent) { AccentColor = Colors.Black; }
public void SetController(rMindBaseController controller) { m_current_controller?.Unsubscribe(); }
public rMindDebugContainer(rMindBaseController parent) : base(parent) { }
public rMindQuadContainer(rMindBaseController parent) : base(parent) { m_vertical_lines = new List <rMindVerticalLine>(); m_horizontal_lines = new List <rMindHorizontalLine>(); }
public ColorNode(rMindBaseController parent) : base(parent) { var cp = new ColorPicker(); cp.ColorChanged += (s, e) => { r = e.NewColor.R / 255.0M; g = e.NewColor.G / 255.0M; b = e.NewColor.B / 255.0M; }; picker = new Flyout { Placement = FlyoutPlacementMode.Bottom, Content = cp }; AddRow(new rMindRow { InputNodeType = rMindNodeConnectionType.None, OutputNode = new Node(this) { HLSLValueBaseType = HLSLValueBaseType.FLOAT4, UseAccentColor = false, IDS = "color", Label = "Color", ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, Stroke = new SolidColorBrush(Colors.White) } }); AddSeparator(); // Red AddRow(new rMindRow { InputNodeType = rMindNodeConnectionType.None, OutputNode = new Node(this) { HLSLValueBaseType = HLSLValueBaseType.FLOAT, HLSLValueSubType = HLSLValueSubType.X_R, UseAccentColor = false, IDS = "R", Label = "R", ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, Stroke = new SolidColorBrush(Colors.IndianRed) } }); // Green AddRow(new rMindRow { InputNodeType = rMindNodeConnectionType.None, OutputNode = new Node(this) { HLSLValueBaseType = HLSLValueBaseType.FLOAT, HLSLValueSubType = HLSLValueSubType.Y_G, UseAccentColor = false, IDS = "G", Label = "G", ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, Stroke = new SolidColorBrush(Colors.Green) } }); // Blue AddRow(new rMindRow { InputNodeType = rMindNodeConnectionType.None, OutputNode = new Node(this) { HLSLValueBaseType = HLSLValueBaseType.FLOAT, HLSLValueSubType = HLSLValueSubType.Z_B, UseAccentColor = false, IDS = "B", Label = "B", ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, Stroke = new SolidColorBrush(Colors.DeepSkyBlue) } }); }
public rMindRowContainer(rMindBaseController parent) : base(parent) { m_rows = new List <IRow>(); }
public rMindHeaderRowContainer(rMindBaseController parent) : base(parent) { CanExpand = true; CanEdit = true; }
public MultipleNode(rMindBaseController parent) : base(parent) { }
public Vector3Node(rMindBaseController parent) : base(parent) { AccentColor = Colors.DarkBlue; // Green AddRow(new rMindRow { InputNodeType = rMindNodeConnectionType.None, OutputNode = new Node(this) { HLSLValueBaseType = HLSLValueBaseType.FLOAT3, UseAccentColor = false, IDS = "vector", Label = "vector3", ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, Stroke = new SolidColorBrush(Colors.Green) } }); AddSeparator(); // x | r AddRow(new rMindRow { InputNodeType = rMindNodeConnectionType.None, OutputNode = new Node(this) { HLSLValueBaseType = HLSLValueBaseType.FLOAT, HLSLValueSubType = HLSLValueSubType.X_R, UseAccentColor = false, IDS = "X", Label = "X", ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, Stroke = new SolidColorBrush(Colors.IndianRed) } }); // y | g AddRow(new rMindRow { InputNodeType = rMindNodeConnectionType.None, OutputNode = new Node(this) { HLSLValueBaseType = HLSLValueBaseType.FLOAT, HLSLValueSubType = HLSLValueSubType.Y_G, UseAccentColor = false, IDS = "Y", Label = "Y", ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, Stroke = new SolidColorBrush(Colors.Green) } }); // z | b AddRow(new rMindRow { InputNodeType = rMindNodeConnectionType.None, OutputNode = new Node(this) { HLSLValueBaseType = HLSLValueBaseType.FLOAT, HLSLValueSubType = HLSLValueSubType.Z_B, UseAccentColor = false, IDS = "Z", Label = "Z", ConnectionType = rMindNodeConnectionType.Container, NodeOrientation = rMindNodeOriantation.Right, Stroke = new SolidColorBrush(Colors.DeepSkyBlue) } }); }