Mercurial > cpython-lru_cache-weakref
annotate Lib/lib-stdwin/Abstract.py @ 6719:faebc1940432 legacy-trunk
Understand -Xlinker option.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 02 Dec 1997 20:38:11 +0000 |
| parents | 1d06b1499eb9 |
| children |
| rev | line source |
|---|---|
| 64 | 1 # Abstract classes for parents and children. |
| 97 | 2 # |
| 64 | 3 # Do not use as base class -- this is for documentation only. |
| 97 | 4 # |
| 5 # Note that the tree must be built top down (create the parent, | |
| 6 # then add the children). | |
| 7 # | |
| 8 # Also note that the creation methods are not standardized -- | |
| 9 # these have extra parameters dependent on the widget type. | |
| 10 # For historical reasons, button creation methods are called | |
| 11 # define() while split creation methods are called create(). | |
| 64 | 12 |
| 531 | 13 class AbstractParent: |
| 64 | 14 # |
| 15 # Upcalls from child to parent | |
| 16 # | |
| 17 def addchild(self, child): unimpl() | |
| 18 def delchild(self, child): unimpl() | |
| 19 # | |
| 20 def need_mouse(self, child): unimpl() | |
| 21 def no_mouse(self, child): unimpl() | |
| 22 # | |
| 23 def need_timer(self, child): unimpl() | |
| 24 def no_timer(self, child): unimpl() | |
| 25 # | |
| 26 # XXX need_kbd, no_kbd; focus??? | |
| 27 # | |
| 28 def begindrawing(self): return unimpl() | |
| 29 def beginmeasuring(self): return unimpl() | |
|
187
f47d5e9ea264
New: getwindow() parent method and realize() child method.
Guido van Rossum <guido@python.org>
parents:
97
diff
changeset
|
30 def getwindow(self): return unimpl() # Only for very special cases |
| 64 | 31 # |
| 32 def change(self, area): unimpl() | |
|
1110
1d06b1499eb9
* Got entirely rid of path.py.
Guido van Rossum <guido@python.org>
parents:
531
diff
changeset
|
33 def scroll(self, area, (dh, dv)): unimpl() |
| 64 | 34 def settimer(self, itimer): unimpl() |
| 35 | |
| 531 | 36 class AbstractChild: |
| 64 | 37 # |
| 38 # Downcalls from parent to child | |
| 39 # | |
| 40 def destroy(self): unimpl() | |
| 41 # | |
|
187
f47d5e9ea264
New: getwindow() parent method and realize() child method.
Guido van Rossum <guido@python.org>
parents:
97
diff
changeset
|
42 def realize(self): return unimpl() |
|
1110
1d06b1499eb9
* Got entirely rid of path.py.
Guido van Rossum <guido@python.org>
parents:
531
diff
changeset
|
43 def getminsize(self, m, (width, height)): return unimpl() |
| 64 | 44 def getbounds(self): return unimpl() |
| 45 def setbounds(self, bounds): unimpl() | |
|
1110
1d06b1499eb9
* Got entirely rid of path.py.
Guido van Rossum <guido@python.org>
parents:
531
diff
changeset
|
46 def draw(self, d, area): unimpl() |
| 64 | 47 # |
| 48 # Downcalls only made after certain upcalls | |
| 49 # | |
| 50 def mouse_down(self, detail): unimpl() | |
| 51 def mouse_move(self, detail): unimpl() | |
| 52 def mouse_up(self, detail): unimpl() | |
| 53 # | |
| 54 def timer(self): unimpl() | |
| 55 | |
| 56 # A "Split" is a child that manages one or more children. | |
| 57 # (This terminology is due to DEC SRC, except for CSplits.) | |
| 58 # A child of a split may be another split, a button, a slider, etc. | |
| 59 # Certain upcalls and downcalls can be handled transparently, but | |
| 60 # for others (e.g., all geometry related calls) this is not possible. | |
| 61 | |
| 531 | 62 class AbstractSplit(AbstractChild, AbstractParent): |
| 64 | 63 pass |
