author | Laurent Bessard |
Mon, 03 Jun 2013 11:11:46 +0200 | |
changeset 1212 | b351d3a7917c |
parent 1172 | dff0a4e40808 |
child 1221 | d18ccec78117 |
permissions | -rw-r--r-- |
814 | 1 |
#!/usr/bin/env python |
2 |
# -*- coding: utf-8 -*- |
|
3 |
||
4 |
#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor |
|
5 |
#based on the plcopen standard. |
|
6 |
# |
|
7 |
#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD |
|
8 |
# |
|
9 |
#See COPYING file for copyrights details. |
|
10 |
# |
|
11 |
#This library is free software; you can redistribute it and/or |
|
12 |
#modify it under the terms of the GNU General Public |
|
13 |
#License as published by the Free Software Foundation; either |
|
14 |
#version 2.1 of the License, or (at your option) any later version. |
|
15 |
# |
|
16 |
#This library is distributed in the hope that it will be useful, |
|
17 |
#but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
19 |
#General Public License for more details. |
|
20 |
# |
|
21 |
#You should have received a copy of the GNU General Public |
|
22 |
#License along with this library; if not, write to the Free Software |
|
23 |
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
24 |
||
25 |
import wx |
|
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
26 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
27 |
from controls.CustomStyledTextCtrl import faces |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
28 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
29 |
TOOLTIP_MAX_CHARACTERS = 30 # Maximum number of characters by line in ToolTip |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
30 |
TOOLTIP_MAX_LINE = 5 # Maximum number of line in ToolTip |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
31 |
TOOLTIP_WAIT_PERIOD = 0.5 # Wait period before displaying tooltip in second |
814 | 32 |
|
33 |
#------------------------------------------------------------------------------- |
|
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
34 |
# Custom ToolTip |
814 | 35 |
#------------------------------------------------------------------------------- |
36 |
||
37 |
""" |
|
38 |
Class that implements a custom tool tip |
|
39 |
""" |
|
40 |
||
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
41 |
class CustomToolTip(wx.PopupWindow): |
814 | 42 |
|
993 | 43 |
def __init__(self, parent, tip, restricted=True): |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
44 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
45 |
Constructor |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
46 |
@param parent: Parent window |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
47 |
@param tip: Tip text (may be multiline) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
48 |
@param restricted: Tool tip must follow size restriction in line and |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
49 |
characters number defined (default True) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
50 |
""" |
814 | 51 |
wx.PopupWindow.__init__(self, parent) |
52 |
||
53 |
self.CurrentPosition = wx.Point(0, 0) |
|
993 | 54 |
self.Restricted = restricted |
814 | 55 |
|
56 |
self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) |
|
57 |
self.SetTip(tip) |
|
58 |
||
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
59 |
# Initialize text font style |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
60 |
self.Font = wx.Font( |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
61 |
faces["size"], |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
62 |
wx.SWISS, |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
63 |
wx.NORMAL, |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
64 |
wx.NORMAL, |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
65 |
faceName = faces["mono"]) |
993 | 66 |
|
814 | 67 |
self.Bind(wx.EVT_PAINT, self.OnPaint) |
993 | 68 |
|
69 |
def SetFont(self, font): |
|
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
70 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
71 |
Set tool tip text font style |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
72 |
@param font: wx.Font object containing font style |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
73 |
""" |
993 | 74 |
self.Font = font |
75 |
self.RefreshTip() |
|
76 |
||
814 | 77 |
def SetTip(self, tip): |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
78 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
79 |
Set tool tip text |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
80 |
@param tip: Tool tip text |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
81 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
82 |
if self.Restricted: |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
83 |
# Compute tip text line return |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
84 |
self.Tip = [] |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
85 |
for line in tip.splitlines(): |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
86 |
if line != "": |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
87 |
words = line.split() |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
88 |
new_line = words[0] |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
89 |
for word in words[1:]: |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
90 |
# Add word to line |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
91 |
if len(new_line + " " + word) <= \ |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
92 |
TOOLTIP_MAX_CHARACTERS: |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
93 |
new_line += " " + word |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
94 |
# Create new line |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
95 |
else: |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
96 |
self.Tip.append(new_line) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
97 |
new_line = word |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
98 |
self.Tip.append(new_line) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
99 |
else: |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
100 |
self.Tip.append(line) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
101 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
102 |
# Restrict number of lines |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
103 |
if len(self.Tip) > TOOLTIP_MAX_LINE: |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
104 |
self.Tip = self.Tip[:TOOLTIP_MAX_LINE] |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
105 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
106 |
# Add ... to the end of last line to indicate that tool tip |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
107 |
# text is too long |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
108 |
if len(self.Tip[-1]) < TOOLTIP_MAX_CHARACTERS - 3: |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
109 |
self.Tip[-1] += "..." |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
110 |
else: |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
111 |
self.Tip[-1] = self.Tip[-1]\ |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
112 |
[:TOOLTIP_MAX_CHARACTERS - 3] + "..." |
814 | 113 |
else: |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
114 |
self.Tip = tip.splitlines() |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
115 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
116 |
# Prevent to call wx method in non-wx threads |
814 | 117 |
wx.CallAfter(self.RefreshTip) |
118 |
||
1170
074e46cdedbc
Added support for displaying ToolTip, starting drag'n drop and Double click on Block connectors when debugging
Laurent Bessard
parents:
1169
diff
changeset
|
119 |
def SetToolTipPosition(self, pos): |
074e46cdedbc
Added support for displaying ToolTip, starting drag'n drop and Double click on Block connectors when debugging
Laurent Bessard
parents:
1169
diff
changeset
|
120 |
""" |
074e46cdedbc
Added support for displaying ToolTip, starting drag'n drop and Double click on Block connectors when debugging
Laurent Bessard
parents:
1169
diff
changeset
|
121 |
Set tool tip position |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
122 |
@param pos: New tool tip position |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
123 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
124 |
# Get screen size to prevent tool tip to go out of the screen |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
125 |
screen_width, screen_height = wx.GetDisplaySize() |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
126 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
127 |
# Calculate position of tool tip to stay in screen limits |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
128 |
tip_width, tip_height = self.GetToolTipSize() |
993 | 129 |
self.CurrentPosition = wx.Point( |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
130 |
max(0, min(pos.x, screen_width - tip_width)), |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
131 |
max(0, min(pos.y, screen_height - tip_height))) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
132 |
|
814 | 133 |
self.SetPosition(pos) |
134 |
||
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
135 |
def GetToolTipSize(self): |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
136 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
137 |
Get tool tip size according to tip text and restriction |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
138 |
@return: wx.Size(tool_tip_width, tool_tip_height) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
139 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
140 |
max_width = max_height = 0 |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
141 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
142 |
# Create a memory DC for calculating text extent |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
143 |
dc = wx.MemoryDC() |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
144 |
dc.SetFont(self.Font) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
145 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
146 |
# Compute max tip text size |
814 | 147 |
for line in self.Tip: |
993 | 148 |
w, h = dc.GetTextExtent(line) |
814 | 149 |
max_width = max(max_width, w) |
150 |
max_height += h |
|
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
151 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
152 |
return wx.Size(max_width + 4, max_height + 4) |
814 | 153 |
|
154 |
def RefreshTip(self): |
|
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
155 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
156 |
Refresh tip on screen |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
157 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
158 |
# Prevent to call this function if tool tip destroyed |
814 | 159 |
if self: |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
160 |
# Refresh tool tip size and position |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
161 |
self.SetSize(self.GetToolTipSize()) |
814 | 162 |
self.SetPosition(self.CurrentPosition) |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
163 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
164 |
# Redraw tool tip |
814 | 165 |
self.Refresh() |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
166 |
|
814 | 167 |
def OnPaint(self, event): |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
168 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
169 |
Callback for Paint Event |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
170 |
@param event: Paint event |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
171 |
""" |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
172 |
# Get buffered paint DC for tool tip |
814 | 173 |
dc = wx.AutoBufferedPaintDC(self) |
174 |
dc.Clear() |
|
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
175 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
176 |
# Set DC drawing style |
1172 | 177 |
dc.SetPen(wx.BLACK_PEN) |
814 | 178 |
dc.SetBrush(wx.Brush(wx.Colour(255, 238, 170))) |
993 | 179 |
dc.SetFont(self.Font) |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
180 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
181 |
# Draw Tool tip |
814 | 182 |
dc.BeginDrawing() |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
183 |
tip_width, tip_height = self.GetToolTipSize() |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
184 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
185 |
# Draw background rectangle |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
186 |
dc.DrawRectangle(0, 0, tip_width, tip_height) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
187 |
|
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
188 |
# Draw tool tip text |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
189 |
line_offset = 0 |
814 | 190 |
for line in self.Tip: |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
191 |
dc.DrawText(line, 2, line_offset + 2) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
192 |
line_width, line_height = dc.GetTextExtent(line) |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
193 |
line_offset += line_height |
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
194 |
|
814 | 195 |
dc.EndDrawing() |
1169
53e4a2b775a7
Move CustomToolTip from GraphicCommons to controls
Laurent Bessard
parents:
1166
diff
changeset
|
196 |
|
814 | 197 |
event.Skip() |