ZForge.Controls.HeaderPanel.RecalcNonClientArea C# (CSharp) Method

RecalcNonClientArea() private method

private RecalcNonClientArea ( Rectangle &proposed ) : void
proposed Rectangle
return void
        private void RecalcNonClientArea(ref Rectangle proposed)
        {
            int brdWidth = 0;
            int shadowWidth = 0;
            int captionHight = 0;

            brdWidth = ComputeBorderWidth();
            if (menm_BorderStyle == HeaderPanelBorderStyles.Shadow)
                shadowWidth = DEFAULT_SHADOW_WIDTH;
            if (mbln_CaptionVisible)
                captionHight = mint_CaptionHeight;

            switch (menm_CaptionPosition)
            {
                case HeaderPanelCaptionPositions.Top:
                    proposed = new Rectangle(proposed.Left + brdWidth,
                                                    proposed.Top + (brdWidth + captionHight),
                                                    proposed.Width - (brdWidth + brdWidth + shadowWidth),
                                                    proposed.Height - (brdWidth + brdWidth + shadowWidth +
                                                                                            captionHight));
                    break;
                case HeaderPanelCaptionPositions.Bottom:
                    proposed = new Rectangle(proposed.Left + brdWidth,
                                                    proposed.Top + brdWidth,
                                                    proposed.Width - (brdWidth + brdWidth + shadowWidth),
                                                    proposed.Height - (brdWidth + brdWidth + shadowWidth +
                                                                                            captionHight));
                    break;
                case HeaderPanelCaptionPositions.Left:
                    proposed = new Rectangle(proposed.Left + (brdWidth + captionHight),
                                                    proposed.Top + brdWidth,
                                                    proposed.Width - (brdWidth + brdWidth + shadowWidth),
                                                    proposed.Height - (brdWidth + brdWidth + shadowWidth));
                    break;
                case HeaderPanelCaptionPositions.Right:
                    proposed = new Rectangle(proposed.Left + brdWidth,
                                                    proposed.Top + brdWidth,
                                                    proposed.Width - (brdWidth + brdWidth + shadowWidth +
                                                                            captionHight),
                                                    proposed.Height - (brdWidth + brdWidth + shadowWidth));
                    break;
            }
        }