version 1.21, 2004/06/02 21:53:15
|
version 1.22, 2004/06/03 18:05:57
|
Line 569 class zogiLib(Folder):
|
Line 569 class zogiLib(Folder):
|
"""mark image""" |
"""mark image""" |
return sendFile(self, 'images/urechts.gif', 'image/gif') |
return sendFile(self, 'images/urechts.gif', 'image/gif') |
|
|
|
def up_img(self): |
|
"""mark image""" |
|
return sendFile(self, 'images/up.gif', 'image/gif') |
|
|
|
def down_img(self): |
|
"""mark image""" |
|
return sendFile(self, 'images/down.gif', 'image/gif') |
|
|
|
def left_img(self): |
|
"""mark image""" |
|
return sendFile(self, 'images/left.gif', 'image/gif') |
|
|
|
def right_img(self): |
|
"""mark image""" |
|
return sendFile(self, 'images/right.gif', 'image/gif') |
|
|
|
|
|
|
Line 698 class zogiLib(Folder):
|
Line 713 class zogiLib(Folder):
|
else: |
else: |
return 2 |
return 2 |
|
|
|
|
def getSmallerWS(self): |
def getSmallerWS(self): |
"""ws-1""" |
"""ws-1""" |
ws=self.getDLParam('ws') |
ws=self.getDLParam('ws') |
Line 725 class zogiLib(Folder):
|
Line 739 class zogiLib(Folder):
|
pn = self.getPN() |
pn = self.getPN() |
return (pn > 1) |
return (pn > 1) |
|
|
|
def canMoveLeft(self): |
|
"""returns if its possible to move left""" |
|
wx = float(self.getDLParam('wx') or 0) |
|
return (wx > 0) |
|
|
|
def canMoveRight(self): |
|
"""returns if its possible to move right""" |
|
wx = float(self.getDLParam('wx') or 0) |
|
ww = float(self.getDLParam('ww') or 1) |
|
return (wx + ww < 1) |
|
|
|
def canMoveUp(self): |
|
"""returns if its possible to move up""" |
|
wy = float(self.getDLParam('wy') or 0) |
|
return (wy > 0) |
|
|
|
def canMoveDown(self): |
|
"""returns if its possible to move down""" |
|
wy = float(self.getDLParam('wy') or 0) |
|
wh = float(self.getDLParam('wh') or 1) |
|
return (wy + wh < 1) |
|
|
|
|
def dl_HMirror(self): |
def dl_HMirror(self): |
Line 747 class zogiLib(Folder):
|
Line 782 class zogiLib(Folder):
|
|
|
return self.display() |
return self.display() |
|
|
|
def dl_Zoom(self, z): |
|
"""general zoom action""" |
|
ww1 = float(self.getDLParam('ww') or 1) |
|
wh1 = float(self.getDLParam('wh') or 1) |
|
wx = float(self.getDLParam('wx') or 0) |
|
wy = float(self.getDLParam('wy') or 0) |
|
ww2 = ww1 * z |
|
wh2 = wh1 * z |
|
wx += (ww1 - ww2) / 2 |
|
wy += (wh1 - wh2) / 2 |
|
ww2 = max(min(ww2, 1), 0) |
|
wh2 = max(min(wh2, 1), 0) |
|
wx = max(min(wx, 1), 0) |
|
wy = max(min(wy, 1), 0) |
|
self.setDLParam('ww', ww2) |
|
self.setDLParam('wh', wh2) |
|
self.setDLParam('wx', wx) |
|
self.setDLParam('wy', wy) |
|
return self.display() |
|
|
|
def dl_ZoomIn(self): |
|
"""zoom in action""" |
|
z = 0.7071 |
|
return self.dl_Zoom(z) |
|
|
|
def dl_ZoomOut(self): |
|
"""zoom out action""" |
|
z = 1.4142 |
|
return self.dl_Zoom(z) |
|
|
|
def dl_Move(self, dx, dy): |
|
"""general move action""" |
|
ww = float(self.getDLParam('ww') or 1) |
|
wh = float(self.getDLParam('wh') or 1) |
|
wx = float(self.getDLParam('wx') or 0) |
|
wy = float(self.getDLParam('wy') or 0) |
|
wx += dx * 0.5 * ww |
|
wy += dy * 0.5 * wh |
|
wx = max(min(wx, 1), 0) |
|
wy = max(min(wy, 1), 0) |
|
self.setDLParam('wx', wx) |
|
self.setDLParam('wy', wy) |
|
return self.display() |
|
|
|
def dl_MoveLeft(self): |
|
"""move left action""" |
|
return self.dl_Move(-1, 0) |
|
|
|
def dl_MoveRight(self): |
|
"""move left action""" |
|
return self.dl_Move(1, 0) |
|
|
|
def dl_MoveUp(self): |
|
"""move left action""" |
|
return self.dl_Move(0, -1) |
|
|
|
def dl_MoveDown(self): |
|
"""move left action""" |
|
return self.dl_Move(0, 1) |
|
|
def dl_WholePage(self): |
def dl_WholePage(self): |
"""zoom out action""" |
"""zoom out action""" |
self.setDLParam('ww', 1) |
self.setDLParam('ww', 1) |