/// <summary> /// Paints the dock items using provided event handler for painting /// </summary> /// <param name="canvas">The canvas.</param> /// <param name="manager">The manager.</param> protected virtual void DoCustomPaint(Graphics canvas, IDockManager manager) { for (int i = 0; i < manager.Items.Count; i++) { DoDraw(canvas, manager.Items[i]); } }
/// <summary> /// Paints the dock items /// </summary> /// <param name="canvas">The canvas.</param> /// <param name="manager">The manager.</param> public virtual void Paint(Graphics canvas, IDockManager manager) { if (Draw != null) { DoCustomPaint(canvas, manager); } else { DoDefaultPaint(canvas, manager); } }
protected override void DoDefaultPaint(Graphics canvas, IDockManager manager) { canvas.SmoothingMode = SmoothingMode.AntiAlias; for (int i = 0; i < manager.Items.Count; i++) { if (manager.UseDenomination) { PaintDenominatedItem(canvas, manager.Items[i]); } else { PaintItem(canvas, manager.Items[i]); } if (manager.CaptionVisible(manager.Items[i])) { PaintCaption(canvas, manager.Items[i], manager.GetScaleCaption()); } } }
/// <summary> /// Does the default paint. /// </summary> /// <param name="canvas">The canvas.</param> /// <param name="manager">The manager.</param> protected virtual void DoDefaultPaint(Graphics canvas, IDockManager manager) { //default painting of the items is defined in derived classes }
public HostWindowState(IDockManager dockManager, HostWindow hostWindow) { DockManager = dockManager; _hostWindow = hostWindow; }
public DockControlState(IDockManager dockManager) { DockManager = dockManager; }