Don't reference removed files in Makefile
[python/dscho.git] / Lib / lib-stdwin / Abstract.py
blob51bd305a8644d5afaa57214544e7aaa01bbb759b
1 # Abstract classes for parents and children.
3 # Do not use as base class -- this is for documentation only.
5 # Note that the tree must be built top down (create the parent,
6 # then add the children).
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().
13 class AbstractParent:
15 # Upcalls from child to parent
17 def addchild(self, child): unimpl()
18 def delchild(self, child): unimpl()
20 def need_mouse(self, child): unimpl()
21 def no_mouse(self, child): unimpl()
23 def need_timer(self, child): unimpl()
24 def no_timer(self, child): unimpl()
26 # XXX need_kbd, no_kbd; focus???
28 def begindrawing(self): return unimpl()
29 def beginmeasuring(self): return unimpl()
30 def getwindow(self): return unimpl() # Only for very special cases
32 def change(self, area): unimpl()
33 def scroll(self, area, (dh, dv)): unimpl()
34 def settimer(self, itimer): unimpl()
36 class AbstractChild:
38 # Downcalls from parent to child
40 def destroy(self): unimpl()
42 def realize(self): return unimpl()
43 def getminsize(self, m, (width, height)): return unimpl()
44 def getbounds(self): return unimpl()
45 def setbounds(self, bounds): unimpl()
46 def draw(self, d, area): unimpl()
48 # Downcalls only made after certain upcalls
50 def mouse_down(self, detail): unimpl()
51 def mouse_move(self, detail): unimpl()
52 def mouse_up(self, detail): unimpl()
54 def timer(self): unimpl()
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.
62 class AbstractSplit(AbstractChild, AbstractParent):
63 pass