internal void AutoHide(DockItem item, AutoHideBox widget, bool animate) { if (animate) { widget.Hidden += delegate { if (!widget.Disposed) { AutoHide(item, widget, false); } }; widget.AnimateHide(); } else { // The widget may already be removed from the parent // so 'parent' can be null Gtk.Container parent = (Gtk.Container)item.Widget.Parent; if (parent != null) { //removing the widget from its parent causes it to unrealize without unmapping //so make sure it's unmapped if (item.Widget.IsMapped) { item.Widget.Unmap(); } parent.Remove(item.Widget); } RemoveTopLevel(widget); widget.Disposed = true; widget.Destroy(); } }
internal void AutoHide(DockItem item, AutoHideBox widget, bool animate) { if (animate) { widget.Hidden += delegate { if (!widget.Disposed) { AutoHide(item, widget, false); } }; widget.AnimateHide(); } else { Gtk.Container parent = (Gtk.Container)item.Widget.Parent; parent.Remove(item.Widget); RemoveTopLevel(widget); widget.Disposed = true; widget.Destroy(); } }
internal void AutoHide (DockItem item, AutoHideBox widget, bool animate) { if (animate) { widget.Hidden += delegate { if (!widget.Disposed) AutoHide (item, widget, false); }; widget.AnimateHide (); } else { // The widget may already be removed from the parent // so 'parent' can be null Gtk.Container parent = (Gtk.Container) item.Widget.Parent; if (parent != null) { //removing the widget from its parent causes it to unrealize without unmapping //so make sure it's unmapped if (item.Widget.IsMapped) { item.Widget.Unmap (); } parent.Remove (item.Widget); } parent = (Gtk.Container) item.TitleTab.Parent; if (parent != null) { //removing the widget from its parent causes it to unrealize without unmapping //so make sure it's unmapped if (item.TitleTab.IsMapped) { item.TitleTab.Unmap (); } parent.Remove (item.TitleTab); } if (widget.ContainerWindow != null) { widget.ContainerWindow.Destroy (); } else RemoveTopLevel (widget); widget.Disposed = true; widget.Destroy (); } }
internal void AutoHide(DockItem item, AutoHideBox widget, bool animate) { if (animate) { widget.Hidden += delegate { if (!widget.Disposed) AutoHide (item, widget, false); }; widget.AnimateHide (); } else { Gtk.Container parent = (Gtk.Container) item.Widget.Parent; parent.Remove (item.Widget); RemoveTopLevel (widget); widget.Disposed = true; widget.Destroy (); } }
internal void AutoHide (DockItem item, AutoHideBox widget, bool animate) { if (animate) { widget.Hidden += delegate { if (!widget.Disposed) AutoHide (item, widget, false); }; widget.AnimateHide (); } else { // The widget may already be removed from the parent // so 'parent' can be null Gtk.Container parent = (Gtk.Container) item.Widget.Parent; if (parent != null) parent.Remove (item.Widget); RemoveTopLevel (widget); widget.Disposed = true; widget.Destroy (); } }