.. include:: headings.inc .. currentmodule:: py.editor .. highlight:: python .. _py.editor.EditorFrame: ========================================================================================================================================== |phoenix_title| **EditorFrame** ========================================================================================================================================== Frame containing one editor. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **EditorFrame** .. raw:: html

Inheritance diagram of EditorFrame

| |sub_classes| Known Subclasses ============================== :class:`py.editor.EditorNotebookFrame` | |super_classes| Known Superclasses ================================== :class:`py.frame.Frame` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~py.editor.EditorFrame.__init__` Create EditorFrame instance. :meth:`~py.editor.EditorFrame.bufferClose` Close buffer. :meth:`~py.editor.EditorFrame.bufferCreate` Create new buffer. :meth:`~py.editor.EditorFrame.bufferDestroy` Destroy the current buffer. :meth:`~py.editor.EditorFrame.bufferHasChanged` Return ``True`` if buffer has changed since last save. :meth:`~py.editor.EditorFrame.bufferNew` Create new buffer. :meth:`~py.editor.EditorFrame.bufferOpen` Open file in buffer. :meth:`~py.editor.EditorFrame.bufferSave` Save buffer to its file. :meth:`~py.editor.EditorFrame.bufferSaveAs` Save buffer to a new filename. :meth:`~py.editor.EditorFrame.bufferSuggestSave` Suggest saving changes. Return ``True`` if user selected Cancel. :meth:`~py.editor.EditorFrame.hasBuffer` Return ``True`` if there is a current buffer. :meth:`~py.editor.EditorFrame.OnAbout` Display an About window. :meth:`~py.editor.EditorFrame.OnClose` Event handler for closing. :meth:`~py.editor.EditorFrame.OnIdle` Event handler for idle time. :meth:`~py.editor.EditorFrame.setEditor` :meth:`~py.editor.EditorFrame.updateNamespace` Update the buffer namespace for autocompletion and calltips. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: EditorFrame(frame.Frame) Frame containing one editor. .. method:: __init__(self, parent=None, id=-1, title='PyAlaCarte', pos=DefaultPosition, size=(800, 600), style=DEFAULT_FRAME_STYLE | NO_FULL_REPAINT_ON_RESIZE, filename=None) Create EditorFrame instance. .. method:: bufferClose(self) Close buffer. .. method:: bufferCreate(self, filename=None) Create new buffer. .. method:: bufferDestroy(self) Destroy the current buffer. .. method:: bufferHasChanged(self) Return ``True`` if buffer has changed since last save. .. method:: bufferNew(self) Create new buffer. .. method:: bufferOpen(self) Open file in buffer. .. method:: bufferSave(self) Save buffer to its file. .. method:: bufferSaveAs(self) Save buffer to a new filename. .. method:: bufferSuggestSave(self) Suggest saving changes. Return ``True`` if user selected Cancel. .. method:: hasBuffer(self) Return ``True`` if there is a current buffer. .. method:: OnAbout(self, event) Display an About window. .. method:: OnClose(self, event) Event handler for closing. .. method:: OnIdle(self, event) Event handler for idle time. .. method:: setEditor(self, editor) .. method:: updateNamespace(self) Update the buffer namespace for autocompletion and calltips.