etisserant@14: """ Edouard@725: Minimal tab controller for a simple text editor etisserant@14: """ etisserant@14: Edouard@725: import os etisserant@14: lbessard@65: class MiniTextControler: lbessard@65: lbessard@65: def __init__(self, filepath): lbessard@65: self.FilePath = filepath laurent@716: Edouard@718: def CTNFullName(self): laurent@716: return "" laurent@716: lbessard@74: def SetEditedElementText(self, tagname, text): lbessard@65: file = open(self.FilePath, "w") lbessard@65: file.write(text) lbessard@65: file.close() lbessard@65: greg@273: def GetEditedElementText(self, tagname, debug = False): lbessard@65: if os.path.isfile(self.FilePath): lbessard@65: file = open(self.FilePath, "r") lbessard@65: text = file.read() lbessard@65: file.close() lbessard@65: return text lbessard@65: return "" lbessard@65: greg@273: def GetEditedElementInterfaceVars(self, tagname, debug = False): lbessard@74: return [] lbessard@74: greg@273: def GetEditedElementType(self, tagname, debug = False): lbessard@74: return "program" lbessard@74: greg@273: def GetBlockTypes(self, tagname = "", debug = False): lbessard@74: return [] lbessard@74: laurent@630: def GetDataTypes(self, tagname = "", basetypes = True, only_locatables = False, debug = False): laurent@630: return [] laurent@630: greg@273: def GetEnumeratedDataValues(self, debug = False): lbessard@74: return [] lbessard@74: lbessard@65: def StartBuffering(self): lbessard@65: pass lbessard@65: lbessard@65: def EndBuffering(self): lbessard@65: pass lbessard@65: lbessard@65: def BufferProject(self): lbessard@65: pass lbessard@65: