public virtual void UpdateLayout() { if (frontend.Margin.HorizontalSpacing == 0 && frontend.Margin.VerticalSpacing == 0) { if (alignment != null) { Widget.RemoveFromSuperview(); NSView cont = alignment.Superview; if (cont != null) { MacEngine.ReplaceChild(cont, alignment, Widget); } alignment.Dispose(); alignment = null; } } else { if (alignment == null) { alignment = new NSView(); alignment.Frame = Widget.Frame; NSView cont = Widget.Superview; if (cont != null) { MacEngine.ReplaceChild(cont, Widget, alignment); } alignment.AddSubview(Widget); } Rectangle frame = new Rectangle((int)frontend.Margin.Left, (int)frontend.Margin.Top, (int)alignment.Frame.Width - frontend.Margin.HorizontalSpacing, (int)alignment.Frame.Height - frontend.Margin.VerticalSpacing); Widget.SetWidgetBounds(frame); } }
private void PlatformStop() { var movieView = _currentVideo.Player; movieView.Pause(); movieView.Seek(CoreMedia.CMTime.Zero); nsWindow.ContentView.WillRemoveSubview(view); view.RemoveFromSuperview(); view.Dispose(); view = null; layer.Dispose(); layer = null; }
protected override void OnDestroyed() { LogEnter(); try { view?.RemoveFromSuperview(); if (disposeViewOnGtkDestroy) { view?.Dispose(); } view = null; superview = null; base.OnDestroyed(); } finally { LogExit(); } }
bool IViewHierarchyHandler.TryGetHighlightedView(double x, double y, bool clear, out IInspectView highlightedView) { highlightedView = null; MacInspectView view = null; foreach (var window in NSApplication.SharedApplication.Windows) { var position = window.ConvertRectFromScreen(new CGRect(x, y, 1, 1)).Location; position = window.ContentView.ConvertPointFromView(position, null); view = HitTestHarder(window.ContentView, position); if (view != null) { break; } } if (clear || view == null) { if (selectionLayer != null) { selectionLayer.RemoveFromSuperview(); selectionLayer.Dispose(); selectionLayer = null; } if (view == null) { return(false); } highlightedView = view; return(true); } selectionLayer = view.UpdateSelection(selectionLayer ?? new SelectionLayer()); highlightedView = view; return(true); }
public void Destroy() { _view.Dispose(); _view = null; }
public void Dispose() { _view.Dispose(); _view = null; }