コード例 #1
0
 void AutoShow()
 {
     UnscheduleAutoHide();
     if (autoShowFrame == null)
     {
         if (hiddenFrame != null)
         {
             bar.Frame.AutoHide(it, hiddenFrame, false);
         }
         autoShowFrame = bar.Frame.AutoShow(it, bar, size);
         autoShowFrame.EnterNotifyEvent += OnFrameEnter;
         autoShowFrame.LeaveNotifyEvent += OnFrameLeave;
         autoShowFrame.KeyPressEvent    += OnFrameKeyPress;
         SetPrelight();
     }
 }
コード例 #2
0
 void AutoHide(bool animate)
 {
     UnscheduleAutoShow();
     if (autoShowFrame != null)
     {
         size                  = autoShowFrame.Size;
         hiddenFrame           = autoShowFrame;
         autoShowFrame.Hidden += delegate {
             hiddenFrame = null;
         };
         bar.Frame.AutoHide(it, autoShowFrame, animate);
         autoShowFrame.EnterNotifyEvent -= OnFrameEnter;
         autoShowFrame.LeaveNotifyEvent -= OnFrameLeave;
         autoShowFrame.KeyPressEvent    -= OnFrameKeyPress;
         autoShowFrame = null;
         UnsetPrelight();
     }
 }
コード例 #3
0
ファイル: DockFrame.cs プロジェクト: rdafoe/Cage
        internal AutoHideBox AutoShow(DockItem item, DockBar bar, int size)
        {
            AutoHideBox aframe = new AutoHideBox(this, item, bar.Position, size);

            Gdk.Size sTop  = GetBarFrameSize(dockBarTop);
            Gdk.Size sBot  = GetBarFrameSize(dockBarBottom);
            Gdk.Size sLeft = GetBarFrameSize(dockBarLeft);
            Gdk.Size sRgt  = GetBarFrameSize(dockBarRight);

            int x, y;

            if (bar == dockBarLeft || bar == dockBarRight)
            {
                aframe.HeightRequest = Allocation.Height - sTop.Height - sBot.Height;
                aframe.WidthRequest  = size;
                y = sTop.Height;
                if (bar == dockBarLeft)
                {
                    x = sLeft.Width;
                }
                else
                {
                    x = Allocation.Width - size - sRgt.Width;
                }
            }
            else
            {
                aframe.WidthRequest  = Allocation.Width - sLeft.Width - sRgt.Width;
                aframe.HeightRequest = size;
                x = sLeft.Width;
                if (bar == dockBarTop)
                {
                    y = sTop.Height;
                }
                else
                {
                    y = Allocation.Height - size - sBot.Height;
                }
            }
            AddTopLevel(aframe, x, y);
            aframe.AnimateShow();
            return(aframe);
        }
コード例 #4
0
ファイル: DockFrame.cs プロジェクト: rdafoe/Cage
 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 プロジェクト: rdafoe/Cage
        internal void UpdateSize(DockBar bar, AutoHideBox aframe)
        {
            Gdk.Size sTop  = GetBarFrameSize(dockBarTop);
            Gdk.Size sBot  = GetBarFrameSize(dockBarBottom);
            Gdk.Size sLeft = GetBarFrameSize(dockBarLeft);
            Gdk.Size sRgt  = GetBarFrameSize(dockBarRight);

            if (bar == dockBarLeft || bar == dockBarRight)
            {
                aframe.HeightRequest = Allocation.Height - sTop.Height - sBot.Height;
                if (bar == dockBarRight)
                {
                    aframe.X = Allocation.Width - aframe.Allocation.Width - sRgt.Width;
                }
            }
            else
            {
                aframe.WidthRequest = Allocation.Width - sLeft.Width - sRgt.Width;
                if (bar == dockBarBottom)
                {
                    aframe.Y = Allocation.Height - aframe.Allocation.Height - sBot.Height;
                }
            }
        }
