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);
        }
        public override int MeasureViewHostTabLength(ViewHostTab tab, Graphics graphics)
        {
            var length = MeasureTabLength(tab, graphics);

            length += tab.Buttons.Width;
            return(length);
        }
示例#3
0
 public abstract void RenderViewHostTabContent(ViewHostTab tab, Graphics graphics, Rectangle bounds);
示例#4
0
 public abstract void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds);
示例#5
0
 public abstract int MeasureViewHostTabLength(ViewHostTab tab, Graphics graphics);
示例#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);
 }
示例#7
0
 public override void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds)
 {
     RenderTabBackground(tab, bounds, graphics);
 }
示例#8
0
 public override int MeasureViewHostTabLength(ViewHostTab tab, Graphics graphics)
 {
     var length = MeasureTabLength(tab, graphics);
     length += tab.Buttons.Width;
     return length;
 }
示例#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);
     }
 }
示例#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);
             }
         }
     }
 }
示例#11
0
 public abstract void RenderViewHostTabContent(ViewHostTab tab, Graphics graphics, Rectangle bounds);
示例#12
0
 public abstract void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds);
示例#13
0
 public abstract int MeasureViewHostTabLength(ViewHostTab tab, Graphics graphics);
示例#14
0
 public override void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds)
 {
     RenderTabBackground(tab, bounds, graphics);
 }