Viewer.py
changeset 91 e8e9ddeed76c
parent 90 2245e8776086
child 94 e7f5a251f251
equal deleted inserted replaced
90:2245e8776086 91:e8e9ddeed76c
    58             block = FBD_Block(self.ParentWindow, values[0], values[2], id)
    58             block = FBD_Block(self.ParentWindow, values[0], values[2], id)
    59             block.SetPosition(x, y)
    59             block.SetPosition(x, y)
    60             width, height = block.GetMinSize()
    60             width, height = block.GetMinSize()
    61             block.SetSize(width, height)
    61             block.SetSize(width, height)
    62             self.ParentWindow.AddBlock(block)
    62             self.ParentWindow.AddBlock(block)
    63             self.ParentWindow.Controler.AddCurrentElementEditingBlock(id)
    63             self.ParentWindow.Controler.AddCurrentElementEditingBlock(id,values[0], values[2])
    64             self.ParentWindow.RefreshBlockModel(block)
    64             self.ParentWindow.RefreshBlockModel(block)
    65             self.ParentWindow.RefreshScrollBars()
    65             self.ParentWindow.RefreshScrollBars()
    66             self.ParentWindow.Update()
    66             self.ParentWindow.Refresh()
    67         elif values[1] != "location":
    67         elif values[1] != "location":
    68             id = self.ParentWindow.GetNewId()
    68             id = self.ParentWindow.GetNewId()
    69             if values[1] == "Output":
    69             if values[1] == "Output":
    70                 var_type = OUTPUT
    70                 var_type = OUTPUT
    71             elif values[1] == "InOut":
    71             elif values[1] == "InOut":
    78             variable.SetSize(width, height)
    78             variable.SetSize(width, height)
    79             self.ParentWindow.AddBlock(variable)
    79             self.ParentWindow.AddBlock(variable)
    80             self.ParentWindow.Controler.AddCurrentElementEditingVariable(id, var_type)
    80             self.ParentWindow.Controler.AddCurrentElementEditingVariable(id, var_type)
    81             self.ParentWindow.RefreshVariableModel(variable)
    81             self.ParentWindow.RefreshVariableModel(variable)
    82             self.ParentWindow.RefreshScrollBars()
    82             self.ParentWindow.RefreshScrollBars()
    83             self.ParentWindow.Update()
    83             self.ParentWindow.Refresh()
    84             
    84             
    85 
    85 
    86 """
    86 """
    87 Class that implements a Viewer based on a wx.ScrolledWindow for drawing and 
    87 Class that implements a Viewer based on a wx.ScrolledWindow for drawing and 
    88 manipulating graphic elements
    88 manipulating graphic elements