editors/IECCodeViewer.py
changeset 1735 c02818d7e29f
parent 1511 91538d0c242c
child 1736 7e61baa047f0
equal deleted inserted replaced
1734:750eeb7230a1 1735:c02818d7e29f
    24 
    24 
    25 from editors.TextViewer import TextViewer
    25 from editors.TextViewer import TextViewer
    26 from plcopen.plcopen import TestTextElement
    26 from plcopen.plcopen import TestTextElement
    27 
    27 
    28 class IECCodeViewer(TextViewer):
    28 class IECCodeViewer(TextViewer):
    29     
    29 
    30     def __del__(self):
    30     def __del__(self):
    31         TextViewer.__del__(self)
    31         TextViewer.__del__(self)
    32         if getattr(self, "_OnClose"):
    32         if getattr(self, "_OnClose"):
    33             self._OnClose(self)
    33             self._OnClose(self)
    34     
    34 
    35     def Paste(self):
    35     def Paste(self):
    36         if self.Controler is not None:
    36         if self.Controler is not None:
    37             TextViewer.Paste(self)
    37             TextViewer.Paste(self)
    38     
    38 
    39     def Search(self, criteria):
    39     def Search(self, criteria):
    40         return [((self.TagName, "body", 0),) + result for result in TestTextElement(self.Editor.GetText(), criteria)]
    40         return [((self.TagName, "body", 0),) + result for result in TestTextElement(self.Editor.GetText(), criteria)]