#! /usr/bin/env python3
#  -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 7.6g
#  in conjunction with Tcl version 8.6
#    Nov 02, 2022 09:14:05 AM PDT  platform: Linux

import sys
import tkinter as tk
import tkinter.ttk as ttk
from tkinter.constants import *
import os.path

_script = sys.argv[0]
_location = os.path.dirname(_script)

import popup_support

_bgcolor = 'wheat'  # X11 color: #f5deb3
_fgcolor = '#000000'  # X11 color: 'black'
_compcolor = '#b2c9f4' # Closest X11 color: 'SlateGray2'
_ana1color = '#eaf4b2' # Closest X11 color: '{pale goldenrod}'
_ana2color = '#f4bcb2' # Closest X11 color: 'RosyBrown2'
_tabfg1 = 'black' 
_tabfg2 = 'black' 
_tabbg1 = 'grey75' 
_tabbg2 = 'grey89' 
_bgmode = 'light' 
font15 = "-family {DejaVu Sans} -size 12"

class Toplevel1:
    def __init__(self, top=None):
        '''This class configures and populates the toplevel window.
           top is the toplevel containing window.'''

        top.geometry("600x450+751+195")
        top.minsize(1, 1)
        top.maxsize(1905, 1170)
        top.resizable(1,  1)
        top.title("New Toplevel 1")
        top.configure(background="wheat")
        top.configure(highlightbackground="wheat")
        top.configure(highlightcolor="black")

        self.top = top

        self.Button1 = tk.Button(self.top)
        self.Button1.place(relx=0.233, rely=0.378, height=33, width=91)
        self.Button1.configure(activebackground="#f4bcb2")
        self.Button1.configure(background="wheat")
        self.Button1.configure(disabledforeground="#b8a786")
        self.Button1.configure(font="-family {DejaVu Sans} -size 12")
        self.Button1.configure(highlightbackground="wheat")
        self.Button1.configure(text='''Button1''')
        if (popup_support.root.tk.call('tk', 'windowingsystem')=='aqua'):
            self.Button1.bind('<Control-1>', lambda e: self.popup1(e))
            self.Button1.bind('<Button-3>', lambda e: self.popup1(e))
        else:
            self.Button1.bind('<Button-3>', lambda e: self.popup1(e))
        self.Button2 = tk.Button(self.top)
        self.Button2.place(relx=0.683, rely=0.378, height=33, width=91)
        self.Button2.configure(activebackground="#f4bcb2")
        self.Button2.configure(background="wheat")
        self.Button2.configure(disabledforeground="#b8a786")
        self.Button2.configure(font="-family {DejaVu Sans} -size 12")
        self.Button2.configure(highlightbackground="wheat")
        self.Button2.configure(text='''Button2''')
        if (popup_support.root.tk.call('tk', 'windowingsystem')=='aqua'):
            self.Button2.bind('<Control-1>', lambda e: self.popup2(e))
            self.Button2.bind('<Button-3>', lambda e: self.popup2(e))
        else:
            self.Button2.bind('<Button-3>', lambda e: self.popup2(e))
        self.menubar = tk.Menu(top, font="-family {DejaVu Sans} -size 12"
                ,bg=_bgcolor, fg=_fgcolor)
        top.configure(menu = self.menubar)

        self.menubar.add_command(command=popup_support.quit,label='Quit')

    def popup1(self, event, *args, **kwargs):
        Popup1 = tk.Menu(self.top, tearoff=0)
        Popup1.configure(background=_bgcolor)
        Popup1.configure(foreground=_fgcolor)
        Popup1.configure(activebackground=_ana2color)
        Popup1.configure(activeforeground='black')
        Popup1.configure(font="TkMenuFont")
        Popup1.add_command(activebackground='#ececec'
                ,activeforeground='#000000', background='wheat'
                ,command=popup_support.this, font="-family {DejaVu Sans} -size 12"
                ,foreground='#000000', label='This')
        Popup1.add_command(activebackground='#ececec'
                ,activeforeground='#000000', background='wheat'
                ,command=popup_support.that, font="-family {DejaVu Sans} -size 12"
                ,foreground='#000000', label='That')
        Popup1.add_separator(background='wheat')
        sub_menu = tk.Menu(Popup1, activebackground='#ffffcd'
                ,activeforeground='black', background='wheat'
                ,disabledforeground='#b8a786', foreground='black', tearoff=0)
        Popup1.add_cascade(activebackground='#ececec'
                ,activeforeground='#111111', background='wheat'
                ,font="-family {DejaVu Sans} -size 12", foreground='#000000'
                ,label='Also', menu=sub_menu, )
        sub_menu.add_command(activebackground='#ececec'
                ,activeforeground='#000000', background='wheat'
                ,command=popup_support.then, font="-family {DejaVu Sans} -size 12"
                ,foreground='#000000', label='Then')
        sub_menu.add_command(activebackground='#ececec'
                ,activeforeground='#000000', background='wheat'
                ,command=popup_support.there
                ,font="-family {DejaVu Sans} -size 12", foreground='#000000'
                ,label='There')
        Popup1.post(event.x_root, event.y_root)

    def popup2(self, event, *args, **kwargs):
        Popup2 = tk.Menu(self.top, tearoff=0)
        Popup2.configure(background=_bgcolor)
        Popup2.configure(foreground=_fgcolor)
        Popup2.configure(activebackground=_ana2color)
        Popup2.configure(activeforeground='black')
        Popup2.configure(font="TkMenuFont")
        Popup2.add_command(activebackground='#ececec'
                ,activeforeground='#000000', background='plum'
                ,command=popup_support.how, font="-family {DejaVu Sans} -size 12"
                ,foreground='#000000', label='How')
        Popup2.add_command(activebackground='#ececec'
                ,activeforeground='#000000', background='plum'
                ,command=popup_support.now, font="-family {DejaVu Sans} -size 12"
                ,foreground='#000000', label='Now')
        Popup2.add_separator(background='plum')
        sub_menu1 = tk.Menu(Popup2, activebackground='#ffffcd'
                ,activeforeground='black', background='wheat'
                ,disabledforeground='#b8a786', foreground='black', tearoff=0)
        Popup2.add_cascade(activebackground='#ececec'
                ,activeforeground='#111111', background='plum'
                ,font="-family {DejaVu Sans} -size 12", foreground='#000000'
                ,label='BrownCow', menu=sub_menu1, )
        sub_menu1.add_command(activebackground='#ececec'
                ,activeforeground='#000000', background='plum'
                ,command=popup_support.moo, font="-family {DejaVu Sans} -size 12"
                ,foreground='#000000', label='Moo')
        Popup2.post(event.x_root, event.y_root)

def start_up():
    popup_support.main()

if __name__ == '__main__':
    popup_support.main()




