KTextEditor
Overview | Design | Coding Guidelines | Porting to KDE 4 | Using
The core of the KTextEditor interfaces consists of several main interfaces:
- KTextEditor::Factory
The Factory provides access to the editor object. - KTextEditor::Editor
The Editor interface allows you to create documents, get a document list, and a be informed when a new document is created. - KTextEditor::Document
The Document interface represents a single document and enables the creation of views, access to and manipulation of document contents, and access to document extension interfaces. - KTextEditor::View
The View provides a widget that displays the contents of a Document, and its interface allows for manipulation of text selection, position of the cursor and mouse, text selections, and behaviour of the view. Additionally it provides access to the view extension interfaces.
The hierarchy can be illustrated as follows:
Notes for KTextEditor Users
To use a KTextEditor implementation you first have to get the KTextEditor::Editor object. This can be done in several ways and is described in detail in the following documentation:
Notes for KTextEditor Developers
The KTextEditor::Factory provides access to its KTextEditor::Editor. The Editor has a list of all opened documents and can create new documents. A Document's content is visualized by a View. A Document can have any number of views (or none). When the contents of the document are changed, the change is reflected in all views.
The Factory should always return the same Editor object, as it does not make sense to load the same editor implementation several times. Further notes about the Editor implementation can be found in the Implementation Notes.
As applications can load different editor implementations via different factories (for example the kate-part and the yzis-part) the signal KTextEditor::Editor::documentCreated() contains the responsible Editor as first argument.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:52:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.