gobject.Object
|
+-- moo.Editor
after-save(doc)
This signal is emitted after the document has been successfully saved on disk.
|
the document which was saved on disk |
before-save(doc, file)
This signal is emitted when the document is going to be saved on disk. Callbacks must return SAVE_RESPONSE_CANCEL
if document should not be saved, and SAVE_RESPONSE_CONTINUE
otherwise. For example, if before saving the file must be checked out from a version control system, a callback can do that and return SAVE_RESPONSE_CANCEL
if checkout failed. Callbacks must not modify document content. If you need to modify it before saving, use will-save
signal instead.
|
the document which is about to be saved on disk |
|
the |
Returns:
SAVE_RESPONSE_CANCEL
to cancel saving, SAVE_RESPONSE_CONTINUE
otherwise.
will-close-doc(doc)
This signal is emitted before the document is closed.
|
the document which is about to be closed |
Returns:
moo.CloseResponse
will-close-window(window)
This signal is emitted before the window is closed.
|
the window which is about to be closed |
will-save(doc, file)
This signal is emitted when the document is going to be saved on disk, after before-save
signal. Callbacks may modify document content at this point.
|
the document which is about to be saved on disk |
|
the |
editor.create_doc(filename=None
, encoding=None
)
Create a document instance which can be embedded into arbitrary widget. This method may not be used in medit (use new_doc()
, new_file()
, open_file()
, open_files()
, open_uri()
, open_path()
instead).
|
|
|
|
Returns:
moo.Edit
editor.open_files(files, parent=None
)
|
list of |
|
|
Returns:
bool
editor.open_path(path, encoding=None
, line=-1, window=None
)
|
|
|
|
|
|
|
|
Returns:
moo.Edit
editor.open_uri(uri, encoding=None
, line=-1, window=None
)
|
|
|
|
|
|
|
|
Returns:
moo.Edit
editor.save_as(doc, info=None
)
Save document with new filename and/or encoding. If info
is missing or
then user is asked for new filename first.None
|
|
|
|
Returns:
bool