#include <KoTextView.h>
|
| enum | CursorAction {
MoveBackward
, MoveForward
, MoveWordBackward
, MoveWordForward
,
MoveUp
, MoveDown
, MoveLineStart
, MoveLineEnd
,
MoveHome
, MoveEnd
, MovePgUp
, MovePgDown
,
MoveParagUp
, MoveParagDown
, MoveViewportUp
, MoveViewportDown
} |
|
|
void | copy () |
|
void | cut () |
|
void | paste () |
|
| | KoTextView (KoTextObject *textobj) |
| void | setBackSpeller (KoBgSpellCheck *backSpeller) |
| virtual KoTextViewIface * | dcopObject () |
| void | terminate (bool removeselection=true) |
| KoTextObject * | textObject () const |
| KoTextCursor * | cursor () const |
| void | setCursor (const KoTextCursor &cursor) |
| KoTextDocument * | textDocument () const |
| bool | isReadWrite () const |
| void | setReadWrite (bool b) |
| virtual KoTextFormat * | currentFormat () const |
| void | setCurrentFormat (KoTextFormat *fmt) |
| virtual const KoParagLayout * | currentParagLayoutFormat () const |
| virtual bool | rtl () const |
| virtual KCommand * | setChangeCaseOfTextCommand (KoChangeCaseDia::TypeOfCase _type) |
| virtual KCommand * | setParagLayoutFormatCommand (KoParagLayout *newLayout, int flags, int marginIndex=-1) |
| virtual KCommand * | setFormatCommand (const KoTextFormat *newFormat, int flags, bool zoomFont=false) |
| KCommand * | setCounterCommand (const KoParagCounter &counter) |
| KCommand * | setAlignCommand (int align) |
|
KCommand * | setPageBreakingCommand (int pageBreaking) |
| KCommand * | setLineSpacingCommand (double spacing, KoParagLayout::SpacingType _type) |
| KCommand * | setBordersCommand (const KoBorder &leftBorder, const KoBorder &rightBorder, const KoBorder &bottomBorder, const KoBorder &topBorder) |
| KCommand * | setJoinBordersCommand (bool join) |
| KCommand * | setMarginCommand (TQStyleSheetItem::Margin m, double margin) |
| KCommand * | setTabListCommand (const KoTabulatorList &tabList) |
| KCommand * | setBackgroundColorCommand (const TQColor &color) |
| void | applyStyle (const KoParagStyle *style) |
| void | dragStarted () |
| void | focusInEvent () |
| void | focusOutEvent () |
| void | handleKeyPressEvent (TQKeyEvent *e, TQWidget *, const TQPoint &) |
| void | handleKeyReleaseEvent (TQKeyEvent *e) |
| void | handleImStartEvent (TQIMEvent *e) |
| void | handleImComposeEvent (TQIMEvent *e) |
| void | handleImEndEvent (TQIMEvent *e) |
| bool | handleMousePressEvent (TQMouseEvent *e, const TQPoint &iPoint, bool canStartDrag=true, bool insertDirectCursor=false) |
| void | handleMouseMoveEvent (TQMouseEvent *e, const TQPoint &iPoint) |
| void | handleMouseReleaseEvent () |
| void | handleMouseDoubleClickEvent (TQMouseEvent *e, const TQPoint &iPoint) |
| void | handleMouseTripleClickEvent (TQMouseEvent *e, const TQPoint &) |
| bool | maybeStartDrag (TQMouseEvent *e) |
| KoTextCursor | selectWordUnderCursor (const KoTextCursor &cursor, int selectionId=KoTextDocument::Standard) |
| KoTextCursor | selectParagUnderCursor (const KoTextCursor &cursor, int selectionId=KoTextDocument::Standard, bool copyAndNotify=true) |
| void | extendParagraphSelection (const TQPoint &iPoint) |
| TQString | wordUnderCursor (const KoTextCursor &cursor) |
| TQPtrList< TDEAction > | dataToolActionList (TDEInstance *instance, const TQString &word, bool &_singleWord) |
| void | insertSoftHyphen () |
| void | insertLineBreak () |
| void | insertNonbreakingSpace () |
| void | insertNonbreakingHyphen () |
| void | increaseNumberingLevel (const KoStyleCollection *styleCollection) |
| void | decreaseNumberingLevel (const KoStyleCollection *styleCollection) |
| void | insertSpecialChar (TQChar _c, const TQString &font) |
|
void | changeCaseOfText (KoChangeCaseDia::TypeOfCase _type) |
| void | addBookmarks (const TQString &) |
| KoVariable * | variable () |
| KoLinkVariable * | linkVariable () |
| KCommand * | prepareDropMove (KoTextCursor dropCursor) |
| void | removeComment () |
| void | copyTextOfComment () |
| KoParagStyle * | createStyleFromSelection (const TQString &name) |
| void | updateStyleFromSelection (KoParagStyle *style) |
| TQString | currentWordOrSelection () const |
| virtual void | removeToolTipCompletion () |
| bool | placeCursor (const TQPoint &pos, bool insertDirectCursor=false) |
| void | setOverwriteMode (bool overwriteMode) |
| void | moveCursor (CursorAction action, bool select) |
| bool | moveCursor (CursorAction action) |
| KoTextDocCommand * | deleteTextCommand (KoTextDocument *textdoc, int id, int index, const TQMemArray< KoTextStringChar > &str, const CustomItemsMap &customItemsMap, const TQValueList< KoParagLayout > &oldParagLayouts) |
|
void | setParagLayoutFormat (KoParagLayout *newLayout, int flags, int marginIndex=-1) |
|
void | setFormat (KoTextFormat *newFormat, int flags, bool zoomFont=false) |
| KCommand * | setBoldCommand (bool on) |
| KCommand * | setItalicCommand (bool on) |
| KCommand * | setUnderlineCommand (bool on) |
| KCommand * | setDoubleUnderlineCommand (bool on) |
| KCommand * | setUnderlineColorCommand (const TQColor &color) |
| KCommand * | setStrikeOutCommand (bool on) |
| KCommand * | setTextColorCommand (const TQColor &color) |
| KCommand * | setPointSizeCommand (int s) |
| KCommand * | setFamilyCommand (const TQString &font) |
| KCommand * | setTextSubScriptCommand (bool on) |
| KCommand * | setTextSuperScriptCommand (bool on) |
| KCommand * | setDefaultFormatCommand () |
| KCommand * | setTextBackgroundColorCommand (const TQColor &) |
| KCommand * | setAlignCommand (int align) |
| KCommand * | setMarginCommand (TQStyleSheetItem::Margin m, double margin) |
| KCommand * | setTabListCommand (const KoTabulatorList &tabList) |
|
KCommand * | setBackgroundColorCommand (const TQColor &color) |
| KCommand * | setCounterCommand (const KoParagCounter &counter) |
| KCommand * | setLanguageCommand (const TQString &) |
| KCommand * | setShadowTextCommand (double shadowDistanceX, double shadowDistanceY, const TQColor &shadowColor) |
| KCommand * | setHyphenationCommand (bool _b) |
| KCommand * | setFontAttributeCommand (KoTextFormat::AttributeStyle _att) |
| KCommand * | setRelativeTextSizeCommand (double _size) |
| KCommand * | setOffsetFromBaseLineCommand (int _offset) |
| KCommand * | setWordByWordCommand (bool _b) |
| TQColor | textColor () const |
| TQFont | textFont () const |
| TQString | textFontFamily () const |
| TQString | language () const |
| TQColor | textBackgroundColor () const |
| TQColor | textUnderlineColor () const |
| KoTextFormat::UnderlineType | underlineType () const |
| KoTextFormat::StrikeOutType | strikeOutType () const |
| KoTextFormat::UnderlineStyle | underlineStyle () const |
| KoTextFormat::StrikeOutStyle | strikeOutStyle () const |
| bool | textUnderline () const |
| bool | textDoubleUnderline () const |
| bool | textBold () const |
| bool | textStrikeOut () const |
| bool | textItalic () const |
| bool | textSubScript () const |
| bool | textSuperScript () const |
| double | shadowDistanceX () const |
| double | shadowDistanceY () const |
| TQColor | shadowColor () const |
| KoTextFormat::AttributeStyle | fontAttribute () const |
| double | relativeTextSize () const |
| int | offsetFromBaseLine () const |
| bool | wordByWord () const |
| bool | hyphenation () const |
|
| virtual void | doAutoFormat (KoTextCursor *, KoTextParag *, int, TQChar) |
| virtual bool | doCompletion (KoTextCursor *, KoTextParag *, int) |
| virtual bool | doToolTipCompletion (KoTextCursor *, KoTextParag *, int, int) |
| virtual void | showToolTipBox (KoTextParag *, int, TQWidget *, const TQPoint &) |
| virtual void | textIncreaseIndent () |
| virtual bool | textDecreaseIndent () |
| virtual bool | doIgnoreDoubleSpace (KoTextParag *, int, TQChar) |
| virtual void | showFormat (KoTextFormat *format)=0 |
| virtual void | drawCursor (bool b) |
| virtual bool | openLink (KoLinkVariable *linkVariable) |
| virtual bool | pgUpKeyPressed ()=0 |
| virtual bool | pgDownKeyPressed ()=0 |
| virtual void | ctrlPgUpKeyPressed () |
| virtual void | ctrlPgDownKeyPressed () |
| void | deleteWordLeft () |
| void | deleteWordRight () |
| bool | insertParagraph (const TQPoint &pos) |
Object that is created to edit a KoTextObject.
It handles all the events for it (mouse, keyboard). There can be several KoTextView instances for the same KoTextObject.
Definition at line 53 of file KoTextView.h.
◆ CursorAction
| enum KoTextView::CursorAction |
◆ KoTextView()
◆ ~KoTextView()
| KoTextView::~KoTextView |
( |
| ) |
|
|
virtual |
◆ addBookmarks()
| void KoTextView::addBookmarks |
( |
const TQString & | url | ) |
|
◆ applyStyle()
◆ completion
| void KoTextView::completion |
( |
| ) |
|
|
slot |
◆ copyLink
| void KoTextView::copyLink |
( |
| ) |
|
|
slot |
◆ copyTextOfComment()
| void KoTextView::copyTextOfComment |
( |
| ) |
|
◆ createStyleFromSelection()
| KoParagStyle * KoTextView::createStyleFromSelection |
( |
const TQString & | name | ) |
|
◆ ctrlPgDownKeyPressed()
| virtual void KoTextView::ctrlPgDownKeyPressed |
( |
| ) |
|
|
inlineprotectedvirtual |
Reimplement this to handle CTRL+PageDown.
Default implementation calls pgDownKeyPressed
Definition at line 247 of file KoTextView.h.
◆ ctrlPgUpKeyPressed()
| virtual void KoTextView::ctrlPgUpKeyPressed |
( |
| ) |
|
|
inlineprotectedvirtual |
Reimplement this to handle CTRL+PageUp.
Default implementation calls pgUpKeyPressed
Definition at line 245 of file KoTextView.h.
◆ currentFormat()
◆ currentParagLayoutFormat()
| const KoParagLayout * KoTextView::currentParagLayoutFormat |
( |
| ) |
const |
|
virtual |
◆ currentWordOrSelection()
| TQString KoTextView::currentWordOrSelection |
( |
| ) |
const |
◆ cursor()
| KoTextCursor * KoTextView::cursor |
( |
| ) |
const |
|
inline |
◆ dataToolActionList()
| TQPtrList< TDEAction > KoTextView::dataToolActionList |
( |
TDEInstance * | instance, |
|
|
const TQString & | word, |
|
|
bool & | _singleWord ) |
Return the list of actions from data-tools.
Used to populate a RMB popupmenu usually.
Definition at line 1090 of file KoTextView.cpp.
◆ dcopObject()
| KoTextViewIface * KoTextView::dcopObject |
( |
| ) |
|
|
virtual |
◆ decreaseNumberingLevel()
◆ deleteWordLeft()
| void KoTextView::deleteWordLeft |
( |
| ) |
|
|
protected |
◆ deleteWordRight()
| void KoTextView::deleteWordRight |
( |
| ) |
|
|
protected |
◆ doAutoFormat()
| virtual void KoTextView::doAutoFormat |
( |
KoTextCursor * | , |
|
|
KoTextParag * | , |
|
|
int | , |
|
|
TQChar | ) |
|
inlineprotectedvirtual |
Called when a character (ch) has been inserted into parag, at the given index.
This is a virtual method rather than a signal for performance reasons.
Definition at line 212 of file KoTextView.h.
◆ doCompletion()
| virtual bool KoTextView::doCompletion |
( |
KoTextCursor * | , |
|
|
KoTextParag * | , |
|
|
int | ) |
|
inlineprotectedvirtual |
◆ doIgnoreDoubleSpace()
| virtual bool KoTextView::doIgnoreDoubleSpace |
( |
KoTextParag * | , |
|
|
int | , |
|
|
TQChar | ) |
|
inlineprotectedvirtual |
◆ doToolTipCompletion()
| virtual bool KoTextView::doToolTipCompletion |
( |
KoTextCursor * | , |
|
|
KoTextParag * | , |
|
|
int | , |
|
|
int | ) |
|
inlineprotectedvirtual |
◆ dragStarted()
| void KoTextView::dragStarted |
( |
| ) |
|
◆ drawCursor()
| void KoTextView::drawCursor |
( |
bool | b | ) |
|
|
protectedvirtual |
Draws the cursor (or hides it if b is false).
The default implementation only changes an internal flag, make sure to reimplement and to call the parent implementation (in all cases)
Definition at line 950 of file KoTextView.cpp.
◆ extendParagraphSelection()
| void KoTextView::extendParagraphSelection |
( |
const TQPoint & | iPoint | ) |
|
◆ focusInEvent()
| void KoTextView::focusInEvent |
( |
| ) |
|
◆ focusOutEvent()
| void KoTextView::focusOutEvent |
( |
| ) |
|
◆ handleImComposeEvent()
| void KoTextView::handleImComposeEvent |
( |
TQIMEvent * | e | ) |
|
◆ handleImEndEvent()
| void KoTextView::handleImEndEvent |
( |
TQIMEvent * | e | ) |
|
◆ handleImStartEvent()
| void KoTextView::handleImStartEvent |
( |
TQIMEvent * | e | ) |
|
◆ handleKeyPressEvent()
| void KoTextView::handleKeyPressEvent |
( |
TQKeyEvent * | e, |
|
|
TQWidget * | widget, |
|
|
const TQPoint & | pos ) |
◆ handleKeyReleaseEvent()
| void KoTextView::handleKeyReleaseEvent |
( |
TQKeyEvent * | e | ) |
|
◆ handleMouseDoubleClickEvent()
| void KoTextView::handleMouseDoubleClickEvent |
( |
TQMouseEvent * | e, |
|
|
const TQPoint & | iPoint ) |
◆ handleMouseMoveEvent()
| void KoTextView::handleMouseMoveEvent |
( |
TQMouseEvent * | e, |
|
|
const TQPoint & | iPoint ) |
◆ handleMousePressEvent()
| bool KoTextView::handleMousePressEvent |
( |
TQMouseEvent * | e, |
|
|
const TQPoint & | iPoint, |
|
|
bool | canStartDrag = true, |
|
|
bool | insertDirectCursor = false ) |
◆ handleMouseReleaseEvent()
| void KoTextView::handleMouseReleaseEvent |
( |
| ) |
|
◆ handleMouseTripleClickEvent()
| void KoTextView::handleMouseTripleClickEvent |
( |
TQMouseEvent * | e, |
|
|
const TQPoint & | ) |
◆ hideCursor
| void KoTextView::hideCursor |
( |
| ) |
|
|
inlineslot |
◆ increaseNumberingLevel()
◆ insertLineBreak()
| void KoTextView::insertLineBreak |
( |
| ) |
|
◆ insertNonbreakingHyphen()
| void KoTextView::insertNonbreakingHyphen |
( |
| ) |
|
◆ insertNonbreakingSpace()
| void KoTextView::insertNonbreakingSpace |
( |
| ) |
|
◆ insertParagraph()
| bool KoTextView::insertParagraph |
( |
const TQPoint & | pos | ) |
|
|
protected |
◆ insertSoftHyphen()
| void KoTextView::insertSoftHyphen |
( |
| ) |
|
◆ insertSpecialChar()
| void KoTextView::insertSpecialChar |
( |
TQChar | _c, |
|
|
const TQString & | font ) |
◆ insertText
| void KoTextView::insertText |
( |
const TQString & | text | ) |
|
|
slot |
This is a slot so that it's accessible from DCOP.
Definition at line 412 of file KoTextView.cpp.
◆ isReadWrite()
| bool KoTextView::isReadWrite |
( |
| ) |
const |
|
inline |
Return true if the view is allowed to modify the text object.
This is the case by default
Definition at line 80 of file KoTextView.h.
◆ linkVariable()
| KoLinkVariable * KoTextView::linkVariable |
( |
| ) |
|
◆ maybeStartDrag()
| bool KoTextView::maybeStartDrag |
( |
TQMouseEvent * | e | ) |
|
◆ moveCursor() [1/2]
| bool KoTextView::moveCursor |
( |
CursorAction | action | ) |
|
◆ moveCursor() [2/2]
| void KoTextView::moveCursor |
( |
CursorAction | action, |
|
|
bool | select ) |
◆ newParagraph
| void KoTextView::newParagraph |
( |
| ) |
|
|
slot |
◆ openLink()
| bool KoTextView::openLink |
( |
KoLinkVariable * | linkVariable | ) |
|
|
protectedvirtual |
◆ pgDownKeyPressed()
| virtual bool KoTextView::pgDownKeyPressed |
( |
| ) |
|
|
protectedpure virtual |
Reimplement this to handle PageDown.
Example implementation: textView->cursor()->gotoPageDown( scrollview->visibleHeight() );
◆ pgUpKeyPressed()
| virtual bool KoTextView::pgUpKeyPressed |
( |
| ) |
|
|
protectedpure virtual |
Reimplement this to handle PageUp.
Example implementation: textView->cursor()->gotoPageUp( scrollview->visibleHeight() );
◆ placeCursor()
| bool KoTextView::placeCursor |
( |
const TQPoint & | pos, |
|
|
bool | insertDirectCursor = false ) |
◆ prepareDropMove()
| KCommand * KoTextView::prepareDropMove |
( |
KoTextCursor | dropCursor | ) |
|
A "drop move" will move the selected text to the given cursor position.
This method only takes care of "removing the selected text" if the drop cursor isn't in the selected text (and !protectContent).
Definition at line 1374 of file KoTextView.cpp.
◆ removeComment()
| void KoTextView::removeComment |
( |
| ) |
|
◆ removeLink
| void KoTextView::removeLink |
( |
| ) |
|
|
slot |
◆ removeToolTipCompletion()
| virtual void KoTextView::removeToolTipCompletion |
( |
| ) |
|
|
inlinevirtual |
◆ rtl()
| bool KoTextView::rtl |
( |
| ) |
const |
|
virtual |
◆ selectParagUnderCursor()
| KoTextCursor KoTextView::selectParagUnderCursor |
( |
const KoTextCursor & | cursor, |
|
|
int | selectionId = KoTextDocument::Standard, |
|
|
bool | copyAndNotify = true ) |
◆ selectWordUnderCursor()
| KoTextCursor KoTextView::selectWordUnderCursor |
( |
const KoTextCursor & | cursor, |
|
|
int | selectionId = KoTextDocument::Standard ) |
◆ setAlignCommand()
| KCommand * KoTextView::setAlignCommand |
( |
int | align | ) |
|
◆ setBackgroundColorCommand()
| KCommand * KoTextView::setBackgroundColorCommand |
( |
const TQColor & | color | ) |
|
◆ setBackSpeller()
| void KoTextView::setBackSpeller |
( |
KoBgSpellCheck * | backSpeller | ) |
|
◆ setBordersCommand()
◆ setChangeCaseOfTextCommand()
| KCommand * KoTextView::setChangeCaseOfTextCommand |
( |
KoChangeCaseDia::TypeOfCase | _type | ) |
|
|
virtual |
◆ setCounterCommand()
◆ setCurrentFormat()
◆ setCursor() [1/2]
| void KoTextView::setCursor |
( |
const KoTextCursor & | cursor | ) |
|
|
inline |
◆ setCursor [2/2]
| void KoTextView::setCursor |
( |
KoTextCursor * | _cursor | ) |
|
|
inlineslot |
◆ setFormatCommand()
| KCommand * KoTextView::setFormatCommand |
( |
const KoTextFormat * | newFormat, |
|
|
int | flags, |
|
|
bool | zoomFont = false ) |
|
virtual |
◆ setJoinBordersCommand()
| KCommand * KoTextView::setJoinBordersCommand |
( |
bool | join | ) |
|
◆ setLineSpacingCommand()
◆ setMarginCommand()
| KCommand * KoTextView::setMarginCommand |
( |
TQStyleSheetItem::Margin | m, |
|
|
double | margin ) |
◆ setOverwriteMode()
| void KoTextView::setOverwriteMode |
( |
bool | overwriteMode | ) |
|
◆ setParagLayoutFormatCommand()
| KCommand * KoTextView::setParagLayoutFormatCommand |
( |
KoParagLayout * | newLayout, |
|
|
int | flags, |
|
|
int | marginIndex = -1 ) |
|
virtual |
Interface for changing the paragraph layout.
- Parameters
-
| newLayout | pointer to the new layout to apply |
| flags | one of the KoParagLayout flags |
| marginIndex | type of margin. Only used if flags==KoParagLayout::Margins |
Implements KoTextFormatInterface.
Definition at line 1274 of file KoTextView.cpp.
◆ setReadWrite()
| void KoTextView::setReadWrite |
( |
bool | b | ) |
|
|
inline |
Call setReadWrite(false) to make the text view readonly.
Definition at line 82 of file KoTextView.h.
◆ setTabListCommand()
| KCommand * KoTextView::setTabListCommand |
( |
const KoTabulatorList & | tabList | ) |
|
◆ showCurrentFormat
| void KoTextView::showCurrentFormat |
( |
| ) |
|
|
slot |
◆ showCursor
| void KoTextView::showCursor |
( |
| ) |
|
|
inlineslot |
◆ showFormat()
| virtual void KoTextView::showFormat |
( |
KoTextFormat * | format | ) |
|
|
protectedpure virtual |
Show the settings of this format in the GUI.
Needs to be implemented in the application.
◆ showToolTipBox()
| virtual void KoTextView::showToolTipBox |
( |
KoTextParag * | , |
|
|
int | , |
|
|
TQWidget * | , |
|
|
const TQPoint & | ) |
|
inlineprotectedvirtual |
◆ slotToolActivated
| void KoTextView::slotToolActivated |
( |
const KDataToolInfo & | info, |
|
|
const TQString & | command ) |
|
protectedslot |
◆ startDrag
| virtual void KoTextView::startDrag |
( |
| ) |
|
|
protectedpure virtualslot |
◆ terminate()
| void KoTextView::terminate |
( |
bool | removeselection = true | ) |
|
Call this before deleting.
don't remove selection when we made dnd between different frame
Definition at line 123 of file KoTextView.cpp.
◆ textDecreaseIndent()
| virtual bool KoTextView::textDecreaseIndent |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ textDocument()
| KoTextDocument * KoTextView::textDocument |
( |
| ) |
const |
◆ textIncreaseIndent()
| virtual void KoTextView::textIncreaseIndent |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ textObject()
◆ updateStyleFromSelection()
| void KoTextView::updateStyleFromSelection |
( |
KoParagStyle * | style | ) |
|
◆ updateUI
| void KoTextView::updateUI |
( |
bool | updateFormat, |
|
|
bool | force = false ) |
|
virtualslot |
Show the current settings (those for the paragraph and character under the cursor), in the GUI.
The default implementation handles m_currentFormat and calls showCurrentFormat(). If you reimplement, make sure to call KoTextView::updateUI(updateFormat,force);
Definition at line 994 of file KoTextView.cpp.
◆ variable()
◆ wordUnderCursor()
| TQString KoTextView::wordUnderCursor |
( |
const KoTextCursor & | cursor | ) |
|
◆ dcop
| KoTextViewIface* KoTextView::dcop |
|
protected |
The documentation for this class was generated from the following files:
|