/// <param name="editorGraphics">Owner EditorGraphics object that relays UI events to this element and manages its rendering.</param> /// <param name="isReceivingEvents">If true, new instance of GraphicalEventHandler is added to this graphical element.</param> /// <param name="parent">GraphicalElement position is calculated relative to Parent element. Can be null.</param> protected GraphicalElement(EditorGraphics editorGraphics, bool isReceivingEvents, GraphicalElement parent = null) { IsReceivingEvents = isReceivingEvents; if (isReceivingEvents) { GraphicalEventHandler = new GraphicalEventHandler(); } Parent = parent; Graphics = editorGraphics; Graphics.Register(this); }
public ExitJoint(EditorGraphics editorGraphics, GraphicalElement parent = null) : base(editorGraphics, true, parent) { renderer = new ExitJointRenderer(this, editorGraphics.ColorPalette); }
public AddStepButton(EditorGraphics editorGraphics, GraphicalElement parent = null) : base(editorGraphics, true, parent) { renderer = new AddStepButtonRenderer(this, editorGraphics.ColorPalette); }
public CreateTransitionButton(EditorGraphics editorGraphics, GraphicalElement parent = null) : base(editorGraphics, true, parent) { renderer = new CreateTransitionButtonRenderer(this, editorGraphics.ColorPalette); }
public bool RemoveChild(GraphicalElement child) { return(children.Remove(child)); }
public void AddChild(GraphicalElement child) { children.Add(child); }