# Path: gui/table_widget.py
# class TableWidget(gui.Frame):
#     def __init__(self, parent):
#     def set_rows(self, rows):
#     def set(self, row, column, value):


import tkinter as tk
import time
import threading
from gui import table_widget
        self.game_selected.set("Choose a game...")
        self.game_selected.trace('w', self.change_game_selection)
        self.game_list = tk.OptionMenu(self.master, self.game_selected, *self.game_options)
        self.game_list.config(width=50, padx=10)
        # Calling this before the app is drawn causes it to crash
        # self.game_selected.set(self.game_options[0])
        self.game_list.grid()

        self.game_version = tk.Label(self.master, text='')
        self.game_version.grid()

        self.check_all_button = tk.Button(self.master, text="Check All", command=self.freeze_all)
        self.uncheck_all_button = tk.Button(self.master, text="Uncheck All", command=self.unfreeze_all)
        self.check_all_button.grid(padx=(10,0))
        self.uncheck_all_button.grid(padx=(10,0), pady=(10,10))

    def change_game_selection(self, name, index, mode):
        if self.game_actions_frame != None:
            self.game_actions_frame.destroy()
        self.game_actions_frame = tk.Frame(self.master)
        game_name = self.game_selected.get()
        game = self.games.game_lookup[game_name]
        self.game_version.config(text='Game Version: {}'.format(game.version))
        self.game_pokes = [(
            'Name',
            'Address',
            'Value',
            'Poke',
            'Frozen'
        )]

# Path: gui/table_widget.py
# class TableWidget(gui.Frame):
#     def __init__(self, parent):
#     def set_rows(self, rows):
#     def set(self, row, column, value):


# Path: gui/game_actions_frame.py
import tkinter as tk
import time
import threading
from gui import table_widget

        self.game_selected.set("Choose a game...")
        self.game_selected.trace('w', self.change_game_selection)
        self.game_list = tk.OptionMenu(self.master, self.game_selected, *self.game_options)
        self.game_list.config(width=50, padx=10)
        # Calling this before the app is drawn causes it to crash
        # self.game_selected.set(self.game_options[0])
        self.game_list.grid()

        self.game_version = tk.Label(self.master, text='')
        self.game_version.grid()

        self.check_all_button = tk.Button(self.master, text="Check All", command=self.freeze_all)
        self.uncheck_all_button = tk.Button(self.master, text="Uncheck All", command=self.unfreeze_all)
        self.check_all_button.grid(padx=(10,0))
        self.uncheck_all_button.grid(padx=(10,0), pady=(10,10))

    def change_game_selection(self, name, index, mode):
        if self.game_actions_frame != None:
            self.game_actions_frame.destroy()
        self.game_actions_frame = tk.Frame(self.master)
        game_name = self.game_selected.get()
        game = self.games.game_lookup[game_name]
        self.game_version.config(text='Game Version: {}'.format(game.version))
        self.game_pokes = [(
            'Name',
            'Address',
            'Value',
            'Poke',
            'Frozen'
        )]

        self.poke_table = table_widget.TableWidget(self.game_actions_frame)