#! /usr/bin/env python
#  -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 6.0
#  in conjunction with Tcl version 8.6
#    Jan 16, 2021 07:23:51 PM EET  platform: Linux

import sys

try:
    import Tkinter as tk
except ImportError:
    import tkinter as tk

try:
    import ttk
    py3 = False
except ImportError:
    import tkinter.ttk as ttk
    py3 = True

import croppergui_support

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

w = None
def create_Toplevel1(rt, *args, **kwargs):
    '''Starting point when module is imported by another module.
       Correct form of call: 'create_Toplevel1(root, *args, **kwargs)' .'''
    global w, w_win, root
    #rt = root
    root = rt
    w = tk.Toplevel (root)
    top = Toplevel1 (w)
    croppergui_support.init(w, top, *args, **kwargs)
    return (w, top)

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

class Toplevel1:
    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 = '#ececec' # Closest X11 color: 'gray92'

        top.geometry("1354x939+202+84")
        top.minsize(1, 1)
        top.maxsize(1905, 1050)
        top.resizable(1,  1)
        top.title("Cropper gui")
        top.configure(highlightcolor="black")

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

        self.canvPhoto = tk.Canvas(top)
        self.canvPhoto.place(relx=0.018, rely=0.064, relheight=0.915
                , relwidth=0.965)
        self.canvPhoto.configure(borderwidth="2")
        self.canvPhoto.configure(relief="ridge")
        self.canvPhoto.configure(selectbackground="blue")
        self.canvPhoto.configure(selectforeground="white")
        self.canvPhoto.bind('<Button-4>',lambda e:croppergui_support.a_canv_scroll_up(e))
        self.canvPhoto.bind('<Button-5>',lambda e:croppergui_support.a_canv_scroll_down(e))
        self.canvPhoto.bind('<MouseWheel>',lambda e:croppergui_support.a_canv_mousewheel(e))

        self.btnNext = tk.Button(top)
        self.btnNext.place(relx=0.798, rely=0.011, height=34, width=86)
        self.btnNext.configure(activebackground="#f9f9f9")
        self.btnNext.configure(text='''Next''')
        self.btnNext.bind('<Button-1>',lambda e:croppergui_support.a_btnNext(e))

        self.btnCrop = tk.Button(top)
        self.btnCrop.place(relx=0.879, rely=0.011, height=34, width=136)
        self.btnCrop.configure(activebackground="#f9f9f9")
        self.btnCrop.configure(text='''CropAndSave''')
        self.btnCrop.bind('<Button-1>',lambda e:croppergui_support.a_btnCrop(e))

        self.Label1 = tk.Label(top)
        self.Label1.place(relx=0.02, rely=0.011, height=33, width=133)
        self.Label1.configure(activebackground="#f9f9f9")
        self.Label1.configure(text='''Working folder:''')

        self.btn_working_folder = tk.Button(top)
        self.btn_working_folder.place(relx=0.118, rely=0.011, height=34
                , width=496)
        self.btn_working_folder.configure(activebackground="#f9f9f9")
        self.btn_working_folder.configure(text='''Button''')
        self.btn_working_folder.bind('<Button-1>',lambda e:croppergui_support.a_btn_working_folder(e))

if __name__ == '__main__':
    vp_start_gui()





