コード例 #1
0
 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();
     }
 }
コード例 #2
0
ファイル: DockFrame.cs プロジェクト: thbin/TraceLab
 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();
     }
 }
コード例 #3
0
ファイル: DockFrame.cs プロジェクト: kdubau/monodevelop
		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 ();
			}
		}
コード例 #4
0
ファイル: DockFrame.cs プロジェクト: RudoCris/Pinta
 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 ();
     }
 }
コード例 #5
0
ファイル: DockFrame.cs プロジェクト: nieve/monodevelop
		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 ();
			}
		}