class KWriteDoc
|
The text document. More... |
|
|
Public Methods
- KWriteDoc (HlManager *, const QString &path = QString::null)
- virtual ~ KWriteDoc ()
- void incRefCount ()
- void decRefCount ()
- void registerView (KWriteView *)
- void removeView (KWriteView *)
- bool ownedView (KWriteView *)
- bool isLastView (int numViews)
- int numLines () const
- int lastLine () const
- TextLine * textLine (int line)
- int textLength (int line)
- void setTabWidth (int)
- int tabWidth ()
- void setReadWrite (bool)
- bool isReadWrite ()
- void setModified (bool)
- bool isModified ()
- void setSingleSelectMode (bool ss)
- bool isSingleSelectMode ()
- void readConfig (KConfig *)
- void writeConfig (KConfig *)
- void readSessionConfig (KConfig *)
- void writeSessionConfig (KConfig *)
- Highlight * highlight ()
- int highlightNum ()
- int numAttribs ()
- Attribute * attribs ()
- QString text ()
- void setText (const QString &)
- QString getWord (KWCursor &cursor)
- bool hasMarkedText ()
- QString markedText (int flags)
- void delMarkedText (VConfig &)
- QColor * colors ()
- void setColors (QColor *colors)
- int fontHeight ()
- QList<TextLine> contents ()
- int eolMode ()
- void setEolMode (int mode)
- HlManager * hlManager ()
- int undoSteps ()
- int undoState ()
Protected Methods
- void findHighlight (const QString &filename)
- void setHighlight (int n)
- void makeAttribs ()
- void updateFontData ()
- void addLineAttribute (KWLineAttribute *a)
- int textWidth (TextLine *, int cursorX)
- int textWidth (KWCursor &cursor)
- int textWidth (bool wrapCursor, KWCursor &cursor, int xPos)
- int textPos (TextLine *, int xPos)
- int textWidth ()
- int textHeight ()
- void insert (VConfig &, const QString &)
- void insertFile (VConfig &, QIODevice &)
- void loadFile (QIODevice &)
- void writeFile (QIODevice &)
- int currentColumn (KWCursor &cursor)
- bool insertChars (VConfig &, const QString &chars)
- void newLine (VConfig &)
- void killLine (VConfig &)
- void backspace (VConfig &)
- void backspaceWord (VConfig &)
- void delChar (VConfig &)
- void delWord (VConfig &)
- void clear ()
- void cut (VConfig &)
- void copy (int flags)
- void paste (VConfig &)
- void toggleRect (int, int, int, int)
- void selectTo (VConfig &c, KWCursor &cursor, int cXPos)
- void selectAll ()
- void deselectAll ()
- void invertSelection ()
- void selectWord (KWCursor &cursor, int flags)
- void indent (VConfig &c)
- void unIndent (VConfig &c)
- void cleanIndent (VConfig &c)
- void doIndent (VConfig &, int change)
- void optimizeLeadingSpace (int line, int flags, int change)
- void tagLineRange (int line, int x1, int x2)
- void tagLines (int start, int end)
- void tagAll ()
- void updateLines (int startLine = 0, int endLine = 0xffffff, int flags = 0, int cursorY = -1)
- void updateMaxLength (TextLine *)
- void updateViews (KWriteView *exclude = 0L)
- QColor & cursorCol (int x, int y)
- void paintTextLine2 (QPainter *, int line, int xStart, int xEnd, bool showTabs)
- void paintTextLine (QPainter &, int line, int xStart, int xEnd, bool showTabs)
- void paintBorder (QPainter &, int line, int yStart, int yEnd)
- bool hasFileName ()
- const QString fileName ()
- void setFileName (const QString &)
- void clearFileName ()
- bool doSearch (SConfig &s, const QString &searchFor)
- void unmarkFound ()
- void markFound (KWCursor &cursor, int len)
- void tagLine (int line)
- void insLine (int line)
- void delLine (int line)
- void optimizeSelection ()
- void doAction (KWAction *)
- void doReplace (KWAction *)
- void doWordWrap (KWAction *)
- void doWordUnWrap (KWAction *)
- void doNewLine (KWAction *)
- void doDelLine (KWAction *)
- void doInsLine (KWAction *)
- void doKillLine (KWAction *)
- void newUndo ()
- void recordStart (VConfig &, int newUndoType)
- void recordStart (KWriteView *, KWCursor &, int flags, int newUndoType, bool keepModal = false, bool mergeUndo = false)
- void recordAction (KWAction::Action, KWCursor &)
- void recordInsert (VConfig &, const QString &text)
- void recordReplace (VConfig &, int len, const QString &text)
- void recordInsert (KWCursor &, const QString &text)
- void recordDelete (KWCursor &, int len)
- void recordReplace (KWCursor &, int len, const QString &text)
- void recordEnd (VConfig &)
- void recordEnd (KWriteView *, KWCursor &, int flags)
- void doActionGroup (KWActionGroup *, int flags)
- int nextUndoType ()
- int nextRedoType ()
- void undoTypeList (QValueList<int> &lst)
- void redoTypeList (QValueList<int> &lst)
- void undo (VConfig &, int count = 1)
- void redo (VConfig &, int count = 1)
- void clearRedo ()
- void setUndoSteps (int steps)
- void setPseudoModal (QWidget *)
- void newBracketMark (KWCursor &, BracketMark &)
Protected Slots
- void hlChanged ()
- void clipboardChanged ()
Protected Members
- int m_refCount
- QList<KWriteView> m_views
- QList<TextLine> m_contents
- KWLineAttributeList m_lineAttribs
- QColor [MAX_COLORS]m_colors
- HlManager *m_hlManager
- Highlight *m_highlight
- int m_numAttribs
- Attribute [MAX_ATTRIBS]m_attribs
- int m_eolMode
- int m_tabChars
- int m_tabWidth
- int m_fontHeight
- int m_fontAscent
- bool m_newDocGeometry
- TextLine *m_longestLine
- int m_maxLength
- KWCursor m_select
- KWCursor m_anchor
- int m_aXPos
- int m_selectStart
- int m_selectEnd
- bool m_oldMarkState
- bool m_readWrite
- bool m_modified
- bool m_singleSelectMode
- QString m_fName
- int m_foundLine
- QList<KWActionGroup> m_undoList
- int m_currentUndo
- int m_undoState
- int m_undoSteps
- int m_tagStart
- int m_tagEnd
- int m_undoCount
- QWidget *m_pseudoModal
Detailed Description
The text document. It contains the textlines, controls the
document changing operations and does undo/redo. WARNING: do not change
the text contents directly in methods where this is not explicitly
permitted. All changes have to be made with some basic operations,
which are recorded by the undo/redo system.
Increments the reference counter
Deletes itself if the reference counter becomes zero
Registers a view and increments the reference counter
Removes a view and decrements the reference counter. Deletes itself
if the reference counter becomes zero
Do we own the given view?
bool isLastView (int numViews)
|
Checks if the doc has the given number of views
[const]
gets the number of lines
[const]
gets the last line number(numLines() -1)
gets the given line
Returns: the TextLine object at the given line
int textLength (int line)
|
get the length in pixels of the given line
- Author: Jochen Wilhelmy
- Generated: root@porky.devel.redhat.com on Wed May 10 08:57:16 2000, using kdoc 2.0a35.