KTextEditor
view.h
Go to the documentation of this file.
420 void verticalScrollPositionChanged (KTextEditor::View *view, const KTextEditor::Cursor& newPos);
655Q_DECLARE_INTERFACE(KTextEditor::CoordinatesToCursorInterface, "org.kde.KTextEditor.CoordinatesToCursorInterface")
Pixel coordinate to Cursor extension interface for the View.
Definition view.h:634
virtual KTextEditor::Cursor coordinatesToCursor(const QPoint &coord) const =0
Get the text-cursor in the document from the screen coordinates, relative to the view widget.
An object representing a section of text, from one Cursor to another.
Definition range.h:55
void horizontalScrollPositionChanged(KTextEditor::View *view)
This signal should be emitted whenever the view is scrolled horizontally.
virtual bool setCursorPosition(Cursor position)=0
Set the view's new cursor to position.
virtual enum EditMode viewEditMode() const =0
Get the view's current edit mode.
virtual bool setMouseTrackingEnabled(bool enable)=0
Try to enable or disable mouse tracking according to enable.
virtual Document * document() const =0
Get the view's document, that means the view is a view of the returned document.
virtual bool removeSelectionText()=0
Remove the view's current selection including the selected text.
virtual bool blockSelection() const =0
Get the status of the selection mode.
void textInserted(KTextEditor::View *view, const KTextEditor::Cursor &position, const QString &text)
This signal is emitted from view whenever the users inserts text at position, that means the user typ...
virtual QPoint cursorPositionCoordinates() const =0
Get the screen coordinates (x/y) of the cursor position in pixels.
virtual QPoint cursorToCoordinate(const KTextEditor::Cursor &cursor) const =0
Get the screen coordinates (x, y) of the supplied cursor relative to the view widget in pixels.
void focusOut(KTextEditor::View *view)
This signal is emitted whenever the view loses the focus.
virtual Cursor cursorPosition() const =0
Get the view's current cursor position.
void informationMessage(KTextEditor::View *view, const QString &message)
This signal is emitted whenever the view wants to display a information message.
void focusIn(KTextEditor::View *view)
This signal is emitted whenever the view gets the focus.
void verticalScrollPositionChanged(KTextEditor::View *view, const KTextEditor::Cursor &newPos)
This signal should be emitted whenever the view is scrolled vertically.
virtual QMenu * contextMenu() const =0
Get the context menu for this view.
virtual const Range & selectionRange() const =0
Get the range occupied by the current selection.
virtual bool insertText(const QString &text)
This is a convenience function which inserts text at the view's current cursor position.
Definition ktexteditor.cpp:139
virtual bool mouseTrackingEnabled() const =0
Check, whether mouse tracking is enabled.
virtual void setContextMenu(QMenu *menu)=0
Set a context menu for this view to menu.
virtual bool selection() const =0
Query the view whether it has selected text, i.e.
virtual Cursor cursorPositionVirtual() const =0
Get the current virtual cursor position, virtual means the tabulator character (TAB) counts multiple ...
void viewModeChanged(KTextEditor::View *view)
This signal is emitted whenever the view mode of view changes.
virtual bool setSelection(const Range &range)=0
Set the view's selection to the range selection.
void selectionChanged(KTextEditor::View *view)
This signal is emitted whenever the view's selection changes.
void mousePositionChanged(KTextEditor::View *view, const KTextEditor::Cursor &newPosition)
This signal is emitted whenever the position of the mouse changes over this view.
virtual bool setBlockSelection(bool on)=0
Set block selection mode to state on.
void viewEditModeChanged(KTextEditor::View *view, enum KTextEditor::View::EditMode mode)
This signal is emitted whenever the view's edit mode changed from either EditInsert to EditOverwrite ...
bool isActiveView() const
Check whether this view is the document's active view.
Definition ktexteditor.cpp:116
void contextMenuAboutToShow(KTextEditor::View *view, QMenu *menu)
Signal which is emitted immediately prior to showing the current context menu.
virtual bool removeSelection()=0
Remove the view's current selection, without deleting the selected text.
virtual QString selectionText() const =0
Get the view's selected text.
virtual QMenu * defaultContextMenu(QMenu *menu=0L) const =0
Populate menu with default text editor actions.
void cursorPositionChanged(KTextEditor::View *view, const KTextEditor::Cursor &newPosition)
This signal is emitted whenever the view's cursor position changed.
KXMLGUIClient()
static qreal wrap(qreal a, qreal d=1.0)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.