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

Changeset 77:c18bb7548057


Ignore:
Timestamp:
12/12/10 22:48:44 (5 years ago)
Author:
Ilia
Branch:
default
Message:

shortcuts for action, file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface.py

    r76 r77 ˆà
    9595                        self.draw()ˆà
    9696        ˆà
    97ˆà        def slower(self, speed_rate=2, event=None):ˆà
    ˆà97        def slower(self, event=None, speed_rate=2):ˆà
    9898                self.stop()ˆà
    9999                self.delay = self.delay*speed_rateˆà
    100100                self.start()ˆà
    101101        ˆà
    102ˆà        def faster(self, speed_rate=2, event=None):ˆà
    ˆà102        def faster(self, event=None, speed_rate=2):ˆà
    103103                self.stop()ˆà
    104104                self.delay = self.delay / speed_rateˆà
    òÀæ òÀæ ˆà
    490490                        self.keys[state.key] = indexˆà
    491491        ˆà
    ˆà492        def exit(self, event=None):ˆà
    ˆà493                passˆà
    492494ˆà
    493495ˆà
    òÀæ òÀæ ˆà
    673675ˆà
    674676menu_file = Menu(menubar)ˆà
    675ˆàmenu_file.add_command(label="New", command=handlers.new_file)ˆà
    676ˆàmenu_file.add_command(label="Open...", command=handlers.open_file)ˆà
    ˆà677menu_file.add_command(label="New", command=handlers.new_file, accelerator="Ctrl+N")ˆà
    ˆà678menu_file.bind_all("<Control-n>", handlers.new_file)ˆà
    ˆà679menu_file.add_command(label="Open...", command=handlers.open_file, accelerator="Ctrl+O")ˆà
    ˆà680menu_file.bind_all("<Control-o>", handlers.open_file)ˆà
    677681menu_file.add_command(label="Save...", command=handlers.save_file, accelerator="Ctrl+S")ˆà
    678682menu_file.bind_all("<Control-s>", handlers.save_file)ˆà
    679683menu_file.add_separator()ˆà
    680ˆàmenu_file.add_command(label="Exit", command=root.destroy)ˆà
    ˆà684menu_file.add_command(label="Exit", command=handlers.exit, accelerator="Ctrl+Q")ˆà
    ˆà685menu_file.bind_all("<Control-q>", handlers.exit)ˆà
    681686menubar.add_cascade(label="File", menu=menu_file)ˆà
    682687ˆà
    683688menu_action = Menu(menubar)ˆà
    684ˆàmenu_action.add_command(label="Start", command=handlers.start)ˆà
    685ˆàmenu_action.add_command(label="Stop", command=handlers.stop)ˆà
    686ˆàmenu_action.add_command(label="Next Step", command=handlers.next_step)ˆà
    ˆà689menu_action.add_command(label="Start", command=handlers.start, accelerator="Ctrl+G")ˆà
    ˆà690menu_action.bind_all("<Control-g>", handlers.start)ˆà
    ˆà691menu_action.add_command(label="Stop", command=handlers.stop, accelerator="Ctrl+F")ˆà
    ˆà692menu_action.bind_all("<Control-f>", handlers.stop)ˆà
    ˆà693menu_action.add_command(label="Next Step", command=handlers.next_step, accelerator="Space")ˆà
    ˆà694menu_action.bind_all("<space>", handlers.next_step)ˆà
    687695menu_action.add_separator()ˆà
    688ˆàmenu_action.add_command(label="Increase speed", command=handlers.faster)ˆà
    689ˆàmenu_action.add_command(label="Decrease speed", command=handlers.slower)ˆà
    ˆà696menu_action.add_command(label="Increase speed", command=handlers.faster, accelerator="Alt+F")ˆà
    ˆà697menu_action.bind_all("<Alt-f>", handlers.faster)ˆà
    ˆà698menu_action.add_command(label="Decrease speed", command=handlers.slower, accelerator="Alt+S")ˆà
    ˆà699menu_action.bind_all("<Alt-s>", handlers.slower)ˆà
    690700menu_action.add_separator()ˆà
    691ˆàmenu_action.add_command(label="Zoom In", command=handlers.zoom_in)ˆà
    692ˆàmenu_action.add_command(label="Zoom Out", command=handlers.zoom_out)ˆà
    ˆà701menu_action.add_command(label="Zoom In", command=handlers.zoom_in, accelerator="Ctrl+Z")ˆà
    ˆà702menu_action.bind_all("<Control-z>", handlers.zoom_in)ˆà
    ˆà703menu_action.add_command(label="Zoom Out", command=handlers.zoom_out, accelerator="Ctrl+X")ˆà
    ˆà704menu_action.bind_all("<Control-x>", handlers.zoom_out)ˆà
    693705menu_action.add_separator()ˆà
    694ˆàmenu_action.add_command(label="Clean field", command=handlers.clean_field)ˆà
    695ˆàmenu_action.add_command(label="Fill randomly", command=handlers.fill_randomly)ˆà
    ˆà706menu_action.add_command(label="Clean field", command=handlers.clean_field, accelerator="Ctrl+C")ˆà
    ˆà707menu_action.bind_all("<Control-c>", handlers.clean_field)ˆà
    ˆà708menu_action.add_command(label="Fill randomly", command=handlers.fill_randomly, accelerator="Ctrl+R")ˆà
    ˆà709menu_action.bind_all("<Control-r>", handlers.fill_randomly)ˆà
    696710menu_action.add_separator()ˆà
    697ˆàmenu_action.add_command(label="Change size",command=handlers.show_size_window)ˆà
    ˆà711menu_action.add_command(label="Change size",command=handlers.show_size_window, accelerator="Ctrl+D")ˆà
    ˆà712menu_action.bind_all("<Control-d>", handlers.show_size_window)ˆà
    698713menubar.add_cascade(label="Action", menu=menu_action)ˆà
    699714ˆà
Note: See TracChangeset for help on using the changeset viewer.