Changeset 55:bf831181327c
- Timestamp:
- 12/07/10 14:14:03 (5 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface.py
r54 r55 ˆà 193 193 self.mouse_zoom = event.yˆà 194 194 self.draw()ˆà 195 ˆà 196 ˆà def automata_frame(self):# show automata_frameˆà197 ˆà automata_frame.pack(side="right", fill="y", expand="no", before=canvas)ˆà198 195 ˆà 199 196 def to_top(self):# replace choosen state to topˆà òÀæ òÀæ ˆà 296 293 def show_size_window(self):ˆà 297 294 size_window.deiconify()ˆà ˆà 295 ˆà 298 296 def hide_size_window(self):ˆà 299 297 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 ˆà 300 306 ˆà 301 307 ˆà òÀæ òÀæ ˆà 323 329 ˆà 324 330 #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")ˆà ˆà 331 automata_window = Toplevel(root)ˆà ˆà 332 automata_window.title("Automata")ˆà ˆà 333 automata_window.withdraw()ˆà ˆà 334 automata_window.resizable(False, False)ˆà ˆà 335 automata_window.protocol("WM_DELETE_WINDOW", handlers.hide_automata_window)ˆà ˆà 336 ˆà ˆà 337 headline = Label(automata_window, text= "Automata Panel", font=16)ˆà ˆà 338 headline.pack(side="top",fill="both", expand="no")ˆà ˆà 339 ˆà ˆà 340 Label(automata_window, text= "State Box:").pack(side="top", fill="x")ˆà ˆà 341 state_list=Listbox(automata_window, selectmode="extended")ˆà 337 342 for state in automata.states:ˆà 338 343 state_list.insert("end", state)ˆà 339 344 state_list.pack(side="top", fill="y")ˆà 340 ˆà up = Button(automata_ frame, text="Up", command=handlers.upwards)ˆàˆà 345 up = Button(automata_window, text="Up", command=handlers.upwards)ˆà 341 346 up.config(bg="red")ˆà 342 ˆà down = Button(automata_ frame, text="Down", command=handlers.downwards)ˆàˆà 347 down = Button(automata_window, text="Down", command=handlers.downwards)ˆà 343 348 down.config(bg="orange")ˆà 344 ˆà to_top = Button(automata_ frame, text="To Top", command=handlers.to_top)ˆàˆà 349 to_top = Button(automata_window, text="To Top", command=handlers.to_top)ˆà 345 350 to_top.config(bg="yellow")ˆà 346 ˆà to_bottom = Button(automata_ frame, text="To Bottom", command=handlers.to_bottom)ˆàˆà 351 to_bottom = Button(automata_window, text="To Bottom", command=handlers.to_bottom)ˆà 347 352 to_bottom.config(bg="green")ˆà 348 ˆà delete = Button(automata_ frame, text="Delete", command=handlers.delete_state)ˆàˆà 353 delete = Button(automata_window, text="Delete", command=handlers.delete_state)ˆà 349 354 delete.config(bg="cyan")ˆà 350 355 up.pack(side="top", fill="x")ˆà òÀæ òÀæ ˆà 355 360 ˆà 356 361 ˆà 357 ˆà information = Label(automata_ frame, text= "Information of State")ˆàˆà 362 information = Label(automata_window, text= "Information of State")ˆà 358 363 information.pack(side="top", fill="x")ˆà 359 ˆà info_frame=Frame(automata_ frame, background="white")ˆàˆà 364 info_frame=Frame(automata_window)ˆà 360 365 Label(info_frame, text="Name").grid(row=0, column=0)ˆà 361 366 state_name = Entry(info_frame)ˆà òÀæ òÀæ ˆà 376 381 IntVar(), IntVar(), IntVar(), IntVar()]ˆà 377 382 ˆà 378 ˆà condition = Label(automata_ frame, text= "Condition of conversion")ˆàˆà 383 condition = Label(automata_window, text= "Condition of conversion")ˆà 379 384 condition.pack(side="top", fill="x")ˆà 380 ˆà condition_frame=Frame(automata_ frame, background="white")ˆàˆà 385 condition_frame=Frame(automata_window)ˆà 381 386 Label(condition_frame, text="0: ").grid(row=0, column=0)ˆà 382 387 c_button_0 = Checkbutton(condition_frame, variable=ckeckbox_nums[0])ˆà òÀæ òÀæ ˆà 409 414 ˆà 410 415 ˆà 411 ˆà add_state = Button(automata_ frame, text="Add", command=handlers.add)ˆàˆà 416 add_state = Button(automata_window, text="Add", command=handlers.add)ˆà 412 417 add_state.config(bg="blue")ˆà 413 ˆà change_state = Button(automata_ frame, text="Change", command=handlers.change)ˆàˆà 418 change_state = Button(automata_window, text="Change", command=handlers.change)ˆà 414 419 change_state.config(bg="violet")ˆà 415 420 add_state.pack(side="top", fill="x")ˆà 416 421 change_state.pack(side="top", fill="x")ˆà 417 422 ˆà 418 ˆà error=Label(automata_ frame)ˆàˆà 423 error=Label(automata_window)ˆà 419 424 error.pack(side="top", fill="x")ˆà 420 425 ˆà òÀæ òÀæ ˆà 425 430 size_window.title("")ˆà 426 431 size_window.withdraw()ˆà ˆà 432 size_window.resizable(False, False)ˆà 427 433 size_window.protocol("WM_DELETE_WINDOW", handlers.hide_size_window)ˆà 428 434 Label(size_window, text= "Current size of window:").pack(side="top", fill="x")ˆà òÀæ òÀæ ˆà 497 503 menubar.add_cascade(label="Action", menu=menu_action)ˆà 498 504 ˆà 499 ˆà menubar.add_command(label="Automata", command=handlers. automata_frame)ˆàˆà 505 menubar.add_command(label="Automata", command=handlers.show_automata_window)ˆà 500 506 ˆà 501 507 menubar.add_command(label="Help", command=handlers.show_help_window)ˆà
Note: See TracChangeset
for help on using the changeset viewer.