| Class | FileMenu |
| In: |
lib/json/editor.rb
|
| Parent: | Object |
This class creates the File pulldown menu.
Create the menu.
# File lib/json/editor.rb, line 527
527: def create
528: title = MenuItem.new('File')
529: title.submenu = menu
530: add_item('New', &method(:new))
531: add_item('Open', ?o, &method(:open))
532: add_item('Open location', ?l, &method(:open_location))
533: add_item('Revert', &method(:revert))
534: add_separator
535: add_item('Save', ?s, &method(:save))
536: add_item('Save As', ?S, &method(:save_as))
537: add_separator
538: add_item('Quit', ?q, &method(:quit))
539: title
540: end