# Path: Interface/GridElements.py
# class GridElement():
#     """
#     This class contains data for grid elements
#     """
#     __metaclass__ = abc.ABCMeta
# 
#     @abc.abstractmethod
#     def __init__(self, x, y, x_length, y_length, colour="black"):
#         self.x, self.y, self.colour = x, y, colour
#         self.x_length, self.y_length = x_length, y_length
#         self.canvas = None
# 
#     @abc.abstractmethod
#     def add_elements(self):
#         pass
# 
# class FormGridElement(GridElement):
#     """
#     This class contains data for grid elements
#     """
#     def __init__(self, x, y, x_length, y_length, colour="black"):
#         GridElement.__init__(self, x, y, x_length, y_length, colour)
# 
#     def add_elements(self):
#         assert isinstance(self.canvas, Canvas)
#         button = Button(self.canvas, text="Quit")
#         label = Label(self.canvas, text="This is a label")
#         window_one = self.canvas.create_window(10, 10, anchor=NW, window=label)
#         window_two = self.canvas.create_window(100, 10, anchor=NW, window=button)


from Interface.GridElements import GridElement, FormGridElement
from Tkinter import *
from ttk import *
import abc
        self.parent.title(self.title)
        self.content_grid = Frame(self.parent)
        self.parent.geometry("%dx%d" % (self.width, self.height))

    def pack_window(self):
        """
        This method just 'packs' the window with the different components
        """
        self.pack(fill=BOTH, expand=1)

    def setup_grid(self, padding=1.0, rows=5, columns=5, grid_elements=None):
        """
        This method initializes a grid within the root window
        :param grid_elements: the particular layout for the canvases
        :param rows: the number of rows to create
        :param columns: the number of columns to create
        """
        self.content_grid.grid(column=0, row=0, columnspan=columns, rowspan=rows)
        self.fill_grid(padding, rows, columns, grid_elements)

    def fill_grid(self, padding=1.0, rows=5, columns=5, grid_elements=None):
        """
        This method creates elements (canvases) inside of the grid and links to them
        :param grid_elements: the particular layout for the canvases
        :param rows: the number of rows to create
        :param columns: the number of columns to create
        """
        one_width = (self.width * padding) / columns
        one_height = (self.height * padding) / rows
        for element in grid_elements:

# Path: Interface/GridElements.py
# class GridElement():
#     """
#     This class contains data for grid elements
#     """
#     __metaclass__ = abc.ABCMeta
# 
#     @abc.abstractmethod
#     def __init__(self, x, y, x_length, y_length, colour="black"):
#         self.x, self.y, self.colour = x, y, colour
#         self.x_length, self.y_length = x_length, y_length
#         self.canvas = None
# 
#     @abc.abstractmethod
#     def add_elements(self):
#         pass
# 
# class FormGridElement(GridElement):
#     """
#     This class contains data for grid elements
#     """
#     def __init__(self, x, y, x_length, y_length, colour="black"):
#         GridElement.__init__(self, x, y, x_length, y_length, colour)
# 
#     def add_elements(self):
#         assert isinstance(self.canvas, Canvas)
#         button = Button(self.canvas, text="Quit")
#         label = Label(self.canvas, text="This is a label")
#         window_one = self.canvas.create_window(10, 10, anchor=NW, window=label)
#         window_two = self.canvas.create_window(100, 10, anchor=NW, window=button)


# Path: Interface/Window.py
from Interface.GridElements import GridElement, FormGridElement
from Tkinter import *
from ttk import *
import abc

        self.parent.title(self.title)
        self.content_grid = Frame(self.parent)
        self.parent.geometry("%dx%d" % (self.width, self.height))

    def pack_window(self):
        """
        This method just 'packs' the window with the different components
        """
        self.pack(fill=BOTH, expand=1)

    def setup_grid(self, padding=1.0, rows=5, columns=5, grid_elements=None):
        """
        This method initializes a grid within the root window
        :param grid_elements: the particular layout for the canvases
        :param rows: the number of rows to create
        :param columns: the number of columns to create
        """
        self.content_grid.grid(column=0, row=0, columnspan=columns, rowspan=rows)
        self.fill_grid(padding, rows, columns, grid_elements)

    def fill_grid(self, padding=1.0, rows=5, columns=5, grid_elements=None):
        """
        This method creates elements (canvases) inside of the grid and links to them
        :param grid_elements: the particular layout for the canvases
        :param rows: the number of rows to create
        :param columns: the number of columns to create
        """
        one_width = (self.width * padding) / columns
        one_height = (self.height * padding) / rows
        for element in grid_elements:

            assert isinstance(element, GridElement)