author | laurent |
Tue, 21 Aug 2012 18:40:42 +0200 | |
changeset 799 | 6af48f2e42ca |
parent 725 | 31dade089db5 |
child 806 | abf1afc1f04d |
permissions | -rw-r--r-- |
14
eb9fdd316a40
More precise design for plugins.... to be continued...
etisserant
parents:
13
diff
changeset
|
1 |
""" |
725 | 2 |
Minimal tab controller for a simple text editor |
14
eb9fdd316a40
More precise design for plugins.... to be continued...
etisserant
parents:
13
diff
changeset
|
3 |
""" |
eb9fdd316a40
More precise design for plugins.... to be continued...
etisserant
parents:
13
diff
changeset
|
4 |
|
725 | 5 |
import os |
14
eb9fdd316a40
More precise design for plugins.... to be continued...
etisserant
parents:
13
diff
changeset
|
6 |
|
65 | 7 |
class MiniTextControler: |
8 |
||
9 |
def __init__(self, filepath): |
|
10 |
self.FilePath = filepath |
|
716
180e4a7d945c
Adding search field for finding function or function block in library tree
laurent
parents:
715
diff
changeset
|
11 |
|
718 | 12 |
def CTNFullName(self): |
716
180e4a7d945c
Adding search field for finding function or function block in library tree
laurent
parents:
715
diff
changeset
|
13 |
return "" |
180e4a7d945c
Adding search field for finding function or function block in library tree
laurent
parents:
715
diff
changeset
|
14 |
|
74 | 15 |
def SetEditedElementText(self, tagname, text): |
65 | 16 |
file = open(self.FilePath, "w") |
17 |
file.write(text) |
|
18 |
file.close() |
|
19 |
||
273 | 20 |
def GetEditedElementText(self, tagname, debug = False): |
65 | 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 |
||
273 | 28 |
def GetEditedElementInterfaceVars(self, tagname, debug = False): |
74 | 29 |
return [] |
30 |
||
273 | 31 |
def GetEditedElementType(self, tagname, debug = False): |
74 | 32 |
return "program" |
33 |
||
273 | 34 |
def GetBlockTypes(self, tagname = "", debug = False): |
74 | 35 |
return [] |
36 |
||
630
91b2ae63ea3d
Including external tools for editing plugin informations into Beremiz window
laurent
parents:
624
diff
changeset
|
37 |
def GetDataTypes(self, tagname = "", basetypes = True, only_locatables = False, debug = False): |
91b2ae63ea3d
Including external tools for editing plugin informations into Beremiz window
laurent
parents:
624
diff
changeset
|
38 |
return [] |
91b2ae63ea3d
Including external tools for editing plugin informations into Beremiz window
laurent
parents:
624
diff
changeset
|
39 |
|
273 | 40 |
def GetEnumeratedDataValues(self, debug = False): |
74 | 41 |
return [] |
42 |
||
65 | 43 |
def StartBuffering(self): |
44 |
pass |
|
45 |
||
46 |
def EndBuffering(self): |
|
47 |
pass |
|
48 |
||
49 |
def BufferProject(self): |
|
50 |
pass |
|
51 |