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 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
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
void newPlaceHolderCommand(const TQString &name)
Creates a place holder for a command that will be completed later on.
Definition KoTextObject.cpp:393
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.
@ OverwriteMode
< if true, the text to be inserted is checked for '\n' (as a paragraph delimiter)
Definition KoTextObject.h:252
@ DoNotRepaint
usually we repaint in insert(), this allows to turn it off
Definition KoTextObject.h:254
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
KoTextObject(KoTextZoomHandler *zh, const TQFont &defaultFont, const TQString &defaultLanguage, bool defaultHyphenation, KoParagStyle *defaultStyle, int tabStopWidth=-1, TQObject *parent=0, const char *name=0)
Constructor.
Definition KoTextObject.cpp:60
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.
static TQCString providesOasis(TQMimeSource *mime)
Check if the mimesource mime provides one of the OASIS mimetypes, and if so, return it.
Definition KoTextObject.cpp:2430
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
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
