
# This file was generated by the Tkinter Designer by Parth Jadhav
# https://github.com/ParthJadhav/Tkinter-Designer


from pathlib import Path

# from tkinter import *
# Explicit imports to satisfy Flake8
from tkinter import Tk, Canvas, Entry, Text, Button, PhotoImage


OUTPUT_PATH = Path(__file__).parent
ASSETS_PATH = OUTPUT_PATH / Path(r".\knowledge\build\assets\frame0")


def relative_to_assets(path: str) -> Path:
    return ASSETS_PATH / Path(path)


window = Tk()

window.geometry("1440x1024")
window.configure(bg = "#FFFFFF")


canvas = Canvas(
    window,
    bg = "#FFFFFF",
    height = 1024,
    width = 1440,
    bd = 0,
    highlightthickness = 0,
    relief = "ridge"
)

canvas.place(x = 0, y = 0)
button_image_1 = PhotoImage(
    file=relative_to_assets("button_1.png"))
button_1 = Button(
    image=button_image_1,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: prior_tree(),
    relief="flat"
)
button_1.place(
    x=460.0,
    y=522.0,
    width=140.0,
    height=44.8803825378418
)

button_image_2 = PhotoImage(
    file=relative_to_assets("button_2.png"))
button_2 = Button(
    image=button_image_2,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: show_tree([]),
    relief="flat"
)
button_2.place(
    x=249.0,
    y=522.0,
    width=140.0,
    height=44.8803825378418
)

button_image_3 = PhotoImage(
    file=relative_to_assets("button_3.png"))
button_3 = Button(
    image=button_image_3,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: add_node(),
    relief="flat"
)
button_3.place(
    x=1259.0,
    y=701.0,
    width=140.0,
    height=44.88038635253906
)

button_image_4 = PhotoImage(
    file=relative_to_assets("button_4.png"))
button_4 = Button(
    image=button_image_4,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: print("button_4 clicked"),
    relief="flat"
)
button_4.place(
    x=1259.0,
    y=620.0,
    width=140.0,
    height=44.88038635253906
)

button_image_5 = PhotoImage(
    file=relative_to_assets("button_5.png"))
button_5 = Button(
    image=button_image_5,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: print("button_5 clicked"),
    relief="flat"
)
button_5.place(
    x=1259.0,
    y=311.0,
    width=140.0,
    height=44.88038635253906
)

button_image_6 = PhotoImage(
    file=relative_to_assets("button_6.png"))
button_6 = Button(
    image=button_image_6,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: show_label(),
    relief="flat"
)
button_6.place(
    x=263.0,
    y=104.0,
    width=140.0,
    height=45.0
)

button_image_7 = PhotoImage(
    file=relative_to_assets("button_7.png"))
button_7 = Button(
    image=button_image_7,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: print("button_7 clicked"),
    relief="flat"
)
button_7.place(
    x=43.0,
    y=223.0,
    width=29.0,
    height=209.0
)

button_image_8 = PhotoImage(
    file=relative_to_assets("button_8.png"))
button_8 = Button(
    image=button_image_8,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: print("button_8 clicked"),
    relief="flat"
)
button_8.place(
    x=43.0,
    y=697.0,
    width=29.0,
    height=209.0
)

button_image_9 = PhotoImage(
    file=relative_to_assets("button_9.png"))
button_9 = Button(
    image=button_image_9,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: prior_label(),
    relief="flat"
)
button_9.place(
    x=475.0,
    y=104.0,
    width=140.0,
    height=44.88037109375
)

button_image_10 = PhotoImage(
    file=relative_to_assets("button_10.png"))
button_10 = Button(
    image=button_image_10,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: next_label(),
    relief="flat"
)
button_10.place(
    x=680.0,
    y=104.0,
    width=140.0,
    height=44.88037109375
)

button_image_11 = PhotoImage(
    file=relative_to_assets("button_11.png"))
