-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgui_module.py
More file actions
29 lines (22 loc) · 1.13 KB
/
Copy pathgui_module.py
File metadata and controls
29 lines (22 loc) · 1.13 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
# gui_module.py
import tkinter as tk
from tkinter import scrolledtext
class JarvisGUI:
def __init__(self, master, start_callback, stop_callback, exit_callback):
self.master = master
master.title("Jarvis v6.0 Assistant")
master.geometry("600x400")
master.resizable(False, False)
self.log = scrolledtext.ScrolledText(master, wrap=tk.WORD, width=70, height=15)
self.log.pack(pady=10)
frame = tk.Frame(master)
frame.pack(pady=10)
self.start_button = tk.Button(frame, text="▶ Start Listening", command=start_callback, width=20, bg="#4CAF50", fg="white")
self.start_button.grid(row=0, column=0, padx=10)
self.stop_button = tk.Button(frame, text="⏹ Stop Listening", command=stop_callback, width=20, bg="#f44336", fg="white")
self.stop_button.grid(row=0, column=1, padx=10)
self.exit_button = tk.Button(frame, text="❌ Exit", command=exit_callback, width=20, bg="#555", fg="white")
self.exit_button.grid(row=0, column=2, padx=10)
def log_message(self, msg):
self.log.insert(tk.END, f"{msg}\n")
self.log.see(tk.END)