Mercurial > cpython-lru_cache-weakref
annotate Lib/lib-stdwin/Split.py @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | f9bbb01388d5 |
| children |
| rev | line source |
|---|---|
| 64 | 1 # Generic Split implementation. |
| 2 # Use as a base class for other splits. | |
| 98 | 3 # Derived classes should at least implement the methods that call |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
4 # unimpl() below: getminsize(), getbounds() and setbounds(). |
| 64 | 5 |
| 6 Error = 'Split.Error' # Exception | |
| 7 | |
| 8 import rect | |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
9 from stdwinevents import * |
| 64 | 10 |
| 531 | 11 class Split: |
| 64 | 12 # |
| 13 # Calls from creator | |
| 14 # NB derived classes may add parameters to create() | |
| 15 # | |
| 16 def create(self, parent): | |
| 17 parent.addchild(self) | |
| 18 self.parent = parent | |
| 19 self.children = [] | |
| 20 self.mouse_interest = [] | |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
21 self.keybd_interest = [] |
| 64 | 22 self.timer_interest = [] |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
23 self.altdraw_interest = [] |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
24 self.mouse_focus = None |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
25 self.keybd_focus = None |
| 64 | 26 return self |
| 27 # | |
| 28 # Downcalls from parent to child | |
| 29 # | |
| 30 def destroy(self): | |
| 98 | 31 self.parent = None |
| 64 | 32 for child in self.children: |
| 33 child.destroy() | |
| 98 | 34 del self.children[:] |
| 35 del self.mouse_interest[:] | |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
36 del self.keybd_interest[:] |
| 98 | 37 del self.timer_interest[:] |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
38 del self.altdraw_interest[:] |
| 98 | 39 self.mouse_focus = None |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
40 self.keybd_focus = None |
| 64 | 41 # |
|
1110
1d06b1499eb9
* Got entirely rid of path.py.
Guido van Rossum <guido@python.org>
parents:
559
diff
changeset
|
42 def getminsize(self, m, (width, height)): |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
43 return unimpl() # Should ask children |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
44 def getbounds(self): |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
45 return unimpl() |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
46 def setbounds(self, bounds): |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
47 unimpl() # Should tell children |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
48 # |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
49 def realize(self): |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
50 for child in self.children: |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
51 child.realize() |
| 98 | 52 # |
|
1178
f9bbb01388d5
* More changes due to stricter argument passing rules
Guido van Rossum <guido@python.org>
parents:
1110
diff
changeset
|
53 def draw(self, d, detail): |
| 64 | 54 # (Could avoid calls to children outside the area) |
| 55 for child in self.children: | |
|
1178
f9bbb01388d5
* More changes due to stricter argument passing rules
Guido van Rossum <guido@python.org>
parents:
1110
diff
changeset
|
56 child.draw(d, detail) |
| 64 | 57 # |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
58 def altdraw(self, detail): |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
59 for child in self.altdraw_interest: |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
60 child.altdraw(detail) |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
61 # |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
62 # Keyboard focus handling (used internally) |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
63 # XXX This is not enough if two levels of splits |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
64 # XXX surround text fields! |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
65 # |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
66 def set_keybd_focus(self, child): |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
67 if self.keybd_focus <> child: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
68 if self.keybd_focus: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
69 self.keybd_focus.deactivate() |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
70 self.keybd_focus = None |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
71 if child: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
72 child.activate() |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
73 self.keybd_focus = child |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
74 def next_keybd_focus(self): |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
75 if not self.keybd_interest: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
76 self.set_keybd_focus(None) |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
77 return |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
78 if self.keybd_focus in self.keybd_interest: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
79 i = self.keybd_interest.index(self.keybd_focus) |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
80 i = (i+1) % len(self.keybd_interest) |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
81 else: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
82 i = 0 |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
83 self.set_keybd_focus(self.keybd_interest[i]) |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
84 # |
| 64 | 85 # Downcalls only made after certain upcalls |
| 86 # | |
| 87 def mouse_down(self, detail): | |
| 88 if self.mouse_focus: | |
| 89 self.mouse_focus.mouse_down(detail) | |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
90 return |
| 64 | 91 p = detail[0] |
| 92 for child in self.mouse_interest: | |
| 93 if rect.pointinrect(p, child.getbounds()): | |
| 94 self.mouse_focus = child | |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
95 if child in self.keybd_interest: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
96 self.set_keybd_focus(child) |
| 64 | 97 child.mouse_down(detail) |
| 98 def mouse_move(self, detail): | |
| 99 if self.mouse_focus: | |
| 100 self.mouse_focus.mouse_move(detail) | |
| 101 def mouse_up(self, detail): | |
| 102 if self.mouse_focus: | |
| 103 self.mouse_focus.mouse_up(detail) | |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
104 self.mouse_focus = None |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
105 # |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
106 def activate(self): |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
107 if self.keybd_focus: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
108 self.keybd_focus.activate() |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
109 else: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
110 self.next_keybd_focus() |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
111 def deactivate(self): |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
112 if self.keybd_focus: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
113 self.keybd_focus.deactivate() |
| 64 | 114 # |
|
1178
f9bbb01388d5
* More changes due to stricter argument passing rules
Guido van Rossum <guido@python.org>
parents:
1110
diff
changeset
|
115 def keybd(self, type, detail): |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
116 if not self.keybd_focus: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
117 self.set_keybd_focus(self.keybd_interest[0]) |
| 559 | 118 if type == WE_COMMAND and detail == WC_TAB and \ |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
119 len(self.keybd_interest) > 1: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
120 self.next_keybd_focus() |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
121 return |
|
1178
f9bbb01388d5
* More changes due to stricter argument passing rules
Guido van Rossum <guido@python.org>
parents:
1110
diff
changeset
|
122 self.keybd_focus.keybd(type, detail) |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
123 # |
| 64 | 124 def timer(self): |
| 125 for child in self.timer_interest: | |
| 126 child.timer() | |
| 127 # | |
| 128 # Upcalls from child to parent | |
| 129 # | |
| 130 def addchild(self, child): | |
| 131 if child in self.children: | |
| 132 raise Error, 'addchild: child already inlist' | |
| 133 self.children.append(child) | |
| 134 def delchild(self, child): | |
| 135 if child not in self.children: | |
| 136 raise Error, 'delchild: child not in list' | |
|
210
91a2f4745852
Use built-in remove() method of lists instead of util.remove.
Guido van Rossum <guido@python.org>
parents:
190
diff
changeset
|
137 self.children.remove(child) |
| 64 | 138 if child in self.mouse_interest: |
|
210
91a2f4745852
Use built-in remove() method of lists instead of util.remove.
Guido van Rossum <guido@python.org>
parents:
190
diff
changeset
|
139 self.mouse_interest.remove(child) |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
140 if child in self.keybd_interest: |
|
210
91a2f4745852
Use built-in remove() method of lists instead of util.remove.
Guido van Rossum <guido@python.org>
parents:
190
diff
changeset
|
141 self.keybd_interest.remove(child) |
| 64 | 142 if child in self.timer_interest: |
|
210
91a2f4745852
Use built-in remove() method of lists instead of util.remove.
Guido van Rossum <guido@python.org>
parents:
190
diff
changeset
|
143 self.timer_interest.remove(child) |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
144 if child in self.altdraw_interest: |
|
210
91a2f4745852
Use built-in remove() method of lists instead of util.remove.
Guido van Rossum <guido@python.org>
parents:
190
diff
changeset
|
145 self.altdraw_interest.remove(child) |
| 559 | 146 if child == self.mouse_focus: |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
147 self.mouse_focus = None |
| 559 | 148 if child == self.keybd_focus: |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
149 self.keybd_focus = None |
| 64 | 150 # |
| 151 def need_mouse(self, child): | |
| 152 if child not in self.mouse_interest: | |
| 153 self.mouse_interest.append(child) | |
| 154 self.parent.need_mouse(self) | |
| 155 def no_mouse(self, child): | |
| 559 | 156 if child == self.mouse_focus: |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
157 self.mouse_focus = None |
| 64 | 158 if child in self.mouse_interest: |
|
210
91a2f4745852
Use built-in remove() method of lists instead of util.remove.
Guido van Rossum <guido@python.org>
parents:
190
diff
changeset
|
159 self.mouse_interest.remove(child) |
| 64 | 160 if not self.mouse_interest: |
| 161 self.parent.no_mouse(self) | |
| 162 # | |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
163 def need_keybd(self, child): |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
164 if child not in self.keybd_interest: |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
165 self.keybd_interest.append(child) |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
166 self.parent.need_keybd(self) |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
167 if not self.keybd_focus: |
|
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
168 self.set_keybd_focus(child) |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
169 def no_keybd(self, child): |
| 559 | 170 if child == self.keybd_focus: |
|
351
a3595ae4dc1e
minsize --> getminsize.
Guido van Rossum <guido@python.org>
parents:
210
diff
changeset
|
171 self.keybd_focus = None # Don't call child.deactivate() |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
172 if child in self.keybd_interest: |
|
210
91a2f4745852
Use built-in remove() method of lists instead of util.remove.
Guido van Rossum <guido@python.org>
parents:
190
diff
changeset
|
173 self.keybd_interest.remove(child) |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
174 if not self.keybd_interest: |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
175 self.parent.no_keybd(self) |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
176 # |
| 64 | 177 def need_timer(self, child): |
| 178 if child not in self.timer_interest: | |
| 179 self.timer_interest.append(child) | |
| 180 self.parent.need_timer(self) | |
| 181 def no_timer(self, child): | |
| 182 if child in self.timer_interest: | |
|
210
91a2f4745852
Use built-in remove() method of lists instead of util.remove.
Guido van Rossum <guido@python.org>
parents:
190
diff
changeset
|
183 self.timer_interest.remove(child) |
| 64 | 184 if not self.timer_interest: |
| 185 self.parent.no_timer(self) | |
| 186 # | |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
187 def need_altdraw(self, child): |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
188 if child not in self.altdraw_interest: |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
189 self.altdraw_interest.append(child) |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
190 self.parent.need_altdraw(self) |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
191 def no_altdraw(self, child): |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
192 if child in self.altdraw_interest: |
|
210
91a2f4745852
Use built-in remove() method of lists instead of util.remove.
Guido van Rossum <guido@python.org>
parents:
190
diff
changeset
|
193 self.altdraw_interest.remove(child) |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
194 if not self.altdraw_interest: |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
195 self.parent.no_altdraw(self) |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
196 # |
| 64 | 197 # The rest are transparent: |
| 198 # | |
| 199 def begindrawing(self): | |
| 200 return self.parent.begindrawing() | |
| 201 def beginmeasuring(self): | |
| 202 return self.parent.beginmeasuring() | |
|
190
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
203 def getwindow(self): |
|
b50fa6d58786
Added keyboard, alternate drawing, realize and getwindow interfaces.
Guido van Rossum <guido@python.org>
parents:
98
diff
changeset
|
204 return self.parent.getwindow() |
| 64 | 205 # |
| 206 def change(self, area): | |
| 207 self.parent.change(area) | |
|
1178
f9bbb01388d5
* More changes due to stricter argument passing rules
Guido van Rossum <guido@python.org>
parents:
1110
diff
changeset
|
208 def scroll(self, area, vector): |
|
f9bbb01388d5
* More changes due to stricter argument passing rules
Guido van Rossum <guido@python.org>
parents:
1110
diff
changeset
|
209 self.parent.scroll(area, vector) |
| 64 | 210 def settimer(self, itimer): |
| 211 self.parent.settimer(itimer) |
