# namespace KTextEditor | This is the kparts interface classes for text editors. More...
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- class Document
- class View

## Detailed Description

This is the kparts interface classes for text editors. The text editors use the Document/View model that allows multiple views into one file (Document)

Line numbers passed via this interface must begin at line number zero (0).

TODO: See documentation at http://??????? for information on how to use kparts in general. A simple (but sufficient) implementation is shown below.

     QHBoxLayout *layout = new QHBoxLayout(this);
     QSplitter *fixme = new QSplitter(this);

     KTrader::OfferList offers = KTrader::self()->query( "KTextEditor/Document" );
     assert( offers.count() >= 1 );
     KService::Ptr service = *offers.begin();
     KLibFactory *factory = KLibLoader::self()->factory( service->library() );
     assert( factory );
     m_part = static_cast<KTextEditor::Document *>(
     						factory->create( this, 0, "KTextEditor::Document" ) );
     assert( m_part );
     m_part->createView( fixme, 0 );
     layout->addWidget(fixme);
     m_part->setText( "" );

You may also be able to use a dynamic_cast for the document part above (depending on compliation of the library used)

Document (class) | ### Document

View (class) | ### View

The View class encapsulates a single view into the document.

Generated by: root@i386.ports.openbsd.org on Wed Apr 25 13:59:18 2001, using kdoc 2.0a53.