Example #1
0
 public override void Render(GUIRenderContext Context)
 {
     this._Near.Render(Context);
     Context.PushTranslate(new Point(this._NearSize, 0.0).SwapIf(this._Direction == Axis.Vertical));
     this._Far.Render(Context);
     Context.Pop();
 }
Example #2
0
 public override void Render(GUIRenderContext Context)
 {
     Context.PushClip(new Rectangle(this._Size));
     Context.PushTranslate(-new Point(Math.Round(this._Offset.X), Math.Round(this._Offset.Y)));
     this._Client.Render(Context);
     Context.Pop();
     Context.Pop();
 }
Example #3
0
 public override void Render(GUIRenderContext Context)
 {
     Rectangle inner = new Rectangle(new Point(), this.Size);
     Context.PushClip(inner);
     foreach (_Child c in this._Children)
     {
         Context.PushTranslate(c.Offset);
         c.Control.Render(Context);
         Context.Pop();
     }
     Context.Pop();
 }
Example #4
0
 public override void Render(GUIRenderContext Context)
 {
     Context.PushClip(new Rectangle(this.Size));
     double d = 0.0;
     foreach (_Child c in this._Children)
     {
         Context.PushTranslate(new Point(d, 0.0).SwapIf(this._Direction == Axis.Vertical));
         c.Control.Render(Context);
         Context.Pop();
         d += c.Size + this._Seperation;
     }
     Context.Pop();
 }
Example #5
0
 public override void Render(GUIRenderContext Context)
 {
     if (this._Background != null)
     {
         this._Background.Render(Context);
     }
     bool lightbox = this._ModalOptions != null && this._ModalOptions.Lightbox;
     foreach (LayerControl lc in this._LayerControls)
     {
         if (lightbox && this._ModalOptions.LowestModal == lc)
         {
             this._DrawLightbox(Context);
             lightbox = false;
         }
         lc.RenderShadow(lc._Position, Context);
         Context.PushTranslate(lc._Position);
         lc.Render(Context);
         Context.Pop();
     }
     if (this._ModalOptions == null && this._LightboxTime > 0.0)
     {
         this._DrawLightbox(Context);
     }
 }
Example #6
0
        public override void Render(GUIRenderContext Context)
        {
            Skin s = this._Style.Skin;

            double areastart;
            double areaend;
            double areasize;
            double sliderstart;
            double slidersize;
            this._GetScrollMeasurements(out areastart, out areaend, out areasize, out sliderstart, out slidersize);
            slidersize = Math.Round(slidersize);
            areastart = Math.Round(areastart);
            sliderstart = Math.Round(sliderstart);
            if (this._Direction == Axis.Horizontal)
            {
                Context.DrawSurface(s.GetSurface(this._Style.HorizontalBackground, new Point(areasize, this.Size.Y)), new Point(areastart, 0.0));
                if (this._Enabled)
                {
                    Context.DrawSurface(s.GetSurface(this._Style.HorizontalSlider, new Point(slidersize, this.Size.Y)), new Point(sliderstart, 0.0));
                }
            }
            else
            {
                Context.DrawSurface(s.GetSurface(this._Style.VerticalBackground, new Point(this.Size.X, areasize)), new Point(0.0, areastart));
                if (this._Enabled)
                {
                    Context.DrawSurface(s.GetSurface(this._Style.VerticalSlider, new Point(this.Size.X, slidersize)), new Point(0.0, sliderstart));
                }
            }

            this._TopLeftButton.Render(Context);
            Context.PushTranslate(this._BottomRightButtonOffset);
            this._BottomRightButton.Render(Context);
            Context.Pop();
        }
Example #7
0
 public override void Render(GUIRenderContext Context)
 {
     this._View.Render(Context);
     if (this._VScroll != null)
     {
         Context.PushTranslate(new Point(this.Size.X - this._VScroll.Size.X, 0.0));
         this._VScroll.Render(Context);
         Context.Pop();
     }
     if (this._HScroll != null)
     {
         Context.PushTranslate(new Point(0.0, this.Size.Y - this._HScroll.Size.Y));
         this._HScroll.Render(Context);
         Context.Pop();
     }
 }
Example #8
0
        public override void Render(GUIRenderContext Context)
        {
            Skin s = this._Style.Skin;
            Surface sf;
            if (this._MouseOver)
            {
                if (this._MouseDown)
                {
                    sf = s.GetSurface(this._Style.Pushed, this.Size);
                }
                else
                {
                    sf = s.GetSurface(this._Style.Active, this.Size);
                }
            }
            else
            {
                sf = s.GetSurface(this._Style.Normal, this.Size);
            }
            Context.DrawSurface(sf);

            // Render client, if any
            if (this._Client != null)
            {
                Context.PushTranslate(new Point(this._Style.ClientMargin, this._Style.ClientMargin));
                this._Client.Render(Context);
                Context.Pop();
            }
        }
Example #9
0
 public override void Render(GUIRenderContext Context)
 {
     Context.PushTranslate(new Point(this._Margin, this._Margin));
     this._Child.Render(Context);
     Context.Pop();
 }
Example #10
0
 public override void Render(GUIRenderContext Context)
 {
     Point size = this.Size;
     if (this._Left > 0.0) Context.DrawSolid(this._Color, new Rectangle(0.0, 0.0, this._Left, size.Y));
     if (this._Top > 0.0) Context.DrawSolid(this._Color, new Rectangle(0.0, 0.0, size.X, this._Top));
     if (this._Right > 0.0) Context.DrawSolid(this._Color, new Rectangle(size.X - this._Right, 0.0, this._Right, size.Y));
     if (this._Bottom > 0.0) Context.DrawSolid(this._Color, new Rectangle(0.0, size.Y - this._Bottom, size.X, this._Bottom));
     Context.PushTranslate(new Point(this._Left, this._Top));
     this._Client.Render(Context);
     Context.Pop();
 }
Example #11
0
        public override void Render(GUIRenderContext Context)
        {
            Rectangle clirect = this.ClientRectangle;

            // Back
            Context.DrawSolid(this._Style.BackColor, clirect);

            // Client
            Context.PushTranslate(clirect.Location);
            this._Client.Render(Context);
            Context.Pop();

            // Form
            Skin s = this._Style.Skin;
            Context.DrawSurface(s.GetSurface(this._Style.Form, this._Style.Form.Width / 2, this._Style.FormVerticalStretchLine, this.Size));

            // Right of the title bar.
            Context.PushTranslate(this._RightTitleBarOffset);
            this._RightTitleBar.Render(Context);
            Context.Pop();

            // Text
            if (this._Text != null && this._Text != "")
            {
                Rectangle textrect = new Rectangle(
                        this._Style.TitleBarLeftRightMargin,
                        this._Style.TitleBarTopMargin,
                        this.Size.X - this._Style.TitleBarLeftRightMargin - this._RightTitleBar.Size.X - this._Style.TitleBarItemSeperation,
                        this._Style.TitleBarSize - this._Style.TitleBarTopMargin - this._Style.TitleBarBottomMargin);
                if (this._TextSample == null)
                {
                    this._TextSample = this._Style.TitleBarFont.CreateSample(this._Text, textrect.Size, TextAlign.Left, TextAlign.Center, TextWrap.Ellipsis);
                }
                Context.DrawText(this._Style.TitleBarTextColor, this._TextSample, textrect);
            }
        }
Example #12
0
 public override void Render(GUIRenderContext Context)
 {
     Context.PushTranslate(this._ClientOffset);
     this._Client.Render(Context);
     Context.Pop();
 }