from tkdev import *
from tkinter.messagebox import showinfo
from sv_ttk import *
from tkinterDev.src.tkdev_docs.DevAppBar import DocsDevAppBar_Docs, DocsDevAppBar_Demo
from tkinterDev.src.tkdev_docs.DevDrag import DocsDevDrag_Docs, DocsDevDrag_Demo


class Docs(DevWindow):
    def __init__(self):
        super(Docs, self).__init__("tkinterDev Docs")
        use_dark_theme()

        self.Docs_Frame = ttk.Notebook(self)
        self.Docs_Page_DevAppBar = ttk.Frame(self.Docs_Frame)
        self.Docs_Page_DevAppBar_Docs = ttk.Label(self.Docs_Page_DevAppBar, anchor=tk.NW, text=DocsDevAppBar_Docs)
        self.Docs_Page_DevAppBar_Docs.pack(fill=tk.BOTH, expand=tk.YES, side=tk.TOP, padx=5, pady=5)
        self.Docs_Page_DevAppBar_Demo = ttk.Button(self.Docs_Page_DevAppBar, text="预览效果", command=DocsDevAppBar_Demo)
        self.Docs_Page_DevAppBar_Demo.pack(fill=tk.X, side=tk.BOTTOM, padx=5, pady=5, anchor=tk.S)
        self.Docs_Page_DevDrag = ttk.Frame(self.Docs_Frame)
        self.Docs_Page_DevDrag_Docs = ttk.Label(self.Docs_Page_DevDrag, anchor=tk.NW, text=DocsDevDrag_Docs)
        self.Docs_Page_DevDrag_Docs.pack(fill=tk.BOTH, expand=tk.YES, side=tk.TOP, padx=5, pady=5)
        self.Docs_Page_DevDrag_Demo = ttk.Button(self.Docs_Page_DevDrag, text="预览效果", command=DocsDevDrag_Demo)
        self.Docs_Page_DevDrag_Demo.pack(fill=tk.X, side=tk.BOTTOM, padx=5, pady=5, anchor=tk.S)
        self.Docs_Frame.add(self.Docs_Page_DevAppBar, text="DevAppBar")
        self.Docs_Frame.add(self.Docs_Page_DevDrag, text="DevDrag")
        self.Docs_Frame.pack(fill=tk.BOTH, expand=tk.YES, pady=5, padx=5)

        showinfo("使用提示", "这里收入的文档都是一些稳定的组件，未完成和不稳定的组件不会载入")