コード例 #6
0
ファイル: DockBarItem.cs プロジェクト: rdafoe/Cage
 void AutoShow()
 {
     UnscheduleAutoHide ();
     if (autoShowFrame == null) {
         if (hiddenFrame != null)
             bar.Frame.AutoHide (it, hiddenFrame, false);
         autoShowFrame = bar.Frame.AutoShow (it, bar, size);
         autoShowFrame.EnterNotifyEvent += OnFrameEnter;
         autoShowFrame.LeaveNotifyEvent += OnFrameLeave;
         autoShowFrame.KeyPressEvent += OnFrameKeyPress;
         SetPrelight ();
     }
 }
コード例 #7
0
ファイル: DockBarItem.cs プロジェクト: rdafoe/Cage
 void AutoHide(bool animate)
 {
     UnscheduleAutoShow ();
     if (autoShowFrame != null) {
         size = autoShowFrame.Size;
         hiddenFrame = autoShowFrame;
         autoShowFrame.Hidden += delegate {
             hiddenFrame = null;
         };
         bar.Frame.AutoHide (it, autoShowFrame, animate);
         autoShowFrame.EnterNotifyEvent -= OnFrameEnter;
         autoShowFrame.LeaveNotifyEvent -= OnFrameLeave;
         autoShowFrame.KeyPressEvent -= OnFrameKeyPress;
         autoShowFrame = null;
         UnsetPrelight ();
     }
 }
コード例 #8
0
ファイル: DockFrame.cs プロジェクト: rdafoe/Cage
        internal void UpdateSize(DockBar bar, AutoHideBox aframe)
        {
            Gdk.Size sTop = GetBarFrameSize (dockBarTop);
            Gdk.Size sBot = GetBarFrameSize (dockBarBottom);
            Gdk.Size sLeft = GetBarFrameSize (dockBarLeft);
            Gdk.Size sRgt = GetBarFrameSize (dockBarRight);

            if (bar == dockBarLeft || bar == dockBarRight) {
                aframe.HeightRequest = Allocation.Height - sTop.Height - sBot.Height;
                if (bar == dockBarRight)
                    aframe.X = Allocation.Width - aframe.Allocation.Width - sRgt.Width;
            } else {
                aframe.WidthRequest = Allocation.Width - sLeft.Width - sRgt.Width;
                if (bar == dockBarBottom)
                    aframe.Y = Allocation.Height - aframe.Allocation.Height - sBot.Height;
            }
        }
コード例 #9
0
ファイル: DockFrame.cs プロジェクト: rdafoe/Cage
        internal AutoHideBox AutoShow(DockItem item, DockBar bar, int size)
        {
            AutoHideBox aframe = new AutoHideBox (this, item, bar.Position, size);
            Gdk.Size sTop = GetBarFrameSize (dockBarTop);
            Gdk.Size sBot = GetBarFrameSize (dockBarBottom);
            Gdk.Size sLeft = GetBarFrameSize (dockBarLeft);
            Gdk.Size sRgt = GetBarFrameSize (dockBarRight);

            int x,y;
            if (bar == dockBarLeft || bar == dockBarRight) {
                aframe.HeightRequest = Allocation.Height - sTop.Height - sBot.Height;
                aframe.WidthRequest = size;
                y = sTop.Height;
                if (bar == dockBarLeft)
                    x = sLeft.Width;
                else
                    x = Allocation.Width - size - sRgt.Width;
            } else {
                aframe.WidthRequest = Allocation.Width - sLeft.Width - sRgt.Width;
                aframe.HeightRequest = size;
                x = sLeft.Width;
                if (bar == dockBarTop)
                    y = sTop.Height;
                else
                    y = Allocation.Height - size - sBot.Height;
            }
            AddTopLevel (aframe, x, y);
            aframe.AnimateShow ();
            return aframe;
        }
コード例 #10
0
ファイル: DockFrame.cs プロジェクト: rdafoe/Cage
 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 ();
     }
 }