Esempio n. 1
0
        public override void RenderViewHostTabContent(ViewHostTab tab, Graphics graphics, Rectangle bounds)
        {
            RenderTabContent(tab, bounds, graphics);
            var buttonsBounds = new Rectangle(bounds.Right - tab.Buttons.Width - 2, 0, tab.Buttons.Width, bounds.Height);

            tab.Buttons.OnPaint(graphics, buttonsBounds, tab.IsActive);
        }
Esempio n. 2
0
        public override int MeasureViewHostTabLength(ViewHostTab tab, Graphics graphics)
        {
            var length = MeasureTabLength(tab, graphics);

            length += tab.Buttons.Width;
            return(length);
        }
Esempio n. 3
0
 public abstract void RenderViewHostTabContent(ViewHostTab tab, Graphics graphics, Rectangle bounds);
Esempio n. 4
0
 public abstract void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds);
Esempio n. 5
0
 public abstract int MeasureViewHostTabLength(ViewHostTab tab, Graphics graphics);
Esempio n. 6
0
 public override void RenderViewHostTabContent(ViewHostTab tab, Graphics graphics, Rectangle bounds)
 {
     RenderTabContent(tab, bounds, graphics);
     var buttonsBounds = new Rectangle(bounds.Right - tab.Buttons.Width - 2, 0, tab.Buttons.Width, bounds.Height);
     tab.Buttons.OnPaint(graphics, buttonsBounds, tab.IsActive);
 }
Esempio n. 7
0
 public override void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds)
 {
     RenderTabBackground(tab, bounds, graphics);
 }
Esempio n. 8
0
 public override int MeasureViewHostTabLength(ViewHostTab tab, Graphics graphics)
 {
     var length = MeasureTabLength(tab, graphics);
     length += tab.Buttons.Width;
     return length;
 }
Esempio n. 9
0
 public override void RenderViewHostTabContent(ViewHostTab tab, Graphics graphics, Rectangle bounds)
 {
     if(tab.View.Host.IsDocumentWell)
     {
         RenderTabContent(tab, bounds, graphics, Color.White);
     }
     else
     {
         Color foregroundColor;
         if(tab.IsActive)
         {
             foregroundColor = ColorTable.ToolTabForegroundActive;
         }
         else if(tab.IsMouseOver)
         {
             foregroundColor = ColorTable.ToolTabForegroundHover;
         }
         else
         {
             foregroundColor = ColorTable.ToolTabForeground;
         }
         RenderTabContent(tab, bounds, graphics, foregroundColor);
     }
     if(tab.Buttons != null && tab.Buttons.Count != 0)
     {
         var buttonsBounds = new Rectangle(bounds.Right - tab.Buttons.Width - 2, 0, tab.Buttons.Width, bounds.Height);
         tab.Buttons.OnPaint(graphics, buttonsBounds, !tab.IsActive || tab.View.Host.IsActive);
     }
 }
Esempio n. 10
0
 public override void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds)
 {
     var host = tab.View.Host;
     if(host.IsDocumentWell)
     {
         if(tab.IsActive)
         {
             using(var brush = new SolidBrush(host.IsActive ?
                 ColorTable.DocTabBackgroundSelectedActive :
                 ColorTable.DocTabBackgroundSelected))
             {
                 graphics.FillRectangle(brush, bounds);
             }
         }
         else if(tab.IsMouseOver)
         {
             using(var brush = new SolidBrush(ColorTable.DocTabBackgroundHover))
             {
                 graphics.FillRectangle(brush, bounds);
             }
         }
     }
     else
     {
         if(tab.IsActive)
         {
             using(var brush = new SolidBrush(ColorTable.ToolTabBackgroundActive))
             {
                 graphics.FillRectangle(brush, bounds);
             }
         }
         else
         {
             if(tab.IsMouseOver)
             {
                 using(var brush = new SolidBrush(ColorTable.ToolTabBackgroundHover))
                 {
                     graphics.FillRectangle(brush, bounds);
                 }
             }
         }
         if(tab.Tabs[0] != tab)
         {
             using(var pen = new Pen(ColorTable.ToolTabSeparator))
             {
                 graphics.DrawLine(pen, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 1);
             }
         }
     }
 }
Esempio n. 11
0
 public abstract void RenderViewHostTabContent(ViewHostTab tab, Graphics graphics, Rectangle bounds);
Esempio n. 12
0
 public abstract void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds);
Esempio n. 13
0
 public abstract int MeasureViewHostTabLength(ViewHostTab tab, Graphics graphics);
Esempio n. 14
0
 public override void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds)
 {
     RenderTabBackground(tab, bounds, graphics);
 }