public override void OnDestroy(IWindowModel model) { EditorApplication.playModeStateChanged -= PlayModeStateChangedCallback; AnimationMode.onAnimationRecordingStart -= RefreshStylesAfterExternalEvent; AnimationMode.onAnimationRecordingStop -= RefreshStylesAfterExternalEvent; m_NotificationContainer.onGUIHandler = null; m_NotificationContainer.RemoveFromHierarchy(); UnregisterImguiContainerGUICallbacks(); UnregisterWindow(); base.OnDestroy(model); }
protected void DeregisterSelectedPane(bool clearActualView, bool sendEvents) { if (!m_ActualView) { return; } var root = m_ActualView.rootVisualElement; if (root.hierarchy.parent == visualTree) { root.RemoveFromHierarchy(); panel.getViewDataDictionary = null; panel.saveViewData = null; } if (GetPaneMethod("Update") != null) { EditorApplication.update -= SendUpdate; } if (GetPaneMethod("ModifierKeysChanged") != null) { EditorApplication.modifierKeysChanged -= SendModKeysChanged; } if (m_ActualView.m_FadeoutTime != 0) { EditorApplication.update -= m_ActualView.CheckForWindowRepaint; } m_NotificationContainer.onGUIHandler = null; m_NotificationContainer.RemoveFromHierarchy(); if (clearActualView) { EditorWindow oldActualView = m_ActualView; m_ActualView = null; if (sendEvents) { Invoke("OnLostFocus", oldActualView); Invoke("OnBecameInvisible", oldActualView); } } }
private void RecomputeSize(IMGUIContainer container) // @formatter:on { if (container == null) { return; } var parent = container.parent; container.RemoveFromHierarchy(); parent.Add(container); }
public override void OnDestroy(IWindowModel model) { EditorApplication.playModeStateChanged -= PlayModeStateChangedCallback; AnimationMode.onAnimationRecordingStart -= RefreshStylesAfterExternalEvent; AnimationMode.onAnimationRecordingStop -= RefreshStylesAfterExternalEvent; editorWindowModel.notificationVisibilityChanged = null; editorWindowModel.blurred = null; editorWindowModel.focused = null; editorWindowModel.playModeTintColorChanged = null; editorWindowModel.onRegisterWindow = null; editorWindowModel.onUnegisterWindow = null; editorWindowModel.onDisplayWindowMenu = null; editorWindowModel.viewMarginsChanged = null; m_NotificationContainer.onGUIHandler = null; m_NotificationContainer.RemoveFromHierarchy(); base.OnDestroy(model); }
public void ReloadView() { if (input == null || output == null) { return; } if (input.orientation == Orientation.Horizontal && input.direction == Direction.Input) { PortView port = input as PortView; MemberData member = port.portData.GetPortValue() as MemberData; isProxy = member != null && member.IsProxy(); } else if (output.orientation == Orientation.Vertical && output.direction == Direction.Output) { PortView port = output as PortView; MemberData member = port.portData.GetPortValue() as MemberData; isProxy = member != null && member.IsProxy(); } if (isProxy) { edgeControl.visible = false; edgeControl.SetEnabled(false); } #region Debug if (Application.isPlaying && uNodeUtility.useDebug) { //if(graphView != null) { // graphView.RegisterIMGUI(this, DebugGUI); //} //iMGUIContainer = graphView.IMGUIContainer; if (iMGUIContainer == null) { iMGUIContainer = new IMGUIContainer(DebugGUI); iMGUIContainer.style.flexGrow = 1; iMGUIContainer.style.flexShrink = 0; iMGUIContainer.pickingMode = PickingMode.Ignore; edgeControl.Add(iMGUIContainer); } } else if (iMGUIContainer != null) { iMGUIContainer.RemoveFromHierarchy(); iMGUIContainer = null; } #endregion }
public virtual void OnDestroy(IWindowModel model) { if (imguiContainer != null) { if (imguiContainer.HasMouseCapture()) { imguiContainer.ReleaseMouse(); } imguiContainer.RemoveFromHierarchy(); Assert.AreEqual(imguiContainer, m_Panel.rootIMGUIContainer); m_Panel.rootIMGUIContainer = null; imguiContainer = null; } // Here we assume m_Model == model. We should probably make the ignored OnDestroy argument obsolete. m_Model = null; m_Panel.Dispose(); }
public virtual void OnDestroy(IWindowModel model) { if (imguiContainer != null) { if (imguiContainer.HasMouseCapture()) { imguiContainer.ReleaseMouse(); } imguiContainer.RemoveFromHierarchy(); imguiContainer = null; } if (m_Model != null) { m_Model.sizeChanged = OnSizeChanged; m_Model.eventInterestsChanged = OnEventsInterestsChanged; m_Model = null; } m_Panel.Dispose(); }
public virtual void OnDestroy(IWindowModel model) { if (imguiContainer != null) { if (imguiContainer.HasMouseCapture()) { imguiContainer.ReleaseMouse(); } imguiContainer.RemoveFromHierarchy(); Assert.AreEqual(imguiContainer, m_Panel.rootIMGUIContainer); m_Panel.rootIMGUIContainer = null; imguiContainer = null; } if (m_Model != null) { m_Model.sizeChanged = null; m_Model.eventInterestsChanged = null; m_Model = null; } m_Panel.Dispose(); }