button_11 = Button(
    image=button_image_11,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: delete_node(),
    relief="flat"
)
button_11.place(
    x=1259.0,
    y=786.0,
    width=140.0,
    height=44.88037109375
)

button_image_12 = PhotoImage(
    file=relative_to_assets("button_12.png"))
button_12 = Button(
    image=button_image_12,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: print("button_12 clicked"),
    relief="flat"
)
button_12.place(
    x=1259.0,
    y=867.0,
    width=140.0,
    height=44.88037109375
)

button_image_13 = PhotoImage(
    file=relative_to_assets("button_13.png"))
button_13 = Button(
    image=button_image_13,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: next_tree(),
    relief="flat"
)
button_13.place(
    x=659.0,
    y=522.0,
    width=140.0,
    height=44.8803825378418
)

canvas.create_rectangle(
    42.0,
    89.0,
    1381.0,
    90.0,
    fill="#000000",
    outline="")

canvas.create_rectangle(
    1235.0,
    89.0,
    1236.0,
    1009.0005493164062,
    fill="#000000",
    outline="")

canvas.create_rectangle(
    126.0,
    511.0,
    1238.0,
    515.0272476673126,
    fill="#000000",
    outline="")

entry_image_1 = PhotoImage(
    file=relative_to_assets("entry_1.png"))
entry_bg_1 = canvas.create_image(
    559.0,
    330.5,
    image=entry_image_1
)
entry_1 = Text(
    bd=0,
    bg="#D9D9D9",
    fg="#000716",
    highlightthickness=0
)
entry_1.place(
    x=127.0,
    y=163.0,
    width=864.0,
    height=333.0
)

entry_image_2 = PhotoImage(
    file=relative_to_assets("entry_2.png"))
entry_bg_2 = canvas.create_image(
    1113.5,
    330.5,
    image=entry_image_2
)
entry_2 = Text(
    bd=0,
    bg="#D9D9D9",
    fg="#000716",
    highlightthickness=0
)
entry_2.place(
    x=1007.0,
    y=163.0,
    width=213.0,
    height=333.0
)

entry_image_3 = PhotoImage(
    file=relative_to_assets("entry_3.png"))
entry_bg_3 = canvas.create_image(
    1113.5,
    769.0,
    image=entry_image_3
)
entry_3 = Text(
    bd=0,
    bg="#D9D9D9",
    fg="#000716",
    highlightthickness=0
)
entry_3.place(
    x=1007.0,
    y=572.0,
    width=213.0,
    height=392.0
)

entry_image_4 = PhotoImage(
    file=relative_to_assets("entry_4.png"))
entry_bg_4 = canvas.create_image(
    559.0,
    769.0,
    image=entry_image_4
)
entry_4 = Text(
    bd=0,
    bg="#D9D9D9",
    fg="#000716",
    highlightthickness=0
)
entry_4.place(
    x=127.0,
    y=572.0,
    width=864.0,
    height=392.0
)

canvas.create_rectangle(
    130.0,
    24.0,
    1249.0,
    77.0,
    fill="#D74040",
    outline="")

canvas.create_text(
    451.0,
    31.0,
    anchor="nw",
    text="食材数据标签重新划分小程序v1.0",
    fill="#FFFFFF",
    font=("Inter", 32 * -1)
)

button_image_14 = PhotoImage(
    file=relative_to_assets("button_14.png"))
button_14 = Button(
    image=button_image_14,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: print("button_14 clicked"),
    relief="flat"
)
button_14.place(
    x=1007.0,
    y=104.0,
    width=213.0,
    height=45.0
)

button_image_15 = PhotoImage(
    file=relative_to_assets("button_15.png"))
button_15 = Button(
    image=button_image_15,
    borderwidth=0,
    highlightthickness=0,
    command=lambda: record_delete_node_cache(),
    relief="flat"
)
button_15.place(
    x=1007.0,
    y=522.0,
    width=213.0,
    height=45.0
)
window.resizable(False, False)
window.mainloop()
