/// <summary> /// Detekce prostoru Overlay /// </summary> /// <param name="drawArgs"></param> void ITextEditOverlay.DetectOverlayBounds(TextEditDrawArgs drawArgs) { int size = drawArgs.InnerBounds.Height - 2; if (size > 24) { size = 24; } Rectangle overlayBounds = new Rectangle(drawArgs.InnerBounds.Right - size, drawArgs.InnerBounds.Top, size, size); Rectangle textBounds = drawArgs.TextBounds; textBounds.Width = overlayBounds.X - textBounds.X; drawArgs.TextBounds = textBounds; drawArgs.OverlayBounds = overlayBounds; }
/// <summary> /// Vykreslení /// </summary> /// <param name="drawArgs"></param> void ITextEditOverlay.DrawOverlay(TextEditDrawArgs drawArgs) { if (!drawArgs.OverlayBounds.HasValue) { return; } Rectangle overlayBounds = drawArgs.OverlayBounds.Value; Image image = this.Image; if (image == null) { image = (!IsRelationToDocument ? Skin.TextBox.IconRelationRecord : Skin.TextBox.IconRelationDocument); } if (drawArgs.HasFocus || drawArgs.InteractiveState.HasFlag(GInteractiveState.FlagOver)) { Painter.DrawImage(drawArgs.Graphics, overlayBounds, image, drawArgs.InteractiveState); } else { Painter.DrawImage(drawArgs.Graphics, overlayBounds, image, 0.45f); } }
/// <summary> /// Vykreslení /// </summary> /// <param name="drawArgs"></param> void ITextEditOverlay.DrawOverlay(TextEditDrawArgs drawArgs) { Painter.DrawRelationLine(drawArgs.Graphics, drawArgs.InnerBounds, this.IsRelationToDocument, this.IsRelationInGrid, color: LineColor); }
/// <summary> /// Detekce prostoru Overlay /// </summary> /// <param name="drawArgs"></param> void ITextEditOverlay.DetectOverlayBounds(TextEditDrawArgs drawArgs) { }