aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-11-06 23:17:19 -0600
committerIván Ávalos <avalos@disroot.org>2022-11-06 23:17:19 -0600
commita7142bce0e17b4fdd5cae33e6ef0140a109a496a (patch)
tree5819347ac8c8a41e88250beb4611d4b39a13621b /main.py
parent36aebb9be7903b9461d332e72102e4b4beb39ba6 (diff)
downloadjavanol-a7142bce0e17b4fdd5cae33e6ef0140a109a496a.tar.gz
javanol-a7142bce0e17b4fdd5cae33e6ef0140a109a496a.tar.bz2
javanol-a7142bce0e17b4fdd5cae33e6ef0140a109a496a.zip
Se eliminan residuos
Diffstat (limited to 'main.py')
-rw-r--r--main.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/main.py b/main.py
index 1df4337..8432849 100644
--- a/main.py
+++ b/main.py
@@ -6,7 +6,11 @@ from lexer import *
class Main:
input_file = None
output_file = None
+
+ # GUI widgets
text = None
+ msgarea = None
+ symbols = None
def abrir_archivo(self):
self.input_file = filedialog.askopenfilename()
@@ -34,9 +38,14 @@ class Main:
def main_gui(self, argv):
root = Tk()
root.title ("Javañol")
+ root.columnconfigure(0, weight=1)
+ root.rowconfigure(0, weight=1)
mainframe = ttk.Frame(root, padding="3 3 12 12")
mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
+ mainframe.columnconfigure(0, weight=1)
+ mainframe.rowconfigure(0, weight=1)
+ mainframe.rowconfigure(1, weight=0)
# Menú
win = Toplevel(root)
@@ -56,9 +65,28 @@ class Main:
win['menu'] = menubar
+ # Editor de código
self.text = Text(mainframe)
self.text.grid(column=0, row=0, sticky=(N, W, E, S))
+ # Área de mensajes
+ msgarealf = LabelFrame(mainframe, text='Área de mensajes', height=10)
+ msgarealf.grid(column=0, row=1, sticky=(W, E, S))
+
+ self.msgarea = Text(msgarealf, height=10)
+ self.msgarea.grid(column=0, row=0, sticky=(N, W, E, S))
+ self.msgarea.rowconfigure(0, weight=1)
+ self.msgarea.columnconfigure(0, weight=1)
+
+ # Tabla de símbolos
+ symbolslf = LabelFrame(mainframe, text='Símbolos', width=100)
+ symbolslf.grid(column=1, row=0, rowspan=2, sticky=(N, W, E, S))
+
+ self.symbols = Text(symbolslf, width=20)
+ self.symbols.grid(column=0, row=0, sticky=(N, W, E, S))
+ self.msgarea.rowconfigure(0, weight=1)
+ self.msgarea.columnconfigure(0, weight=1)
+
root.mainloop()
if __name__ == "__main__":