Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://kodomo.cmm.msu.ru/trac/cca/changeset/55
Äàòà èçìåíåíèÿ: Unknown
Äàòà èíäåêñèðîâàíèÿ: Sun Apr 10 17:29:27 2016
Êîäèðîâêà: IBM-866
Changeset 55:bf831181327c òÀÓ Cyclyc Cell Automata

Changeset 55:bf831181327c


Ignore:
Timestamp:
12/07/10 14:14:03 (5 years ago)
Author:
Ilia
Branch:
default
Message:

make of window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface.py

    r54 r55 ˆà
    193193                self.mouse_zoom = event.yˆà
    194194                self.draw()ˆà
    195ˆà        ˆà
    196ˆà        def automata_frame(self):# show automata_frameˆà
    197ˆà                automata_frame.pack(side="right", fill="y", expand="no", before=canvas)ˆà
    198195        ˆà
    199196        def to_top(self):# replace choosen state to topˆà
    òÀæ òÀæ ˆà
    296293        def show_size_window(self):ˆà
    297294                size_window.deiconify()ˆà
    ˆà295        ˆà
    298296        def hide_size_window(self):ˆà
    299297                size_window.withdraw()ˆà
    ˆà298        ˆà
    ˆà299        def show_automata_window(self):ˆà
    ˆà300                automata_window.deiconify()ˆà
    ˆà301        ˆà
    ˆà302        def hide_automata_window(self):ˆà
    ˆà303                automata_window.withdraw()ˆà
    ˆà304                ˆà
    ˆà305ˆà
    300306ˆà
    301307ˆà
    òÀæ òÀæ ˆà
    323329ˆà
    324330#infoPanel=Frameˆà
    325ˆàautomata_frame=Frame(root, background="white")ˆà
    326ˆàˆà
    327ˆàheadline_frame=Frame(automata_frame, background="white")ˆà
    328ˆàhead = Label(headline_frame, text= "Automata Panel", font=16)ˆà
    329ˆàhead.pack(side="left", expand="yes")ˆà
    330ˆàhide = Button(headline_frame, text="X", command=automata_frame.forget)ˆà
    331ˆàhide.config(bg="grey")ˆà
    332ˆàhide.pack(side="right")ˆà
    333ˆàheadline_frame.pack(side="top",fill="both", expand="no")ˆà
    334ˆàˆà
    335ˆàLabel(automata_frame, text= "State Box:").pack(side="top", fill="x")ˆà
    336ˆàstate_list=Listbox(automata_frame, selectmode="extended")ˆà
    ˆà331automata_window = Toplevel(root)ˆà
    ˆà332automata_window.title("Automata")ˆà
    ˆà333automata_window.withdraw()ˆà
    ˆà334automata_window.resizable(False, False)ˆà
    ˆà335automata_window.protocol("WM_DELETE_WINDOW", handlers.hide_automata_window)ˆà
    ˆà336ˆà
    ˆà337headline = Label(automata_window, text= "Automata Panel", font=16)ˆà
    ˆà338headline.pack(side="top",fill="both", expand="no")ˆà
    ˆà339ˆà
    ˆà340Label(automata_window, text= "State Box:").pack(side="top", fill="x")ˆà
    ˆà341state_list=Listbox(automata_window, selectmode="extended")ˆà
    337342for state in automata.states:ˆà
    338343        state_list.insert("end", state)ˆà
    339344state_list.pack(side="top", fill="y")ˆà
    340ˆàup = Button(automata_frame, text="Up", command=handlers.upwards)ˆà
    ˆà345up = Button(automata_window, text="Up", command=handlers.upwards)ˆà
    341346up.config(bg="red")ˆà
    342ˆàdown = Button(automata_frame, text="Down", command=handlers.downwards)ˆà
    ˆà347down = Button(automata_window, text="Down", command=handlers.downwards)ˆà
    343348down.config(bg="orange")ˆà
    344ˆàto_top = Button(automata_frame, text="To Top", command=handlers.to_top)ˆà
    ˆà349to_top = Button(automata_window, text="To Top", command=handlers.to_top)ˆà
    345350to_top.config(bg="yellow")ˆà
    346ˆàto_bottom = Button(automata_frame, text="To Bottom", command=handlers.to_bottom)ˆà
    ˆà351to_bottom = Button(automata_window, text="To Bottom", command=handlers.to_bottom)ˆà
    347352to_bottom.config(bg="green")ˆà
    348ˆàdelete = Button(automata_frame, text="Delete", command=handlers.delete_state)ˆà
    ˆà353delete = Button(automata_window, text="Delete", command=handlers.delete_state)ˆà
    349354delete.config(bg="cyan")ˆà
    350355up.pack(side="top", fill="x")ˆà
    òÀæ òÀæ ˆà
    355360ˆà
    356361ˆà
    357ˆàinformation = Label(automata_frame, text= "Information of State")ˆà
    ˆà362information = Label(automata_window, text= "Information of State")ˆà
    358363information.pack(side="top", fill="x")ˆà
    359ˆàinfo_frame=Frame(automata_frame, background="white")ˆà
    ˆà364info_frame=Frame(automata_window)ˆà
    360365Label(info_frame, text="Name").grid(row=0, column=0)ˆà
    361366state_name = Entry(info_frame)ˆà
    òÀæ òÀæ ˆà
    376381                                                        IntVar(), IntVar(), IntVar(), IntVar()]ˆà
    377382ˆà
    378ˆàcondition = Label(automata_frame, text= "Condition of conversion")ˆà
    ˆà383condition = Label(automata_window, text= "Condition of conversion")ˆà
    379384condition.pack(side="top", fill="x")ˆà
    380ˆàcondition_frame=Frame(automata_frame, background="white")ˆà
    ˆà385condition_frame=Frame(automata_window)ˆà
    381386Label(condition_frame, text="0: ").grid(row=0, column=0)ˆà
    382387c_button_0 = Checkbutton(condition_frame, variable=ckeckbox_nums[0])ˆà
    òÀæ òÀæ ˆà
    409414ˆà
    410415ˆà
    411ˆàadd_state = Button(automata_frame, text="Add", command=handlers.add)ˆà
    ˆà416add_state = Button(automata_window, text="Add", command=handlers.add)ˆà
    412417add_state.config(bg="blue")ˆà
    413ˆàchange_state = Button(automata_frame, text="Change", command=handlers.change)ˆà
    ˆà418change_state = Button(automata_window, text="Change", command=handlers.change)ˆà
    414419change_state.config(bg="violet")ˆà
    415420add_state.pack(side="top", fill="x")ˆà
    416421change_state.pack(side="top", fill="x")ˆà
    417422ˆà
    418ˆàerror=Label(automata_frame)ˆà
    ˆà423error=Label(automata_window)ˆà
    419424error.pack(side="top", fill="x")ˆà
    420425ˆà
    òÀæ òÀæ ˆà
    425430size_window.title("")ˆà
    426431size_window.withdraw()ˆà
    ˆà432size_window.resizable(False, False)ˆà
    427433size_window.protocol("WM_DELETE_WINDOW", handlers.hide_size_window)ˆà
    428434Label(size_window, text= "Current size of window:").pack(side="top", fill="x")ˆà
    òÀæ òÀæ ˆà
    497503menubar.add_cascade(label="Action", menu=menu_action)ˆà
    498504ˆà
    499ˆàmenubar.add_command(label="Automata", command=handlers.automata_frame)ˆà
    ˆà505menubar.add_command(label="Automata", command=handlers.show_automata_window)ˆà
    500506ˆà
    501507menubar.add_command(label="Help", command=handlers.show_help_window)ˆà
Note: See TracChangeset for help on using the changeset viewer.