Class MainWindow
In: lib/json/editor.rb
Parent: Gtk::Window

The editor main window

Methods

Included Modules

Gtk

Public Class methods

Public Instance methods

Ask for location URI a to load data from. Returns the URI as a string.

Opens a dialog, asking, if changes should be saved to a file.

Sets editor status to changed, to indicate that the edited data containts unsaved changes.

Clear the current model, after asking to save all unsaved changes.

Creates the menu bar with the pulldown menus and returns it.

Displays text in the status bar.

Display the new title according to the editor‘s current state.

Edit the string json in the editor.

Open the file filename or call the select_file method to ask for a filename.

Save the current file.

Save the current file as the filename

Load the file named filename into the editor as a JSON document.

Load the data at location uri into the editor as a JSON document.

Open the data at the location uri, if given. Otherwise open a dialog to ask for the uri.

Quit this editor, that is, leave this editor‘s main loop.

Read a JSON document from the file named filename, parse it into a ruby data structure, and return the data.

Open a file selecton dialog, displaying message, and return the selected filename or nil, if no file was selected.

Store the current JSON document to path.

Sets editor status to unchanged, to indicate that the edited data doesn‘t containt unsaved changes.

Puts a new model model into the Gtk::TreeView to be edited.

[Validate]