Kate
katebuffer.cpp
Go to the documentation of this file.
189 KTextEditor::Message* message = new KTextEditor::Message(i18nc("short translation, user created new file", "New file"),
403 kDebug (13020) << "HIGHLIGHTED START --- NEED HL, LINESTART: " << startLine << " LINEEND: " << endLine;
405 kDebug (13020) << "HL DYN COUNT: " << KateHlManager::self()->countDynamicCtxs() << " MAX: " << m_maxDynamicContexts;
415 kDebug (13020) << "HL invalidated - too many dynamic contexts ( >= " << m_maxDynamicContexts << ")";
464 m_highlight->doHighlight (prevLine.data(), textLine.data(), nextLine.data(), ctxChanged, tabWidth());
469 kDebug( 13020 ) << "text length: " << textLine->length() << " attribute list size: " << textLine->attributesList().size();
474 kDebug( 13020 ) << "start: " << ml.at(i-2) << " len: " << ml.at(i-1) << " at: " << ml.at(i) << " ";
510 qMin(lines()-1, (last_line_spellchecking==-1)?qMax (current_line, oldHighlighted):last_line_spellchecking));
515 kDebug (13020) << "HIGHLIGHTED END --- NEED HL, LINESTART: " << startLine << " LINEEND: " << endLine;
517 kDebug (13020) << "HL DYN COUNT: " << KateHlManager::self()->countDynamicCtxs() << " MAX: " << m_maxDynamicContexts;
609 return KTextEditor::Range (KTextEditor::Cursor (startLine, 0), KTextEditor::Cursor (lastLine, plainLine (lastLine)->length()));
630 const QVector<Kate::TextLineData::Attribute> &startLineAttributes = startTextLine->attributesList();
639 QHash<short, QPair<int, int> >::iterator end = foldingStartToOffsetAndCount.find (-startLineAttributes[i].foldingValue);
655 QHash<short, QPair<int, int> >::iterator start = foldingStartToOffsetAndCount.find (startLineAttributes[i].foldingValue);
659 foldingStartToOffsetAndCount.insert (startLineAttributes[i].foldingValue, qMakePair (startLineAttributes[i].offset, 1));
736 return KTextEditor::Range (KTextEditor::Cursor (startLine, openedRegionOffset), KTextEditor::Cursor (lines()-1, plainLine (lines()-1)->length()));
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
void setGenerateByteOrderMark(bool generateByteOrderMark)
Generate byte order mark on save.
Definition: katetextbuffer.h:130
bool editingChangedBuffer() const
Query information from the last editing transaction: was the content of the buffer changed...
Definition: katetextbuffer.h:250
static const int KATE_MAX_DYNAMIC_CONTEXTS
Initial value for m_maxDynamicContexts.
Definition: katebuffer.cpp:56
QScriptValue i18n(QScriptContext *context, QScriptEngine *engine)
i18n("text", arguments [optional])
Definition: katescripthelpers.cpp:186
void setIndentationMode(const QString &identationMode)
Definition: kateconfig.cpp:459
void ensureHighlighted(int line, int lookAhead=64)
Update highlighting of given line line, if needed.
Definition: katebuffer.cpp:284
KTextEditor::Range computeFoldingRangeForStartLine(int startLine)
For a given line, compute the folding range that starts there to be used to fold e.g.
Definition: katebuffer.cpp:522
QScriptValue i18nc(QScriptContext *context, QScriptEngine *engine)
i18nc("context", "text", arguments [optional])
Definition: katescripthelpers.cpp:210
void use()
Increase the usage count, and trigger initialization if needed.
Definition: katehighlight.cpp:719
void wrapLine(const KTextEditor::Cursor &position)
Wrap line at given cursor position.
Definition: katebuffer.cpp:301
void setFallbackTextCodec(QTextCodec *codec)
Set fallback codec for this buffer to use for load.
Definition: katetextbuffer.h:103
void setOpeningErrorMessage(const QString &message)
int stat(const QString &path, KDE_struct_stat *buf)
const char * name(StandardAction id)
void respellCheckBlock(int start, int end)
bool isEmptyLine(const Kate::TextLineData *textline) const
Definition: katehighlight.cpp:2171
bool saveFile(const QString &m_file)
Save the buffer to a file, use the given filename + codec + end of line chars (internal use of qtexts...
Definition: katebuffer.cpp:256
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
virtual void wrapLine(const KTextEditor::Cursor &position)
Wrap line at given cursor position.
Definition: katetextbuffer.cpp:218
virtual bool load(const QString &filename, bool &encodingErrors, bool &tooLongLinesWrapped, bool enforceTextCodec)
Load the given file.
Definition: katetextbuffer.cpp:513
KUrl url
bool foldingIndentationSensitive()
Definition: katehighlight.h:399
virtual bool startEditing()
Start an editing transaction, the wrapLine/unwrapLine/insertText and removeText functions are only to...
Definition: katetextbuffer.cpp:171
int editingMaximalLineChanged() const
Get maximal line number changed by last editing transaction.
Definition: katetextbuffer.h:269
void setNewLineAtEof(bool newlineAtEof)
Set whether to insert a newline character on save at the end of the file.
Definition: katetextbuffer.h:155
void setAutoHide(int autoHideTimer=0)
void makeAttribs(bool needInvalidate=true)
Definition: katedocument.cpp:2502
bool openFile(const QString &m_file, bool enforceTextCodec)
Open a file, use the given filename.
Definition: katebuffer.cpp:161
void setTextCodec(QTextCodec *codec)
Set codec for this buffer to use for load/save.
Definition: katetextbuffer.cpp:702
static Range invalid()
QString pathOrUrl() const
void setPosition(MessagePosition position)
Definition: katedocument.h:74
void setEncodingProberType(KEncodingProber::ProberType proberType)
Set encoding prober type for this buffer to use for load.
Definition: katetextbuffer.h:91
void doHighlight(const Kate::TextLineData *prevLine, Kate::TextLineData *textLine, const Kate::TextLineData *nextLine, bool &ctxChanged, int tabWidth=0)
Parse the text and fill in the context array and folding list array.
Definition: katehighlight.cpp:253
virtual bool save(const QString &filename)
Save the current buffer content to the given file.
Definition: katetextbuffer.cpp:714
virtual int line() const
void setEndOfLineMode(EndOfLineMode endOfLineMode)
Set end of line mode for this buffer, not allowed to be set to unknown.
Definition: katetextbuffer.h:143
Definition: katehighlight.h:119
QSharedPointer< TextLineData > TextLine
The normal world only accesses the text lines with shared pointers.
Definition: katetextline.h:443
bool generateByteOrderMark() const
Generate byte order mark on save?
Definition: katetextbuffer.h:136
int editingMinimalLineChanged() const
Get minimal line number changed by last editing transaction.
Definition: katetextbuffer.h:263
void invalidateHighlighting()
Invalidate highlighting of whole buffer.
Definition: katebuffer.cpp:389
virtual bool postMessage(KTextEditor::Message *message)
Definition: katedocument.cpp:5498
void setOpeningError(bool errors)
void tagLines(int start, int end)
Emitted when the highlighting of a certain range has changed.
void release()
Decrease the usage count, and trigger cleanup if needed.
Definition: katehighlight.cpp:730
bool isLocalFile() const
const KShortcut & end()
int column() const
virtual void clear()
Clears the buffer, reverts to initial empty state.
Definition: katetextbuffer.cpp:108
bool setEncoding(const QString &encoding)
Definition: kateconfig.cpp:811
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.