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); }
public abstract void RenderViewHostTabContent(ViewHostTab tab, Graphics graphics, Rectangle bounds);
public abstract void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds);
public abstract int MeasureViewHostTabLength(ViewHostTab tab, Graphics graphics);
public override void RenderViewHostTabBackground(ViewHostTab tab, Graphics graphics, Rectangle bounds) { RenderTabBackground(tab, bounds, graphics); }
public override int MeasureViewHostTabLength(ViewHostTab tab, Graphics graphics) { var length = MeasureTabLength(tab, graphics); length += tab.Buttons.Width; return length; }
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); } }
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); } } } }