protected override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.eventTypeId == GeometryChangedEvent.TypeId()) { UpdateSeparators(); } else if (evt.eventTypeId == DetachFromPanelEvent.TypeId()) { graphView = null; } else if (evt.eventTypeId == AttachToPanelEvent.TypeId()) { graphView = GetFirstAncestorOfType <GraphView>(); if (graphView != null) { // Restore selections on children. foreach (var child in Children().OfType <GraphElement>()) { graphView.RestorePersitentSelectionForElement(child); } } } }
protected override void ExecuteDefaultAction(EventBase evt) { if (evt.eventTypeId == GeometryChangedEvent.TypeId()) { if (m_Attacher != null) { PerformTipLayout(); } } else if (evt.eventTypeId == DetachFromPanelEvent.TypeId()) { if (m_Attacher != null) { m_Attacher.Detach(); m_Attacher = null; } HideText(); } else if (evt.eventTypeId == MouseEnterEvent.TypeId()) { //we make sure we sit on top of whatever siblings we have BringToFront(); ShowText(); } else if (evt.eventTypeId == MouseLeaveEvent.TypeId()) { HideText(); } base.ExecuteDefaultAction(evt); }
protected override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.eventTypeId == GeometryChangedEvent.TypeId()) { UpdateSeparators(); } }
protected override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt == null) { return; } if (evt.eventTypeId == GeometryChangedEvent.TypeId()) { UpdateDragElementPosition((GeometryChangedEvent)evt); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if ((evt as MouseDownEvent)?.button == (int)MouseButton.LeftMouse || (evt as KeyDownEvent)?.character == '\n') { ShowCurveEditor(); } else if (evt.GetEventTypeId() == DetachFromPanelEvent.TypeId()) { OnDetach(); } if (evt.GetEventTypeId() == GeometryChangedEvent.TypeId()) { m_TextureDirty = true; } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == GeometryChangedEvent.TypeId()) { UpdateSeparators(); } else if (evt.GetEventTypeId() == DetachFromPanelEvent.TypeId()) { graphView = null; } else if (evt.GetEventTypeId() == AttachToPanelEvent.TypeId()) { graphView = GetFirstAncestorOfType <GraphView>(); } }
protected override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt == null) { return; } var showCurveEditor = false; KeyDownEvent kde = (evt as KeyDownEvent); if (kde != null) { if ((kde.keyCode == KeyCode.Space) || (kde.keyCode == KeyCode.KeypadEnter) || (kde.keyCode == KeyCode.Return)) { showCurveEditor = true; } } else if ((evt as MouseDownEvent)?.button == (int)MouseButton.LeftMouse) { var mde = (MouseDownEvent)evt; if (visualInput.ContainsPoint(visualInput.WorldToLocal(mde.mousePosition))) { showCurveEditor = true; } } if (showCurveEditor) { ShowCurveEditor(); } else if (evt.eventTypeId == DetachFromPanelEvent.TypeId()) { OnDetach(); } if (evt.eventTypeId == GeometryChangedEvent.TypeId()) { m_TextureDirty = true; } }