# class View | The View class encapsulates a single view into the document. More...
Contains pure virtuals
Full name | `KTextEditor::View`
Definition | `#include <ktexteditor.h>`
Inherits | KXMLGUIClient (kdeui) [public ], QWidget (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- View ( Document *doc, QWidget *parent, const char *name = 0 )
- virtual ~View ()
- virtual Document * document () const
- virtual void setCursorPosition ( int line, int col, bool mark = false )
- virtual void getCursorPosition ( int *line, int *col )
- virtual void insertText ( const QString &text, bool mark = false )
- virtual bool isOverwriteMode () const
- virtual void setInternalContextMenuEnabled ( bool b )
- virtual bool internalContextMenuEnabled () const

#### Public Slots

- virtual void setOverwriteMode ( bool b )

#### Signals

- void contextPopupMenu ( const QPoint &p )
- void scrollValueChanged ( int value )

## Detailed Description

The View class encapsulates a single view into the document.

View ( Document *doc, QWidget *parent, const char *name = 0 ) | ### View

Create a new view to the given document. The document must be non-null.

~View () | ### ~View

[virtual]

Document * document () | ### document

[const virtual]

Acessor to the parent Document.

void setCursorPosition ( int line, int col, bool mark = false ) | ### setCursorPosition

[pure virtual]

void getCursorPosition ( int *line, int *col ) | ### getCursorPosition

[pure virtual]

void insertText ( const QString &text, bool mark = false ) | ### insertText

[virtual]

Inserts text at the current cursor position into the document

bool isOverwriteMode () | ### isOverwriteMode

[const pure virtual]

Overwrite mode is where the char under the cursor is replaced with the char typed by the user

void setInternalContextMenuEnabled ( bool b ) | ### setInternalContextMenuEnabled

[virtual]

You should reimplement this method. If the internal popupmenu property is enabled, then the implementation is free to handle/use/implement/show a context popupmenu ( see also KContextMenuManager class in kdeui ). If disabled, then the implementation should emit the contextPopupMenu signal.

bool internalContextMenuEnabled () | ### internalContextMenuEnabled

[const virtual]

void setOverwriteMode ( bool b ) | ### setOverwriteMode

[pure virtual slot]

void contextPopupMenu ( const QPoint &p ) | ### contextPopupMenu

[signal]

Connect here when you want to implement a custom popup menu.

void scrollValueChanged ( int value ) | ### scrollValueChanged

[signal]

Connect here if you want to track the scrolling within the editor. This allows you to add specialised borders that displays extra data about particular lines such as breakpoints etc.

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