#! /usr/bin/env python
#  -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 7.5e
#  in conjunction with Tcl version 8.6
#    May 28, 2022 07:34:45 PM 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 plotextdemo_support

_bgcolor = '#d9d9d9'  # X11 color: 'gray85'
_fgcolor = '#000000'  # X11 color: 'black'
_compcolor = '#d9d9d9' # X11 color: 'gray85'
_ana1color = '#d9d9d9' # X11 color: 'gray85'
_ana2color = '#ececec' # Closest X11 color: 'gray92'
_tabfg1 = 'black' 
_tabfg2 = 'black' 
_tabbg1 = 'grey75' 
_tabbg2 = 'grey89' 
_bgmode = 'light' 

_style_code_ran = 0
def _style_code():
    global _style_code_ran
    if _style_code_ran:
       return
    style = ttk.Style()
    if sys.platform == "win32":
       style.theme_use('winnative')
    style.configure('.',background=_bgcolor)
    style.configure('.',foreground=_fgcolor)
    style.configure('.',font='TkDefaultFont')
    style.map('.',background =
       [('selected', _compcolor), ('active',_ana2color)])
    if _bgmode == 'black':
       style.map('.',foreground =
         [('selected', 'white'), ('active','white')])
    else:
       style.map('.',foreground =
         [('selected', 'black'), ('active','black')])
    _style_code_ran = 1

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

        top.geometry("1038x609+614+224")
        top.minsize(1, 1)
        top.maxsize(4225, 1410)
        top.resizable(1,  1)
        top.title("Plotext 4.1.3 Demo")
        top.configure(background="skyblue4")
        top.configure(highlightbackground="wheat")
        top.configure(highlightcolor="black")

        self.top = top
        self.PlotData = tk.StringVar()
        self.combobox = tk.StringVar()
        self.cmboPType = tk.StringVar()

        self.btnPlot = tk.Button(self.top)
        self.btnPlot.place(relx=0.597, rely=0.033, height=33, width=113)
        self.btnPlot.configure(activebackground="#f9f9f9")
        self.btnPlot.configure(borderwidth="2")
        self.btnPlot.configure(command=plotextdemo_support.on_btnPlot)
        self.btnPlot.configure(compound='left')
        self.btnPlot.configure(disabledforeground="#b8a786")
        self.btnPlot.configure(font="-family {DejaVu Sans} -size 10 -weight bold")
        self.btnPlot.configure(highlightbackground="wheat")
        self.btnPlot.configure(text='''Plot''')

        self.btnClear = tk.Button(self.top)
        self.btnClear.place(relx=0.732, rely=0.033, height=33, width=114)
        self.btnClear.configure(activebackground="#f9f9f9")
        self.btnClear.configure(borderwidth="2")
        self.btnClear.configure(command=plotextdemo_support.on_btnClear)
        self.btnClear.configure(compound='left')
        self.btnClear.configure(disabledforeground="#b8a786")
        self.btnClear.configure(font="-family {DejaVu Sans} -size 10 -weight bold")
        self.btnClear.configure(highlightbackground="wheat")
        self.btnClear.configure(text='''Clear''')

        self.btnExit = tk.Button(self.top)
        self.btnExit.place(relx=0.886, rely=0.033, height=33, width=93)
        self.btnExit.configure(activebackground="#f9f9f9")
        self.btnExit.configure(borderwidth="2")
        self.btnExit.configure(command=plotextdemo_support.on_btnExit)
        self.btnExit.configure(compound='left')
        self.btnExit.configure(disabledforeground="#b8a786")
        self.btnExit.configure(font="-family {DejaVu Sans} -size 10 -weight bold")
        self.btnExit.configure(highlightbackground="wheat")
        self.btnExit.configure(text='''Exit''')

        self.lblPlotView = tk.Label(self.top)
        self.lblPlotView.place(relx=0.01, rely=0.131, height=511, width=1019)
        self.lblPlotView.configure(activebackground="#f9f9f9")
        self.lblPlotView.configure(anchor='w')
        self.lblPlotView.configure(background="skyblue3")
        self.lblPlotView.configure(borderwidth="2")
        self.lblPlotView.configure(compound='left')
        self.lblPlotView.configure(disabledforeground="#b8a786")
        self.lblPlotView.configure(font="-family {DejaVu Sans Mono} -size 8")
        self.lblPlotView.configure(highlightbackground="wheat")
        self.lblPlotView.configure(relief="groove")
        self.lblPlotView.configure(text='''Label''')
        self.lblPlotView.configure(textvariable=self.PlotData)
        self.PlotData.set('''Label''')

        _style_code()
        self.TCombobox1 = ttk.Combobox(self.top)
        self.TCombobox1.place(relx=0.019, rely=0.066, relheight=0.034
                , relwidth=0.19)
        self.TCombobox1.configure(exportselection="0")
        self.TCombobox1.configure(font="-family {DejaVu Sans} -size 10 -weight bold")
        self.TCombobox1.configure(textvariable=self.combobox)
        self.TCombobox1.configure(takefocus="")

        self.Label1 = tk.Label(self.top)
        self.Label1.place(relx=0.019, rely=0.025, height=21, width=179)
        self.Label1.configure(activebackground="#f9f9f9")
        self.Label1.configure(anchor='w')
        self.Label1.configure(background="skyblue4")
        self.Label1.configure(compound='left')
        self.Label1.configure(disabledforeground="#b8a786")
        self.Label1.configure(font="-family {DejaVu Sans} -size 10 -weight bold")
        self.Label1.configure(foreground="#ffffff")
        self.Label1.configure(highlightbackground="wheat")
        self.Label1.configure(text='''Plot Marker:''')

        self.TCombobox2 = ttk.Combobox(self.top)
        self.TCombobox2.place(relx=0.222, rely=0.066, relheight=0.034
                , relwidth=0.248)
        self.TCombobox2.configure(exportselection="0")
        self.TCombobox2.configure(font="-family {DejaVu Sans} -size 10 -weight bold")
        self.TCombobox2.configure(textvariable=self.cmboPType)
        self.TCombobox2.configure(takefocus="")

        self.Label1_1 = tk.Label(self.top)
        self.Label1_1.place(relx=0.223, rely=0.025, height=21, width=179)
        self.Label1_1.configure(activebackground="#f9f9f9")
        self.Label1_1.configure(anchor='w')
        self.Label1_1.configure(background="skyblue4")
        self.Label1_1.configure(compound='left')
        self.Label1_1.configure(disabledforeground="#b8a786")
        self.Label1_1.configure(font="-family {DejaVu Sans} -size 10 -weight bold")
        self.Label1_1.configure(foreground="#ffffff")
        self.Label1_1.configure(highlightbackground="wheat")
        self.Label1_1.configure(text='''Plot Type:''')

def start_up():
    plotextdemo_support.main()

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




