equal
deleted
inserted
replaced
|
1 """ |
|
2 Minimal tab controller for a simple text editor |
|
3 """ |
|
4 |
|
5 import os |
|
6 |
|
7 class MiniTextControler: |
|
8 |
|
9 def __init__(self, filepath): |
|
10 self.FilePath = filepath |
|
11 |
|
12 def CTNFullName(self): |
|
13 return "" |
|
14 |
|
15 def SetEditedElementText(self, tagname, text): |
|
16 file = open(self.FilePath, "w") |
|
17 file.write(text) |
|
18 file.close() |
|
19 |
|
20 def GetEditedElementText(self, tagname, debug = False): |
|
21 if os.path.isfile(self.FilePath): |
|
22 file = open(self.FilePath, "r") |
|
23 text = file.read() |
|
24 file.close() |
|
25 return text |
|
26 return "" |
|
27 |
|
28 def GetEditedElementInterfaceVars(self, tagname, debug = False): |
|
29 return [] |
|
30 |
|
31 def GetEditedElementType(self, tagname, debug = False): |
|
32 return "program" |
|
33 |
|
34 def GetBlockTypes(self, tagname = "", debug = False): |
|
35 return [] |
|
36 |
|
37 def GetDataTypes(self, tagname = "", basetypes = True, only_locatables = False, debug = False): |
|
38 return [] |
|
39 |
|
40 def GetEnumeratedDataValues(self, debug = False): |
|
41 return [] |
|
42 |
|
43 def StartBuffering(self): |
|
44 pass |
|
45 |
|
46 def EndBuffering(self): |
|
47 pass |
|
48 |
|
49 def BufferProject(self): |
|
50 pass |
|
51 |