~ubuntu-branches/ubuntu/natty/monodevelop/natty

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugTextMarker.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-01-07 19:06:58 UTC
  • mto: (1.6.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 46.
  • Revision ID: james.westby@ubuntu.com-20100107190658-z9z95lgk4kwfes7p
ImportĀ upstreamĀ versionĀ 2.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
                        cr.ClosePath ();
72
72
                }
73
73
                
 
74
                protected void DrawDiamond (Cairo.Context cr, double x, double y, double size)
 
75
                {
 
76
                        x += 0.5; y += 0.5;
 
77
                        size -= 2;
 
78
                        cr.NewPath ();
 
79
                        cr.MoveTo (x + size/2, y);
 
80
                        cr.LineTo (x + size, y + size/2);
 
81
                        cr.LineTo (x + size/2, y + size);
 
82
                        cr.LineTo (x, y + size/2);
 
83
                        cr.LineTo (x + size/2, y);
 
84
                        cr.ClosePath ();
 
85
                }
 
86
                
74
87
                protected void DrawArrow (Cairo.Context cr, double x, double y, double size)
75
88
                {
76
89
                        y += 2.5;
128
141
                        get { return editor.ColorStyle.BreakpointFg; }
129
142
                        set {  }
130
143
                }
131
 
 
132
 
 
133
 
                public BreakpointTextMarker (Mono.TextEditor.TextEditor editor) : base (editor)
 
144
                
 
145
                public bool IsTracepoint { get; set; }
 
146
 
 
147
                public BreakpointTextMarker (Mono.TextEditor.TextEditor editor, bool isTracePoint) : base (editor)
134
148
                {
135
149
                        IncludedStyles |= StyleFlag.BackgroundColor | StyleFlag.Color;
 
150
                        IsTracepoint = isTracePoint;
136
151
                }
137
152
                
138
153
                protected override void DrawIcon (Cairo.Context cr, int x, int y, int size)
139
154
                {
140
155
                        Cairo.Color color1 = Style.ToCairoColor (editor.ColorStyle.BreakpointMarkerColor1);
141
156
                        Cairo.Color color2 = Style.ToCairoColor (editor.ColorStyle.BreakpointMarkerColor2);
142
 
                        DrawCircle (cr, x, y, size);
 
157
                        if (IsTracepoint)
 
158
                                DrawDiamond (cr, x, y, size);
 
159
                        else
 
160
                                DrawCircle (cr, x, y, size);
143
161
                        FillGradient (cr, color1, color2, x, y, size);
144
162
                        DrawBorder (cr, color2, x, y, size);
145
163
                }
152
170
                        set {  }
153
171
                }
154
172
        
155
 
                public DisabledBreakpointTextMarker (Mono.TextEditor.TextEditor editor) : base (editor)
 
173
                public DisabledBreakpointTextMarker (Mono.TextEditor.TextEditor editor, bool isTracePoint) : base (editor)
156
174
                {
157
175
                        IncludedStyles |= StyleFlag.BackgroundColor;
 
176
                        IsTracepoint = isTracePoint;
158
177
                }
159
178
                
 
179
                public bool IsTracepoint { get; set; }
 
180
                
160
181
                protected override void DrawIcon (Cairo.Context cr, int x, int y, int size)
161
182
                {
162
183
                        Cairo.Color border = Style.ToCairoColor (editor.ColorStyle.InvalidBreakpointMarkerBorder);
163
 
                        DrawCircle (cr, x, y, size);
 
184
                        if (IsTracepoint)
 
185
                                DrawDiamond (cr, x, y, size);
 
186
                        else
 
187
                                DrawCircle (cr, x, y, size);
164
188
                        //FillGradient (cr, new Cairo.Color (1,1,1), new Cairo.Color (1,0.8,0.8), x, y, size);
165
189
                        DrawBorder (cr, border, x, y, size);
166
190
                }
195
219
                }
196
220
        }
197
221
        
 
222
        public class DebugStackLineTextMarker: DebugTextMarker
 
223
        {
 
224
                public override Color BackgroundColor {
 
225
                        get { return editor.ColorStyle.DebugStackLineBg; }
 
226
                        set {  }
 
227
                }
 
228
                
 
229
                public override Color Color {
 
230
                        get { return editor.ColorStyle.DebugStackLineFg;  }
 
231
                        set {  }
 
232
                }
 
233
                
 
234
                public DebugStackLineTextMarker (Mono.TextEditor.TextEditor editor) : base (editor)
 
235
                {
 
236
                        IncludedStyles |= StyleFlag.BackgroundColor | StyleFlag.Color;
 
237
                }
 
238
                
 
239
                protected override void DrawIcon (Cairo.Context cr, int x, int y, int size)
 
240
                {
 
241
                        Cairo.Color color1 = Style.ToCairoColor (editor.ColorStyle.DebugStackLineMarkerColor1);
 
242
                        Cairo.Color color2 = Style.ToCairoColor (editor.ColorStyle.DebugStackLineMarkerColor2);
 
243
                        Cairo.Color border = Style.ToCairoColor (editor.ColorStyle.DebugStackLineMarkerBorder);
 
244
                
 
245
                        DrawArrow (cr, x, y, size);
 
246
                        FillGradient (cr, color1, color2, x, y, size);
 
247
                        DrawBorder (cr, border, x, y, size);
 
248
                }
 
249
        }
 
250
        
198
251
        public class InvalidBreakpointTextMarker: DebugTextMarker
199
252
        {
200
253
                public override Color BackgroundColor {