コード例 #1
0
        internal static HorizontalSplitter <T> split(SplitLayoutControl <T> ownerControl, Control content, int pos, bool isLeft)
        {
            int     h     = content.Height;
            Control left  = null;
            Control right = null;

            if (isLeft)
            {
                left  = ownerControl.AddContent();
                right = content;
            }
            else
            {
                left  = content;
                right = ownerControl.AddContent();
            }
            try
            {
                GUIUtils.LockWindowUpdate(ownerControl.Handle);
                left.SetBounds(content.Bounds.X, content.Bounds.Y, content.Width, pos - content.Bounds.Y - SIZE);
                right.SetBounds(left.Bounds.X, pos + SIZE, left.Width, h - left.Height - (2 * SIZE));
            }
            finally
            {
                GUIUtils.LockWindowUpdate((IntPtr)0);
            }
            return(new HorizontalSplitter <T>(ownerControl, pos, left.Bounds.X, left.Bounds.X + left.Width));
        }
コード例 #2
0
        internal static VerticalSplitter <T> Split(SplitLayoutControl <T> ownerControl, Control content, int pos, bool isLeft)
        {
            int     w     = content.Width;
            Control left  = null;
            Control right = null;

            if (isLeft)
            {
                left  = ownerControl.AddContent();
                right = content;
            }
            else
            {
                left  = content;
                right = ownerControl.AddContent();
            }
            try
            {
                GUIUtils.LockWindowUpdate(ownerControl.Handle);
                left.SetBounds(content.Bounds.X, content.Bounds.Y, pos - content.Bounds.X - SIZE, content.Height);
                right.SetBounds(pos + SIZE, left.Bounds.Y, w - left.Width - (2 * SIZE), left.Height);
            }
            finally
            {
                GUIUtils.LockWindowUpdate((IntPtr)0);
            }

            return(new VerticalSplitter <T>(ownerControl, pos, left.Bounds.Y, left.Bounds.Y + left.Height));
        }
コード例 #3
0
 internal Splitter(SplitLayoutControl <T> ownerControl, int pos, int start, int stop)
 {
     OwnerControl = ownerControl;
     Pos          = pos;
     Start        = start;
     Stop         = stop;
 }
コード例 #4
0
 internal VerticalSplitter(SplitLayoutControl <T> ownerControl, int pos, int start, int stop) : base(ownerControl, pos, start, stop)
 {
 }