#! /usr/bin/env python
#
# GUI module generated by PAGE version 4.9
# In conjunction with Tcl version 8.6
#    Jul 08, 2017 11:35:04 PM
import sys

try:
    from Tkinter import *
except ImportError:
    from tkinter import *

try:
    import ttk
    py3 = 0
except ImportError:
    import tkinter.ttk as ttk
    py3 = 1

import TSSDemo_support

def vp_start_gui():
    '''Starting point when module is the main routine.'''
    global val, w, root
    root = Tk()
    top = Shamir_Secret_Sharing_Demo (root)
    TSSDemo_support.init(root, top)
    root.mainloop()

w = None
def create_Shamir_Secret_Sharing_Demo(root, *args, **kwargs):
    '''Starting point when module is imported by another program.'''
    global w, w_win, rt
    rt = root
    w = Toplevel (root)
    top = Shamir_Secret_Sharing_Demo (w)
    TSSDemo_support.init(w, top, *args, **kwargs)
    return (w, top)

def destroy_Shamir_Secret_Sharing_Demo():
    global w
    w.destroy()
    w = None


class Shamir_Secret_Sharing_Demo:
    def __init__(self, top=None):
        '''This class configures and populates the toplevel window.
           top is the toplevel containing window.'''
        _bgcolor = '#d9d9d9'  # X11 color: 'gray85'
        _fgcolor = '#000000'  # X11 color: 'black'
        _compcolor = '#d9d9d9' # X11 color: 'gray85'
        _ana1color = '#d9d9d9' # X11 color: 'gray85' 
        _ana2color = '#d9d9d9' # X11 color: 'gray85' 
        self.style = ttk.Style()
        if sys.platform == "win32":
            self.style.theme_use('winnative')
        self.style.configure('.',background=_bgcolor)
        self.style.configure('.',foreground=_fgcolor)
        self.style.configure('.',font="TkDefaultFont")
        self.style.map('.',background=
            [('selected', _compcolor), ('active',_ana2color)])

        top.geometry("803x563+300+113")
        top.title("Chia se bi mat Shamir")
        top.configure(background="#d9d9d9")
        top.configure(highlightbackground="#d9d9d9")
        top.configure(highlightcolor="black")



        self.shareNum = Entry(top)
        self.shareNum.place(relx=0.14, rely=0.04, relheight=0.04, relwidth=0.4)
        self.shareNum.configure(background="white")
        self.shareNum.configure(disabledforeground="#a3a3a3")
        self.shareNum.configure(font="TkFixedFont")
        self.shareNum.configure(foreground="#000000")
        self.shareNum.configure(highlightbackground="#d9d9d9")
        self.shareNum.configure(highlightcolor="black")
        self.shareNum.configure(insertbackground="black")
        self.shareNum.configure(selectbackground="#c4c4c4")
        self.shareNum.configure(selectforeground="black")

        self.menubar = Menu(top,font="TkMenuFont",bg=_bgcolor,fg=_fgcolor)
        top.configure(menu = self.menubar)



        self.Label1 = Label(top)
        self.Label1.place(relx=0.04, rely=0.04, height=21, width=64)
        self.Label1.configure(activebackground="#f9f9f9")
        self.Label1.configure(activeforeground="black")
        self.Label1.configure(background="#d9d9d9")
        self.Label1.configure(disabledforeground="#a3a3a3")
        self.Label1.configure(foreground="#000000")
        self.Label1.configure(highlightbackground="#d9d9d9")
        self.Label1.configure(highlightcolor="black")
        self.Label1.configure(text='''No of Share''')

        self.Label2 = Label(top)
        self.Label2.place(relx=0.04, rely=0.11, height=21, width=54)
        self.Label2.configure(activebackground="#f9f9f9")
        self.Label2.configure(activeforeground="black")
        self.Label2.configure(background="#d9d9d9")
        self.Label2.configure(disabledforeground="#a3a3a3")
        self.Label2.configure(foreground="#000000")
        self.Label2.configure(highlightbackground="#d9d9d9")
        self.Label2.configure(highlightcolor="black")
        self.Label2.configure(text='''Threshold''')

        self.threshold = Entry(top)
        self.threshold.place(relx=0.14, rely=0.1, relheight=0.04, relwidth=0.4)
        self.threshold.configure(background="white")
        self.threshold.configure(disabledforeground="#a3a3a3")
        self.threshold.configure(font="TkFixedFont")
        self.threshold.configure(foreground="#000000")
        self.threshold.configure(highlightbackground="#d9d9d9")
        self.threshold.configure(highlightcolor="black")
        self.threshold.configure(insertbackground="black")
        self.threshold.configure(selectbackground="#c4c4c4")
        self.threshold.configure(selectforeground="black")

        self.Label3 = Label(top)
        self.Label3.place(relx=0.04, rely=0.18, height=21, width=38)
        self.Label3.configure(activebackground="#f9f9f9")
        self.Label3.configure(activeforeground="black")
        self.Label3.configure(background="#d9d9d9")
        self.Label3.configure(disabledforeground="#a3a3a3")
        self.Label3.configure(foreground="#000000")
        self.Label3.configure(highlightbackground="#d9d9d9")
        self.Label3.configure(highlightcolor="black")
        self.Label3.configure(text='''Secret''')

        self.Split = Button(top)
        self.Split.place(relx=0.71, rely=0.92, height=24, width=87)
        self.Split.configure(activebackground="#d9d9d9")
        self.Split.configure(activeforeground="#000000")
        self.Split.configure(background="#d9d9d9")
        self.Split.configure(disabledforeground="#a3a3a3")
        self.Split.configure(foreground="#000000")
        self.Split.configure(highlightbackground="#d9d9d9")
        self.Split.configure(highlightcolor="black")
        self.Split.configure(pady="0")
        self.Split.configure(text='''Split''')
        self.Split.configure(command=TSSDemo_support.split)

        self.Combine = Button(top)
        self.Combine.place(relx=0.83, rely=0.92, height=24, width=87)
        self.Combine.configure(activebackground="#d9d9d9")
        self.Combine.configure(activeforeground="#000000")
        self.Combine.configure(background="#d9d9d9")
        self.Combine.configure(disabledforeground="#a3a3a3")
        self.Combine.configure(foreground="#000000")
        self.Combine.configure(highlightbackground="#d9d9d9")
        self.Combine.configure(highlightcolor="black")
        self.Combine.configure(pady="0")
        self.Combine.configure(text='''Combine''')
        self.Combine.configure(command=TSSDemo_support.combine)

        self.secret = Entry(top)
        self.secret.place(relx=0.14, rely=0.18, relheight=0.04, relwidth=0.4)
        self.secret.configure(background="white")
        self.secret.configure(disabledforeground="#a3a3a3")
        self.secret.configure(font="TkFixedFont")
        self.secret.configure(foreground="#000000")
        self.secret.configure(highlightbackground="#d9d9d9")
        self.secret.configure(highlightcolor="black")
        self.secret.configure(insertbackground="black")
        self.secret.configure(selectbackground="#c4c4c4")
        self.secret.configure(selectforeground="black")

        self.style.configure('TNotebook.Tab', background=_bgcolor)
        self.style.configure('TNotebook.Tab', foreground=_fgcolor)
        self.style.map('TNotebook.Tab', background=
            [('selected', _compcolor), ('active',_ana2color)])
        self.TNotebook1 = ttk.Notebook(top)
        self.TNotebook1.place(relx=0.04, rely=0.25, relheight=0.29
                , relwidth=0.91)
        self.TNotebook1.configure(width=734)
        self.TNotebook1.configure(takefocus="")
        self.TNotebook1_t1 = ttk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t1, padding=3)
        self.TNotebook1.tab(0, text="Page 1",underline="-1",)
        self.TNotebook1_t2 = ttk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t2, padding=3)
        self.TNotebook1.tab(1, text="Page 2",underline="-1",)

        self.splitResult = Text(self.TNotebook1_t1)
        self.splitResult.place(relx=0.0, rely=0.0, relheight=1.1, relwidth=1.01)
        self.splitResult.configure(background="white")
        self.splitResult.configure(font="TkTextFont")
        self.splitResult.configure(foreground="black")
        self.splitResult.configure(highlightbackground="#d9d9d9")
        self.splitResult.configure(highlightcolor="black")
        self.splitResult.configure(insertbackground="black")
        self.splitResult.configure(selectbackground="#c4c4c4")
        self.splitResult.configure(selectforeground="black")
        self.splitResult.configure(width=734)
        self.splitResult.configure(wrap=WORD)
        
        self.splitAdvanceResult = Text(self.TNotebook1_t2)
        self.splitAdvanceResult.place(relx=0.0, rely=0.0, relheight=1.03
                , relwidth=1.01)
        self.splitAdvanceResult.configure(background="white")
        self.splitAdvanceResult.configure(font="TkTextFont")
        self.splitAdvanceResult.configure(foreground="black")
        self.splitAdvanceResult.configure(highlightbackground="#d9d9d9")
        self.splitAdvanceResult.configure(highlightcolor="black")
        self.splitAdvanceResult.configure(insertbackground="black")
        self.splitAdvanceResult.configure(selectbackground="#c4c4c4")
        self.splitAdvanceResult.configure(selectforeground="black")
        self.splitAdvanceResult.configure(width=734)
        self.splitAdvanceResult.configure(wrap=WORD)

        self.TNotebook2 = ttk.Notebook(top)
        self.TNotebook2.place(relx=0.04, rely=0.58, relheight=0.29
                , relwidth=0.91)
        self.TNotebook2.configure(width=734)
        self.TNotebook2.configure(takefocus="")
        self.TNotebook2_t1 = ttk.Frame(self.TNotebook2)
        self.TNotebook2.add(self.TNotebook2_t1, padding=3)
        self.TNotebook2.tab(0, text="Page 1",underline="-1",)
        self.TNotebook2_t2 = ttk.Frame(self.TNotebook2)
        self.TNotebook2.add(self.TNotebook2_t2, padding=3)
        self.TNotebook2.tab(1, text="Page 2",underline="-1",)

        self.combineResult = Text(self.TNotebook2_t1)
        self.combineResult.place(relx=0.0, rely=0.0, relheight=1.1
                , relwidth=1.01)
        self.combineResult.configure(background="white")
        self.combineResult.configure(font="TkTextFont")
        self.combineResult.configure(foreground="black")
        self.combineResult.configure(highlightbackground="#d9d9d9")
        self.combineResult.configure(highlightcolor="black")
        self.combineResult.configure(insertbackground="black")
        self.combineResult.configure(selectbackground="#c4c4c4")
        self.combineResult.configure(selectforeground="black")
        self.combineResult.configure(width=734)
        self.combineResult.configure(wrap=WORD)
        
        self.combineAdvanceResult = Text(self.TNotebook2_t2)
        self.combineAdvanceResult.place(relx=0.0, rely=0.0, relheight=1.03
                , relwidth=1.01)
        self.combineAdvanceResult.configure(background="white")
        self.combineAdvanceResult.configure(font="TkTextFont")
        self.combineAdvanceResult.configure(foreground="black")
        self.combineAdvanceResult.configure(highlightbackground="#d9d9d9")
        self.combineAdvanceResult.configure(highlightcolor="black")
        self.combineAdvanceResult.configure(insertbackground="black")
        self.combineAdvanceResult.configure(selectbackground="#c4c4c4")
        self.combineAdvanceResult.configure(selectforeground="black")
        self.combineAdvanceResult.configure(width=734)
        self.combineAdvanceResult.configure(wrap=WORD)

    @staticmethod
    def popup1(event):
        font9 = "TkDefaultFont"
        Popupmenu1 = Menu(root, tearoff=0)
        Popupmenu1.configure(activebackground="#ffffcd")
        Popupmenu1.configure(activeborderwidth="1")
        Popupmenu1.configure(activeforeground="black")
        Popupmenu1.configure(background="#dda0dd")
        Popupmenu1.configure(borderwidth="1")
        Popupmenu1.configure(disabledforeground="#a3a3a3")
        Popupmenu1.configure(foreground="black")
        Popupmenu1.add_command(
                activebackground="#f4bcb2",
                activeforeground="#000000",
                background="wheat",
                command=TSSDemo_support.this,
                font=font9,
                foreground="#000000",
                label="This")
        Popupmenu1.add_command(
                activebackground="#f4bcb2",
                activeforeground="#000000",
                background="wheat",
                command=TSSDemo_support.that,
                font=font9,
                foreground="#000000",
                label="That")
        Popupmenu1.add_separator(
                background="wheat")
        also = Menu(Popupmenu1,tearoff=0)
        Popupmenu1.add_cascade(menu=also,
                activebackground="#f4bcb2",
                activeforeground="#111111",
                background="wheat",
                font=font9,
                foreground="#000000",
                label="Also")
        also.add_command(
                activebackground="#f4bcb2",
                activeforeground="#000000",
                background="wheat",
                command=TSSDemo_support.then,
                font=font9,
                foreground="#000000",
                label="Then")
        also.add_command(
                activebackground="#f4bcb2",
                activeforeground="#000000",
                background="wheat",
                command=TSSDemo_support.there,
                font=font9,
                foreground="#000000",
                label="There")
        Popupmenu1.post(event.x_root, event.y_root)

    @staticmethod
    def popup2(event):
        font9 = "TkDefaultFont"
        Popupmenu2 = Menu(root, tearoff=0)
        Popupmenu2.configure(activebackground="#ffffcd")
        Popupmenu2.configure(activeborderwidth="1")
        Popupmenu2.configure(activeforeground="black")
        Popupmenu2.configure(background="wheat")
        Popupmenu2.configure(borderwidth="1")
        Popupmenu2.configure(disabledforeground="#a3a3a3")
        Popupmenu2.configure(foreground="black")
        Popupmenu2.add_command(
                activebackground="#f4bcb2",
                activeforeground="#000000",
                background="plum",
                command=TSSDemo_support.how,
                font=font9,
                foreground="#000000",
                label="How")
        Popupmenu2.add_command(
                activebackground="#f4bcb2",
                activeforeground="#000000",
                background="plum",
                command=TSSDemo_support.now,
                font=font9,
                foreground="#000000",
                label="Now")
        Popupmenu2.add_separator(
                background="plum")
        browncow = Menu(Popupmenu2,tearoff=0)
        Popupmenu2.add_cascade(menu=browncow,
                activebackground="#f4bcb2",
                activeforeground="#111111",
                background="plum",
                font=font9,
                foreground="#000000",
                label="BrownCow")
        browncow.add_command(
                activebackground="#f4bcb2",
                activeforeground="#000000",
                background="plum",
                command=TSSDemo_support.moo,
                font=font9,
                foreground="#000000",
                label="Moo")
        Popupmenu2.post(event.x_root, event.y_root)






if __name__ == '__main__':
    vp_start_gui()



