Viewer.py
changeset 292 800e100038ae
parent 290 56c4fe6b7012
child 297 e837b67cb184
equal deleted inserted replaced
291:e580c945c62a 292:800e100038ae
    21 #You should have received a copy of the GNU General Public
    21 #You should have received a copy of the GNU General Public
    22 #License along with this library; if not, write to the Free Software
    22 #License along with this library; if not, write to the Free Software
    23 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    23 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    24 
    24 
    25 import wx
    25 import wx
       
    26 if wx.VERSION >= (2, 8, 0):
       
    27     USE_AUI = True
       
    28 else:
       
    29     USE_AUI = False
    26 
    30 
    27 from plcopen.structures import *
    31 from plcopen.structures import *
    28 from PLCControler import ITEM_POU
    32 from PLCControler import ITEM_POU
    29 
    33 
    30 from Dialogs import *
    34 from Dialogs import *
  2581         yp = max(0, min(y - event.GetWheelRotation() / event.GetWheelDelta() * 3, self.GetVirtualSize()[1] / self.GetScrollPixelsPerUnit()[1]))
  2585         yp = max(0, min(y - event.GetWheelRotation() / event.GetWheelDelta() * 3, self.GetVirtualSize()[1] / self.GetScrollPixelsPerUnit()[1]))
  2582         self.RefreshVisibleElements(yp = yp)
  2586         self.RefreshVisibleElements(yp = yp)
  2583         self.Scroll(x, yp)
  2587         self.Scroll(x, yp)
  2584         
  2588         
  2585     def OnMoveWindow(self, event):
  2589     def OnMoveWindow(self, event):
  2586         self.GetBestSize()
  2590         if not USE_AUI:
       
  2591             self.GetBestSize()
  2587         self.RefreshScrollBars()
  2592         self.RefreshScrollBars()
  2588         self.RefreshVisibleElements()
  2593         self.RefreshVisibleElements()
  2589         event.Skip()
  2594         event.Skip()
  2590 
  2595 
  2591     def DoDrawing(self, dc, printing = False):
  2596     def DoDrawing(self, dc, printing = False):