4 |
""" |
""" |
5 |
|
|
6 |
from org import fenfire as ff |
from org import fenfire as ff |
7 |
|
import vob |
8 |
|
|
9 |
class _Empty: |
class _Empty: |
10 |
pass |
pass |
11 |
|
|
12 |
|
class UIState: |
13 |
|
""" |
14 |
|
|
15 |
|
The following fields are public: |
16 |
|
|
17 |
|
lastVs -- The vobscene that has been drawn last. |
18 |
|
reuseVs -- set to true if the change was fast and we can just |
19 |
|
reuse the last time's vs. |
20 |
|
animate -- The next regeneration should also animate. |
21 |
|
|
22 |
|
""" |
23 |
|
|
24 |
|
def __init__(self): |
25 |
|
self.reuseVs = 0 |
26 |
|
self.lastVs = None |
27 |
|
self.animate = 0 |
28 |
|
|
29 |
|
def regenerateVS(self): |
30 |
|
self.reuseVs = 0 |
31 |
|
vob.AbstractUpdateManager.chg() |
32 |
|
|
33 |
|
def noAnimation(self): |
34 |
|
self.reuseVs = 0 |
35 |
|
|
36 |
|
def generatedNewScene(self, vs): |
37 |
|
"""A new scene was generated, start fresh. |
38 |
|
""" |
39 |
|
self.reuseVs = 1 |
40 |
|
self.lastVs = vs |
41 |
|
self.animate = 1 |
42 |
|
|
43 |
class FenPDF: |
class FenPDF: |
44 |
"""This class represents a complete fenpdf "application". |
"""This class represents a complete fenpdf "application". |
45 |
|
|
69 |
|
|
70 |
window -- the GraphicsAPI.window object |
window -- the GraphicsAPI.window object |
71 |
|
|
72 |
|
uistate -- an UIState object |
73 |
The internal members are prefixed by underscore. |
The internal members are prefixed by underscore. |
74 |
""" |
""" |
75 |
|
|
80 |
self.events = _Empty() |
self.events = _Empty() |
81 |
self.actions = _Empty() |
self.actions = _Empty() |
82 |
self.structure = _Empty() |
self.structure = _Empty() |
83 |
|
self.uistate = UIState() |
84 |
|
|
85 |
self.structure.structLink = ff.structure.StructLink.create(fen.graph) |
self.structure.structLink = ff.structure.StructLink.create(fen.graph) |
86 |
self.structure.alphContent = ff.util.AlphContent(fen) |
self.structure.alphContent = ff.util.AlphContent(fen) |