16 #ifndef _QDOCUMENT_CURSOR_P_H_
17 #define _QDOCUMENT_CURSOR_P_H_
30 #if QT_VERSION < 0x040400
64 bool atBlockEnd()
const;
65 bool atBlockStart()
const;
67 bool atLineEnd()
const;
68 bool atLineStart()
const;
70 bool hasSelection()
const;
76 void setAutoUpdated(
bool y);
81 int lineNumber()
const;
82 int columnNumber()
const;
84 int anchorLineNumber()
const;
85 int anchorColumnNumber()
const;
87 int visualColumnNumber()
const;
89 void setColumnNumber(
int c,
int m = QDocumentCursor::MoveAnchor);
91 QPoint documentPosition()
const;
92 QPoint anchorDocumentPosition()
const;
94 QPolygon documentRegion()
const;
98 void shift(
int offset);
99 void setPosition(
int pos,
int m);
100 bool movePosition(
int offset,
int op,
int m);
104 QChar nextChar()
const;
105 QChar previousChar()
const;
109 void deletePreviousChar();
118 QString selectedText()
const;
120 void clearSelection();
121 void removeSelectedText(
bool keepAnchor =
false);
122 void replaceSelectedText(
const QString& text);
124 void select(QDocumentCursor::SelectionType t);
130 void beginBoundary(
int& begline,
int& begcol)
const;
131 void endBoundary(
int& endline,
int& endcol)
const;
132 void substractBoundaries(
int lbeg,
int cbeg,
int lend,
int cend);
133 void boundaries(
int& begline,
int& begcol,
int& endline,
int& endcol)
const;
134 void intersectBoundaries(
int& lbeg,
int& cbeg,
int& lend,
int& cend)
const;
135 void intersectBoundaries(
QDocumentCursorHandle *h,
int& lbeg,
int& cbeg,
int& lend,
int& cend)
const;
137 void beginEditBlock();
140 void moveTo(
int line,
int column);
145 void refreshColumnMemory();
146 bool hasColumnMemory()
const;
147 void setColumnMemory(
bool y);
151 inline void ref() { m_ref.ref(); }
152 inline void deref() {
if ( m_ref ) m_ref.deref();
if ( !m_ref )
delete this; }
154 inline bool hasFlag(
int f)
const {
return m_flags & f; }
155 inline void setFlag(
int f) { m_flags |= f; }
156 inline void clearFlag(
int f) { m_flags &= ~f; }
167 #if QT_VERSION < 0x040400
172 int m_begOffset, m_endOffset, m_max, m_begLine, m_endLine;
173 QStack<QDocumentCommandBlock*> m_blocks;
178 #endif // !_QDOCUMENT_CURSOR_P_H_