Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.CodeEditor/3.2/ErrorBookmark.cs @ 3038

Last change on this file since 3038 was 2659, checked in by epitzer, 15 years ago

Add new Plugin that provides a code editor with syntax highlighting and code completion (#842)

File size: 893 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Drawing;
6using ICSharpCode.TextEditor.Document;
7using ICSharpCode.TextEditor;
8
9namespace HeuristicLab.CodeEditor {
10  public class ErrorBookmark : Bookmark {
11
12    public override bool CanToggle { get { return false; } }
13
14    public ErrorBookmark(IDocument document, TextLocation location)
15      : base(document, location) {
16    }
17
18    public override void Draw(IconBarMargin margin, System.Drawing.Graphics g, System.Drawing.Point p) {     
19      int delta = margin.TextArea.TextView.FontHeight / 4;
20      Rectangle rect = new Rectangle(
21        2,
22        p.Y + delta,
23        margin.DrawingPosition.Width - 6,
24        margin.TextArea.TextView.FontHeight - delta * 2);
25      g.FillRectangle(Brushes.Red, rect);
26      g.DrawRectangle(Pens.White, rect);
27    }
28  }
29}
Note: See TracBrowser for help on using the repository browser.