equal
deleted
inserted
replaced
39 HIGHLIGHT_LEFT, |
39 HIGHLIGHT_LEFT, |
40 HIGHLIGHT_RIGHT, |
40 HIGHLIGHT_RIGHT, |
41 HIGHLIGHT_RESIZE] = range(6) |
41 HIGHLIGHT_RESIZE] = range(6) |
42 |
42 |
43 # Viewer highlight styles |
43 # Viewer highlight styles |
44 HIGHLIGHT_DROP_PEN = None |
44 HIGHLIGHT = { |
45 HIGHLIGHT_DROP_BRUSH = None |
45 } |
46 HIGHLIGHT_RESIZE_PEN = None |
|
47 HIGHLIGHT_RESIZE_BRUSH = None |
|
48 |
46 |
49 # ------------------------------------------------------------------------------- |
47 # ------------------------------------------------------------------------------- |
50 # Base Debug Variable Viewer Class |
48 # Base Debug Variable Viewer Class |
51 # ------------------------------------------------------------------------------- |
49 # ------------------------------------------------------------------------------- |
52 |
50 |
83 |
81 |
84 def InitHighlightPensBrushes(self): |
82 def InitHighlightPensBrushes(self): |
85 """ |
83 """ |
86 Init global pens and brushes |
84 Init global pens and brushes |
87 """ |
85 """ |
88 if HIGHLIGHT_DROP_PEN is None: |
86 global HIGHLIGHT |
89 HIGHLIGHT_DROP_PEN = wx.Pen(wx.Colour(0, 128, 255)) |
87 if not HIGHLIGHT: |
90 HIGHLIGHT_DROP_BRUSH = wx.Brush(wx.Colour(0, 128, 255, 128)) |
88 HIGHLIGHT['DROP_PEN'] = wx.Pen(wx.Colour(0, 128, 255)) |
91 HIGHLIGHT_RESIZE_PEN = wx.Pen(wx.Colour(200, 200, 200)) |
89 HIGHLIGHT['DROP_BRUSH'] = wx.Brush(wx.Colour(0, 128, 255, 128)) |
92 HIGHLIGHT_RESIZE_BRUSH = wx.Brush(wx.Colour(200, 200, 200)) |
90 HIGHLIGHT['RESIZE_PEN'] = wx.Pen(wx.Colour(200, 200, 200)) |
|
91 HIGHLIGHT['RESIZE_BRUSH'] = wx.Brush(wx.Colour(200, 200, 200)) |
93 |
92 |
94 def GetIndex(self): |
93 def GetIndex(self): |
95 """ |
94 """ |
96 Return position of Viewer in Debug Variable Panel |
95 Return position of Viewer in Debug Variable Panel |
97 @return: Position of Viewer |
96 @return: Position of Viewer |
279 """ |
278 """ |
280 # Get Viewer size |
279 # Get Viewer size |
281 width, height = self.GetSize() |
280 width, height = self.GetSize() |
282 |
281 |
283 # Set dc styling for drop before or drop after highlight |
282 # Set dc styling for drop before or drop after highlight |
284 dc.SetPen(HIGHLIGHT_DROP_PEN) |
283 dc.SetPen(HIGHLIGHT['DROP_PEN']) |
285 dc.SetBrush(HIGHLIGHT_DROP_BRUSH) |
284 dc.SetBrush(HIGHLIGHT['DROP_BRUSH']) |
286 |
285 |
287 # Draw line at upper side of Viewer if highlight is drop before |
286 # Draw line at upper side of Viewer if highlight is drop before |
288 if self.Highlight == HIGHLIGHT_BEFORE: |
287 if self.Highlight == HIGHLIGHT_BEFORE: |
289 dc.DrawLine(0, 1, width - 1, 1) |
288 dc.DrawLine(0, 1, width - 1, 1) |
290 |
289 |