ya2 · news · projects · code · about

fixes for building
[pmachines.git] / pmachines / posmgr.py
1 class PositionMgr:
2
3 def __init__(self):
4 self._pos = {}
5
6 def reset(self):
7 self._pos = {}
8
9 def register(self, wdg, pos):
10 print('register', wdg, pos)
11 self._pos[wdg] = pos
12
13 def get(self, tgt):
14 return self._pos[tgt]
15
16 def remove(self, elements):
17 for element in elements:
18 if element in self._pos:
19 del self._pos[element]