KoTextObject.h
65 virtual KCommand *setFormatCommand( const KoTextFormat *format, int flags, bool zoomFont = false ) = 0;
75 virtual KCommand *setParagLayoutFormatCommand( KoParagLayout *newLayout, int flags, int marginIndex=-1) = 0;
79 KoTextDocCommand *deleteTextCommand( KoTextDocument *textdoc, int id, int index, const TQMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const TQValueList<KoParagLayout> & oldParagLayouts );
129 KCommand *setShadowTextCommand( double shadowDistanceX, double shadowDistanceY, const TQColor& shadowColor );
199 KoTextObject( KoTextZoomHandler *zh, const TQFont& defaultFont, const TQString &defaultLanguage,
243 TQString selectedText( KoTextDocument::SelectionId selectionId = KoTextDocument::Standard ) const {
247 bool selectionHasCustomItems( KoTextDocument::SelectionId selectionId = KoTextDocument::Standard ) const;
281 void removeSelectedText( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId = KoTextDocument::Standard,
289 KCommand * removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool repaint = true );
319 KCommand *setFormatCommand( KoTextCursor * cursor, KoTextFormat ** currentFormat, const KoTextFormat *format, int flags, bool zoomFont = false, KoTextDocument::SelectionId selectionId = KoTextDocument::Standard );
329 void doKeyboardAction( KoTextCursor * cursor, KoTextFormat * & currentFormat, KeyboardAction action );
332 KCommand * setCounterCommand( KoTextCursor * cursor, const KoParagCounter & counter, KoTextDocument::SelectionId selectionId = KoTextDocument::Standard );
333 KCommand * setAlignCommand( KoTextCursor * cursor, int align , KoTextDocument::SelectionId selectionId = KoTextDocument::Standard);
334 KCommand * setLineSpacingCommand( KoTextCursor * cursor, double spacing, KoParagLayout::SpacingType _type,KoTextDocument::SelectionId selectionId = KoTextDocument::Standard );
335 KCommand * setBordersCommand( KoTextCursor * cursor, const KoBorder& leftBorder, const KoBorder& rightBorder, const KoBorder& topBorder, const KoBorder& bottomBorder, KoTextDocument::SelectionId selectionId = KoTextDocument::Standard );
336 KCommand * setJoinBordersCommand( KoTextCursor * cursor, bool join, KoTextDocument::SelectionId selectionId = KoTextDocument::Standard );
337 KCommand * setMarginCommand( KoTextCursor * cursor, TQStyleSheetItem::Margin m, double margin, KoTextDocument::SelectionId selectionId = KoTextDocument::Standard);
338 KCommand* setTabListCommand( KoTextCursor * cursor,const KoTabulatorList & tabList , KoTextDocument::SelectionId selectionId = KoTextDocument::Standard );
339 KCommand* setBackgroundColorCommand( KoTextCursor * cursor,const TQColor & color , KoTextDocument::SelectionId selectionId = KoTextDocument::Standard );
341 KCommand * setParagDirectionCommand( KoTextCursor * cursor, TQChar::Direction d, KoTextDocument::SelectionId selectionId = KoTextDocument::Standard );
376 void setFormat( KoTextCursor * cursor, KoTextFormat ** currentFormat, KoTextFormat *format, int flags, bool zoomFont = false );
396 virtual KCommand *setParagLayoutFormatCommand( KoParagLayout *newLayout, int flags, int marginIndex=-1);
424 void emitUpdateUI( bool updateFormat, bool force = false ) { emit updateUI( updateFormat, force ); }
445 KCommand *changeCaseOfTextParag(int cursorPosStart, int cursorPosEnd,KoChangeCaseDia::TypeOfCase _type,KoTextCursor *cursor, KoTextParag *parag);
447 void loadOasisContent( const TQDomElement &bodyElem, KoOasisContext& context, KoStyleCollection * styleColl );
450 // Similar to KoTextDocument::loadOasisText but there's no newline inserted before the first paragraph
460 bool statistics( TQProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words, ulong & sentences, ulong & syllables, ulong & lines, bool selected );
539 void storeParagUndoRedoInfo( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId = KoTextDocument::Standard );
541 void copyCharFormatting( KoTextParag *parag, int position, int index /*in text*/, bool moveCustomItems );
542 void readFormats( KoTextCursor &c1, KoTextCursor &c2, bool copyParagLayouts = false, bool moveCustomItems = false );
A CustomItemsMap associates a custom item to an index Used in the undo/redo info for insert/delete te...
Definition KoTextDocument.h:609
This class represents a border - for anything, like paragraph, or frame.
Definition KoBorder.h:34
Used during loading of Oasis format (and discarded at the end of the loading).
Definition KoOasisContext.h:46
This is the structure associated with a paragraph (KoTextParag), to define the bullet or numbering of...
Definition KoParagCounter.h:37
This class holds the paragraph-specific formatting information It's separated from KoTextParag so tha...
Definition KoParagLayout.h:40
SpacingType
Line spacing values Assuming h is the height of the biggest char in the line, and v is the linespacin...
Definition KoParagLayout.h:86
A paragraph style is a combination of a character style and paragraph-layout attributes,...
Definition KoParagStyle.h:55
Used during saving to Oasis format (and discarded at the end of the saving).
Definition KoOasisContext.h:112
TODO rename to KoParagStyleCollection - or should char styles be part of it too?
Definition KoStyleCollection.h:48
The KoTextFormatInterface is a pure interface that allows access to the "current text format".
Definition KoTextObject.h:49
virtual KCommand * setFormatCommand(const KoTextFormat *format, int flags, bool zoomFont=false)=0
Interface for setting the modified format.
virtual const KoParagLayout * currentParagLayoutFormat() const =0
Interface for accessing the current parag layout.
virtual KoTextFormat * currentFormat() const =0
Interface for accessing the current format.
virtual KCommand * setParagLayoutFormatCommand(KoParagLayout *newLayout, int flags, int marginIndex=-1)=0
Interface for changing the paragraph layout.
Each character (KoTextStringChar) points to a KoTextFormat that defines the formatting of that charac...
Definition KoTextFormat.h:53
The KoTextObject is the high-level object that contains a KoTextDocument (the list of paragraphs),...
Definition KoTextObject.h:182
void repaintChanged(KoTextObject *)
Tell the world that we'd like some repainting to happen.
void selectionChanged(bool hasSelection)
Tell the views that the selection changed (for cut/copy...)
void showCurrentFormat()
Same thing, when the current format (of the edit object) was changed.
void availableHeightNeeded()
Emitted by availableHeight() when the available height hasn't been calculated yet or is invalid.
void formattingFirstParag()
Emitted by formatMore() when formatting the first paragraph.
void setCursor(KoTextCursor *cursor)
Special hack for undo/redo - used by KoTextView.
void afterFormatting(int bottom, KoTextParag *m_lastFormatted, bool *abort)
Emitted by formatMore() after formatting a bunch of paragraphs.
void chapterParagraphFormatted(KoTextParag *parag)
Emitted by formatMore() when formatting a "Head 1" paragraph.
TQString selectedText(KoTextDocument::SelectionId selectionId=KoTextDocument::Standard) const
returns the selected text [without formatting] if hasSelection()
Definition KoTextObject.h:243
KoTextDocument * textDocument() const
Return the text document contained in this KoTextObject.
Definition KoTextObject.h:230
void ensureCursorVisible()
The views should make sure the cursor is visible.
void updateUI(bool updateFormat, bool force=false)
Emitted when the formatting under the cursor may have changed.
void newCommand(KCommand *cmd)
Emitted when a new command has been created and should be added to the main list of commands (usually...
This class extends KoZoomHandler to add support for WYSIWYG text layouting.
Definition KoTextZoomHandler.h:29
A class for writing out XML (to any TQIODevice), with a special attention on performance.
Definition KoXmlWriter.h:37
TDEAction * undo(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)
TDEAction * redo(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)
The undo-redo structure holds the temporary information for the current undo/redo command.
Definition KoTextObject.h:553
