-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathinterface.py
More file actions
65 lines (49 loc) · 1.15 KB
/
interface.py
File metadata and controls
65 lines (49 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
class Ui:
"""Abstract for the UI, used by the debugger
"""
watchwin = None
stackwin = None
statuswin = None
logwin = None
sourcewin = None
tracewin = None
def __init__(self):
self.is_open = False
def __del__(self):
self.close()
def open(self):
pass
def say(self, string):
pass
def close(self):
pass
def log(self):
pass
class Window:
"""Abstract for UI windows
"""
name = "WINDOW"
is_open = False
def __del__(self):
self.destroy()
def on_create(self):
""" Callback for after the window is created """
pass
def on_destroy(self):
""" Callback for after the window is destroyed """
pass
def create(self):
""" Create the window """
pass
def write(self, msg):
""" Write string in the window """
pass
def insert(self, msg, position=None):
""" Insert a string somewhere in the window """
pass
def destroy(self):
""" Close window """
pass
def clean(self):
""" clean all data in buffer """
pass