<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US"> <head> <title>kate: katetextline.h Source File (kate)</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' /> <meta name="trademark" content="KDE e.V." /> <meta name="description" content="K Desktop Environment Homepage, KDE.org" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta name="robots" content="all" /> <link rel="shortcut icon" href="../../favicon.ico" /> <link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" /> </head> <body> <div id="nav_header_top" align="right"> <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a> <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a> <span class="doNotDisplay">::</span> <div id="nav_header_title" align="left">KDE API Reference</div> </div> <div id="nav_header_bottom" align="right"> <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span> <div id="nav_header_bottom_right" style="text-align: left;"> / <a href="../..">API Reference</a> / <a href=".">kate</a> </div> </div> <table id="main" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" class="menuheader" height="0"></td> <td id="contentcolumn" valign="top" rowspan="2" > <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;"> <a name="content"></a> <!-- Generated by Doxygen 1.7.4 --> <div class="header"> <div class="headertitle"> <div class="title">katetextline.h</div> </div> </div> <div class="contents"> <div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* This file is part of the KDE libraries</span> <a name="l00002"></a>00002 <span class="comment"> Copyright (C) 2001-2003 Christoph Cullmann <cullmann@kde.org></span> <a name="l00003"></a>00003 <span class="comment"> Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org></span> <a name="l00004"></a>00004 <span class="comment"></span> <a name="l00005"></a>00005 <span class="comment"> Based on:</span> <a name="l00006"></a>00006 <span class="comment"> KateTextLine : Copyright (C) 1999 Jochen Wilhelmy <digisnap@cs.tu-berlin.de></span> <a name="l00007"></a>00007 <span class="comment"></span> <a name="l00008"></a>00008 <span class="comment"> This library is free software; you can redistribute it and/or</span> <a name="l00009"></a>00009 <span class="comment"> modify it under the terms of the GNU Library General Public</span> <a name="l00010"></a>00010 <span class="comment"> License version 2 as published by the Free Software Foundation.</span> <a name="l00011"></a>00011 <span class="comment"></span> <a name="l00012"></a>00012 <span class="comment"> This library is distributed in the hope that it will be useful,</span> <a name="l00013"></a>00013 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00014"></a>00014 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00015"></a>00015 <span class="comment"> Library General Public License for more details.</span> <a name="l00016"></a>00016 <span class="comment"></span> <a name="l00017"></a>00017 <span class="comment"> You should have received a copy of the GNU Library General Public License</span> <a name="l00018"></a>00018 <span class="comment"> along with this library; see the file COPYING.LIB. If not, write to</span> <a name="l00019"></a>00019 <span class="comment"> the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,</span> <a name="l00020"></a>00020 <span class="comment"> Boston, MA 02110-1301, USA.</span> <a name="l00021"></a>00021 <span class="comment">*/</span> <a name="l00022"></a>00022 <a name="l00023"></a>00023 <span class="preprocessor">#ifndef __KATE_TEXTLINE_H__</span> <a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __KATE_TEXTLINE_H__</span> <a name="l00025"></a>00025 <span class="preprocessor"></span> <a name="l00026"></a>00026 <span class="preprocessor">#include <ksharedptr.h></span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="preprocessor">#include <qmemarray.h></span> <a name="l00029"></a>00029 <span class="preprocessor">#include <qstring.h></span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="keyword">class </span><a class="code" href="classKateRenderer.html" title="Handles all of the work of rendering the text (used for the views and printing)">KateRenderer</a>; <a name="l00032"></a>00032 <span class="keyword">class </span><a class="codeRef" href="qtextstream.html">QTextStream</a>; <a name="l00033"></a>00033 <a name="l00041"></a><a class="code" href="classKateTextLine.html">00041</a> <span class="keyword">class </span><a class="code" href="classKateTextLine.html" title="The KateTextLine represents a line of text.">KateTextLine</a> : <span class="keyword">public</span> <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKShared.html">KShared</a> <a name="l00042"></a>00042 { <a name="l00043"></a>00043 <span class="keyword">public</span>: <a name="l00047"></a><a class="code" href="classKateTextLine.html#a885ffc06d0ec9f4a4b45491dc434fc03">00047</a> <span class="keyword">typedef</span> <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKSharedPtr.html">KSharedPtr<KateTextLine></a> <a class="code" href="classKateTextLine.html#a885ffc06d0ec9f4a4b45491dc434fc03" title="Define a Shared-Pointer type.">Ptr</a>; <a name="l00048"></a>00048 <a name="l00049"></a>00049 <span class="keyword">public</span>: <a name="l00053"></a><a class="code" href="classKateTextLine.html#a091a298f3c9fb048e47eb2141545fa69">00053</a> <span class="keyword">enum</span> <a class="code" href="classKateTextLine.html#a091a298f3c9fb048e47eb2141545fa69" title="Used Flags.">Flags</a> <a name="l00054"></a>00054 { <a name="l00055"></a>00055 flagNoOtherData = 1, <span class="comment">// ONLY INTERNAL USE, NEVER EVER SET THAT !!!!</span> <a name="l00056"></a>00056 flagHlContinue = 2, <a name="l00057"></a>00057 flagAutoWrapped = 4, <a name="l00058"></a>00058 flagFoldingColumnsOutdated = 8, <a name="l00059"></a>00059 flagNoIndentationBasedFolding = 16, <a name="l00060"></a>00060 flagNoIndentationBasedFoldingAtStart = 32 <a name="l00061"></a>00061 }; <a name="l00062"></a>00062 <a name="l00063"></a>00063 <span class="keyword">public</span>: <a name="l00069"></a>00069 <a class="code" href="classKateTextLine.html#a92d05e01c751dd48730abc75183b5eb3" title="Constructor Creates an empty text line with given attribute and syntax highlight context.">KateTextLine</a> (); <a name="l00070"></a>00070 <a name="l00074"></a>00074 <a class="code" href="classKateTextLine.html#abe766f14675511b12c1bab4bddea49ae" title="Destructor.">~KateTextLine</a> (); <a name="l00075"></a>00075 <a name="l00079"></a>00079 <span class="keyword">public</span>: <a name="l00083"></a><a class="code" href="classKateTextLine.html#a42534f8f5bfa9ffc529f8e652204d573">00083</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKateTextLine.html#a42534f8f5bfa9ffc529f8e652204d573" title="Methods to get data.">setFoldingColumnsOutdated</a>(<span class="keywordtype">bool</span> <span class="keyword">set</span>) { <span class="keywordflow">if</span> (<span class="keyword">set</span>) m_flags |= KateTextLine::flagFoldingColumnsOutdated; <span class="keywordflow">else</span> m_flags&= <a name="l00084"></a>00084 (~<a class="code" href="classKateTextLine.html" title="The KateTextLine represents a line of text.">KateTextLine</a>::flagFoldingColumnsOutdated);} <a name="l00085"></a>00085 <a name="l00090"></a><a class="code" href="classKateTextLine.html#a649a5c7c079544b329aa657100da279f">00090</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKateTextLine.html#a649a5c7c079544b329aa657100da279f" title="folding columns outdated ?">foldingColumnsOutdated</a>() { <span class="keywordflow">return</span> m_flags & KateTextLine::flagFoldingColumnsOutdated; } <a name="l00091"></a>00091 <a name="l00092"></a>00092 <a name="l00097"></a><a class="code" href="classKateTextLine.html#a0de7e5208c832129e968bc9d40e2813f">00097</a> <span class="keyword">inline</span> uint <a class="code" href="classKateTextLine.html#a0de7e5208c832129e968bc9d40e2813f" title="Returns the length.">length</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_text.<a class="codeRef" href="qstring.html#length">length</a>(); } <a name="l00098"></a>00098 <a name="l00103"></a><a class="code" href="classKateTextLine.html#ab7d550542974efdc54824e6216ffdd4e">00103</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKateTextLine.html#ab7d550542974efdc54824e6216ffdd4e" title="has the line the hl continue flag set">hlLineContinue</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_flags & KateTextLine::flagHlContinue; } <a name="l00104"></a>00104 <a name="l00109"></a><a class="code" href="classKateTextLine.html#afcd08bba9031e8b9babb1c402264ee5b">00109</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKateTextLine.html#afcd08bba9031e8b9babb1c402264ee5b" title="was this line automagically wrapped">isAutoWrapped</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_flags & KateTextLine::flagAutoWrapped; } <a name="l00110"></a>00110 <a name="l00115"></a>00115 <span class="keywordtype">int</span> <a class="code" href="classKateTextLine.html#a6258d6b9ab9c478687cd53e331058911" title="Returns the position of the first non-whitespace character.">firstChar</a>() <span class="keyword">const</span>; <a name="l00116"></a>00116 <a name="l00121"></a>00121 <span class="keywordtype">int</span> <a class="code" href="classKateTextLine.html#a4e51c66b81d23f7af5623b3849c0a77c" title="Returns the position of the last non-whitespace character.">lastChar</a>() <span class="keyword">const</span>; <a name="l00122"></a>00122 <a name="l00129"></a>00129 <span class="keywordtype">int</span> <a class="code" href="classKateTextLine.html#aeed4be9b9b25c963291e6fb68957eb3a" title="Find the position of the next char that is not a space.">nextNonSpaceChar</a>(uint pos) <span class="keyword">const</span>; <a name="l00130"></a>00130 <a name="l00137"></a>00137 <span class="keywordtype">int</span> <a class="code" href="classKateTextLine.html#aed10dacecfde0a827d8d3849ee4535ec" title="Find the position of the previous char that is not a space.">previousNonSpaceChar</a>(uint pos) <span class="keyword">const</span>; <a name="l00138"></a>00138 <a name="l00145"></a><a class="code" href="classKateTextLine.html#a59fe14d55fba04925cf275d2f3d51c3c">00145</a> <span class="keyword">inline</span> <a class="codeRef" href="qchar.html">QChar</a> <a class="code" href="classKateTextLine.html#a59fe14d55fba04925cf275d2f3d51c3c" title="Gets the char at the given position.">getChar</a> (uint pos)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_text[pos]; } <a name="l00146"></a>00146 <a name="l00151"></a><a class="code" href="classKateTextLine.html#a4160ed7578dc159706ea45a51ba693e4">00151</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="codeRef" href="qchar.html">QChar</a> *<a class="code" href="classKateTextLine.html#a4160ed7578dc159706ea45a51ba693e4" title="Gets the text as a unicode representation.">text</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_text.<a class="codeRef" href="qstring.html#unicode">unicode</a>(); } <a name="l00152"></a>00152 <a name="l00167"></a><a class="code" href="classKateTextLine.html#a2c057a281b2c86b874305b0ecb77cd2e">00167</a> <span class="keyword">inline</span> uchar *<a class="code" href="classKateTextLine.html#a2c057a281b2c86b874305b0ecb77cd2e" title="Highlighting array The size of this is string().length()">attributes</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_attributes.<a class="codeRef" href="qmemarray.html#data">data</a>(); } <a name="l00168"></a>00168 <a name="l00173"></a><a class="code" href="classKateTextLine.html#a648073639993399eb479323d90221f02">00173</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>& <a class="code" href="classKateTextLine.html#a648073639993399eb479323d90221f02" title="Gets a QString.">string</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_text; } <a name="l00174"></a>00174 <a name="l00181"></a><a class="code" href="classKateTextLine.html#ae32b8c6254b68a2b9a5fb39ab8c43128">00181</a> <span class="keyword">inline</span> <a class="codeRef" href="qstring.html">QString</a> <a class="code" href="classKateTextLine.html#a648073639993399eb479323d90221f02" title="Gets a QString.">string</a>(uint startCol, uint <a class="code" href="classKateTextLine.html#a0de7e5208c832129e968bc9d40e2813f" title="Returns the length.">length</a>)<span class="keyword"> const</span> <a name="l00182"></a>00182 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_text.<a class="codeRef" href="qstring.html#mid">mid</a>(startCol, length); } <a name="l00183"></a>00183 <a name="l00188"></a>00188 <span class="keyword">const</span> <a class="codeRef" href="qchar.html">QChar</a> *<a class="code" href="classKateTextLine.html#a8fc6a638a8088a5a061a668f04b591b1" title="Gets a null terminated pointer to first non space char.">firstNonSpace</a>() <span class="keyword">const</span>; <a name="l00189"></a>00189 <a name="l00195"></a>00195 uint <a class="code" href="classKateTextLine.html#a23933aee94b1e068d516395576c8b48e" title="indentation depth of this line">indentDepth</a> (uint tabwidth) <span class="keyword">const</span>; <a name="l00196"></a>00196 <a name="l00204"></a>00204 <span class="keywordtype">int</span> <a class="code" href="classKateTextLine.html#ab1ddf55dab4762640f101153d9f23c44" title="Returns the x position of the cursor at the given position, which depends on the number of tab charac...">cursorX</a>(uint pos, uint tabChars) <span class="keyword">const</span>; <a name="l00205"></a>00205 <a name="l00211"></a>00211 uint <a class="code" href="classKateTextLine.html#ac95406e6a00f1ff76eb18816e31877dc" title="Returns the text length with tabs calced in.">lengthWithTabs</a> (uint tabChars) <span class="keyword">const</span>; <a name="l00212"></a>00212 <a name="l00219"></a>00219 <span class="keywordtype">bool</span> <a class="code" href="classKateTextLine.html#af6c331fd84c13bbbe156951d1785d7f8" title="Can we find the given string at the given position.">stringAtPos</a>(uint pos, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>& match) <span class="keyword">const</span>; <a name="l00220"></a>00220 <a name="l00226"></a>00226 <span class="keywordtype">bool</span> <a class="code" href="classKateTextLine.html#a35ac9baf650dcc967f29336d9d39446c" title="Is the line starting with the given string.">startingWith</a>(<span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>& match) <span class="keyword">const</span>; <a name="l00227"></a>00227 <a name="l00233"></a>00233 <span class="keywordtype">bool</span> <a class="code" href="classKateTextLine.html#acac0c923a66ccee5fb81da7758d7894a" title="Is the line ending with the given string.">endingWith</a>(<span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>& match) <span class="keyword">const</span>; <a name="l00234"></a>00234 <a name="l00245"></a>00245 <span class="keywordtype">bool</span> <a class="code" href="classKateTextLine.html#af05fb278af3b9ec96c276b3cf42daadf" title="search given string">searchText</a> (uint startCol, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &<a class="code" href="classKateTextLine.html#a4160ed7578dc159706ea45a51ba693e4" title="Gets the text as a unicode representation.">text</a>, <a name="l00246"></a>00246 uint *foundAtCol, uint *matchLen, <a name="l00247"></a>00247 <span class="keywordtype">bool</span> casesensitive = <span class="keyword">true</span>, <a name="l00248"></a>00248 <span class="keywordtype">bool</span> backwards = <span class="keyword">false</span>); <a name="l00249"></a>00249 <a name="l00259"></a>00259 <span class="keywordtype">bool</span> <a class="code" href="classKateTextLine.html#af05fb278af3b9ec96c276b3cf42daadf" title="search given string">searchText</a> (uint startCol, <span class="keyword">const</span> <a class="codeRef" href="qregexp.html">QRegExp</a> &regexp, <a name="l00260"></a>00260 uint *foundAtCol, uint *matchLen, <a name="l00261"></a>00261 <span class="keywordtype">bool</span> backwards = <span class="keyword">false</span>); <a name="l00262"></a>00262 <a name="l00271"></a><a class="code" href="classKateTextLine.html#ab9d12604235ce2e0ec4135800d4ba938">00271</a> <span class="keyword">inline</span> uchar <a class="code" href="classKateTextLine.html#ab9d12604235ce2e0ec4135800d4ba938" title="Gets the attribute at the given position use KRenderer::attributes to get the KTextAttribute for this...">attribute</a> (uint pos)<span class="keyword"> const</span> <a name="l00272"></a>00272 <span class="keyword"> </span>{ <a name="l00273"></a>00273 <span class="keywordflow">if</span> (pos < m_attributes.<a class="codeRef" href="qmemarray.html#size">size</a>()) <span class="keywordflow">return</span> m_attributes[pos]; <a name="l00274"></a>00274 <span class="keywordflow">return</span> 0; <a name="l00275"></a>00275 } <a name="l00276"></a>00276 <a name="l00281"></a><a class="code" href="classKateTextLine.html#aa26fb6952e140ddcf985dfb6b1be6c6e">00281</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="codeRef" href="qmemarray.html">QMemArray<short></a> &<a class="code" href="classKateTextLine.html#aa26fb6952e140ddcf985dfb6b1be6c6e" title="context stack">ctxArray</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_ctx; }; <a name="l00282"></a>00282 <a name="l00286"></a><a class="code" href="classKateTextLine.html#a3c5387e57c1f471fc41d21552adc579e">00286</a> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKateTextLine.html#a3c5387e57c1f471fc41d21552adc579e">noIndentBasedFolding</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_flags & KateTextLine::flagNoIndentationBasedFolding; }; <a name="l00287"></a>00287 <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> noIndentBasedFoldingAtStart()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_flags & KateTextLine::flagNoIndentationBasedFoldingAtStart; }; <a name="l00292"></a><a class="code" href="classKateTextLine.html#a8f28beb30ad3f35a88288b7b13833ab5">00292</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="codeRef" href="qmemarray.html">QMemArray<uint></a> &<a class="code" href="classKateTextLine.html#a8f28beb30ad3f35a88288b7b13833ab5" title="folding list">foldingListArray</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_foldingList; }; <a name="l00293"></a>00293 <a name="l00298"></a><a class="code" href="classKateTextLine.html#a81d9075226e2888dfab074b8aa5f213f">00298</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="codeRef" href="qmemarray.html">QMemArray<unsigned short></a> &<a class="code" href="classKateTextLine.html#a81d9075226e2888dfab074b8aa5f213f" title="indentation stack">indentationDepthArray</a> ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_indentationDepth; }; <a name="l00299"></a>00299 <a name="l00307"></a>00307 <span class="keywordtype">void</span> <a class="code" href="classKateTextLine.html#a13fc8337c79348a1d0a40b769f20c912" title="insert text into line">insertText</a> (uint pos, uint insLen, <span class="keyword">const</span> <a class="codeRef" href="qchar.html">QChar</a> *insText, uchar *insAttribs = 0); <a name="l00308"></a>00308 <a name="l00314"></a>00314 <span class="keywordtype">void</span> <a class="code" href="classKateTextLine.html#ad5a3fba950a5affb042de925848fee6c" title="remove text at given position">removeText</a> (uint pos, uint delLen); <a name="l00315"></a>00315 <a name="l00320"></a>00320 <span class="keywordtype">void</span> <a class="code" href="classKateTextLine.html#a9836e356f5980231415142081ceaef4d" title="Truncates the textline to the new length.">truncate</a>(uint newLen); <a name="l00321"></a>00321 <a name="l00326"></a><a class="code" href="classKateTextLine.html#af26cc13d8bed45bef9b6c0119c97eaa8">00326</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKateTextLine.html#af26cc13d8bed45bef9b6c0119c97eaa8" title="set hl continue flag">setHlLineContinue</a> (<span class="keywordtype">bool</span> cont) <a name="l00327"></a>00327 { <a name="l00328"></a>00328 <span class="keywordflow">if</span> (cont) m_flags = m_flags | KateTextLine::flagHlContinue; <a name="l00329"></a>00329 <span class="keywordflow">else</span> m_flags = m_flags & ~<a class="code" href="classKateTextLine.html" title="The KateTextLine represents a line of text."> KateTextLine</a>::flagHlContinue; <a name="l00330"></a>00330 } <a name="l00331"></a>00331 <a name="l00336"></a><a class="code" href="classKateTextLine.html#a2fd482a76fbd6b0a488f083cde68f7a7">00336</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKateTextLine.html#a2fd482a76fbd6b0a488f083cde68f7a7" title="auto-wrapped">setAutoWrapped</a> (<span class="keywordtype">bool</span> wrapped) <a name="l00337"></a>00337 { <a name="l00338"></a>00338 <span class="keywordflow">if</span> (wrapped) m_flags = m_flags | KateTextLine::flagAutoWrapped; <a name="l00339"></a>00339 <span class="keywordflow">else</span> m_flags = m_flags & ~<a class="code" href="classKateTextLine.html" title="The KateTextLine represents a line of text."> KateTextLine</a>::flagAutoWrapped; <a name="l00340"></a>00340 } <a name="l00341"></a>00341 <a name="l00346"></a><a class="code" href="classKateTextLine.html#a96654b526069acb40c7adae3c66389b5">00346</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKateTextLine.html#a96654b526069acb40c7adae3c66389b5" title="Sets the syntax highlight context number.">setContext</a> (<a class="codeRef" href="qmemarray.html">QMemArray<short></a> &val) { m_ctx.<a class="codeRef" href="qmemarray.html#assign">assign</a> (val); } <a name="l00347"></a>00347 <a name="l00351"></a><a class="code" href="classKateTextLine.html#abb164973f00dc603376d6540bfb48c99">00351</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKateTextLine.html#abb164973f00dc603376d6540bfb48c99" title="sets if for the next line indent based folding should be disabled">setNoIndentBasedFolding</a>(<span class="keywordtype">bool</span> val) <a name="l00352"></a>00352 { <a name="l00353"></a>00353 <span class="keywordflow">if</span> (val) m_flags = m_flags | KateTextLine::flagNoIndentationBasedFolding; <a name="l00354"></a>00354 <span class="keywordflow">else</span> m_flags = m_flags & ~<a class="code" href="classKateTextLine.html" title="The KateTextLine represents a line of text."> KateTextLine</a>::flagNoIndentationBasedFolding; <a name="l00355"></a>00355 } <a name="l00356"></a>00356 <a name="l00357"></a>00357 <span class="keyword">inline</span> <span class="keywordtype">void</span> setNoIndentBasedFoldingAtStart(<span class="keywordtype">bool</span> val) <a name="l00358"></a>00358 { <a name="l00359"></a>00359 <span class="keywordflow">if</span> (val) m_flags = m_flags | KateTextLine::flagNoIndentationBasedFoldingAtStart; <a name="l00360"></a>00360 <span class="keywordflow">else</span> m_flags = m_flags & ~<a class="code" href="classKateTextLine.html" title="The KateTextLine represents a line of text."> KateTextLine</a>::flagNoIndentationBasedFoldingAtStart; <a name="l00361"></a>00361 } <a name="l00362"></a>00362 <a name="l00367"></a><a class="code" href="classKateTextLine.html#a5652d9859d7a68ff0f323c23112dca7f">00367</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKateTextLine.html#a5652d9859d7a68ff0f323c23112dca7f" title="update folding list">setFoldingList</a> (<a class="codeRef" href="qmemarray.html">QMemArray<uint></a> &val) { m_foldingList.<a class="codeRef" href="qmemarray.html#assign">assign</a> (val); m_foldingList.<a class="codeRef" href="qmemarray.html#detach">detach</a>(); } <a name="l00368"></a>00368 <a name="l00373"></a><a class="code" href="classKateTextLine.html#a9db970e998ff681ae5e180667ec9515a">00373</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKateTextLine.html#a9db970e998ff681ae5e180667ec9515a" title="update indentation stack">setIndentationDepth</a> (<a class="codeRef" href="qmemarray.html">QMemArray<unsigned short></a> &val) { m_indentationDepth.<a class="codeRef" href="qmemarray.html#assign">assign</a> (val); } <a name="l00374"></a>00374 <a name="l00378"></a>00378 <span class="keyword">public</span>: <a name="l00384"></a><a class="code" href="classKateTextLine.html#a8c87b14b26450ebc49d79ce64ac5a7ee">00384</a> <span class="keyword">inline</span> uint <a class="code" href="classKateTextLine.html#a8c87b14b26450ebc49d79ce64ac5a7ee" title="Methodes for dump/restore of the line in the buffer.">dumpSize</a> (<span class="keywordtype">bool</span> withHighlighting)<span class="keyword"> const</span> <a name="l00385"></a>00385 <span class="keyword"> </span>{ <a name="l00386"></a>00386 <span class="keywordflow">return</span> ( 1 <a name="l00387"></a>00387 + <span class="keyword">sizeof</span>(uint) <a name="l00388"></a>00388 + (m_text.<a class="codeRef" href="qstring.html#length">length</a>() * <span class="keyword">sizeof</span>(<a class="codeRef" href="qchar.html">QChar</a>)) <a name="l00389"></a>00389 + ( withHighlighting ? <a name="l00390"></a>00390 ( (3 * <span class="keyword">sizeof</span>(uint)) <a name="l00391"></a>00391 + (m_text.<a class="codeRef" href="qstring.html#length">length</a>() * <span class="keyword">sizeof</span>(uchar)) <a name="l00392"></a>00392 + (m_ctx.<a class="codeRef" href="qmemarray.html#size">size</a>() * <span class="keyword">sizeof</span>(short)) <a name="l00393"></a>00393 + (m_foldingList.<a class="codeRef" href="qmemarray.html#size">size</a>() * <span class="keyword">sizeof</span>(uint)) <a name="l00394"></a>00394 + (m_indentationDepth.<a class="codeRef" href="qmemarray.html#size">size</a>() * <span class="keyword">sizeof</span>(<span class="keywordtype">unsigned</span> short)) <a name="l00395"></a>00395 ) : 0 <a name="l00396"></a>00396 ) <a name="l00397"></a>00397 ); <a name="l00398"></a>00398 } <a name="l00399"></a>00399 <a name="l00407"></a>00407 <span class="keywordtype">char</span> *<a class="code" href="classKateTextLine.html#aa92689ce4bda4de035070c21ffa80827" title="Dumps the line to *buf and counts buff dumpSize bytes up as return value.">dump</a> (<span class="keywordtype">char</span> *buf, <span class="keywordtype">bool</span> withHighlighting) <span class="keyword">const</span>; <a name="l00408"></a>00408 <a name="l00415"></a>00415 <span class="keywordtype">char</span> *<a class="code" href="classKateTextLine.html#ac9f1d61226359f3d0c03955ad0f7eb29" title="Restores the line from *buf and counts buff dumpSize bytes up as return value.">restore</a> (<span class="keywordtype">char</span> *buf); <a name="l00416"></a>00416 <a name="l00420"></a>00420 <span class="keyword">private</span>: <a name="l00424"></a>00424 <a class="codeRef" href="qstring.html">QString</a> m_text; <a name="l00425"></a>00425 <a name="l00431"></a>00431 <a class="codeRef" href="qmemarray.html">QMemArray<uchar></a> m_attributes; <a name="l00432"></a>00432 <a name="l00436"></a>00436 <a class="codeRef" href="qmemarray.html">QMemArray<short></a> m_ctx; <a name="l00437"></a>00437 <a name="l00441"></a>00441 <a class="codeRef" href="qmemarray.html">QMemArray<uint></a> m_foldingList; <a name="l00442"></a>00442 <a name="l00446"></a>00446 <a class="codeRef" href="qmemarray.html">QMemArray<unsigned short></a> m_indentationDepth; <a name="l00447"></a>00447 <a name="l00451"></a>00451 uchar m_flags; <a name="l00452"></a>00452 }; <a name="l00453"></a>00453 <a name="l00454"></a>00454 <span class="preprocessor">#endif</span> <a name="l00455"></a>00455 <span class="preprocessor"></span> <a name="l00456"></a>00456 <span class="comment">// kate: space-indent on; indent-width 2; replace-tabs on;</span> </pre></div></div> </div> </div></div> </td> </tr> <tr> <td valign="top" id="leftmenu" width="25%"> <a name="navigation"></a> <div class="menu_box"><h2>kate</h2> <div class="nav_list"> <ul><li><a href="index.html">Main Page</a></li><li><a href="namespaces.html">Namespace List</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="namespacemembers.html">Namespace Members</a></li><li><a href="functions.html">Class Members</a></li><li><a href="pages.html">Related Pages</a></li></ul> <!-- <h2>Class Picker</h2> <div style="text-align: center;"> <form name="guideform"> <select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value"> <option value="annotated.html">-- Choose --</option> <option value="classIndenterConfigPage.html">indenterconfigpage</option>, <option value="classKate_1_1Command.html">kate::command</option>, <option value="classKate_1_1CommandExtension.html">kate::commandextension</option>, <option value="classKate_1_1Document.html">kate::document</option>, <option value="classKate_1_1DocumentExt.html">kate::documentext</option>, <option value="classKate_1_1View.html">kate::view</option>, <option value="classKateArbitraryHighlight.html">katearbitraryhighlight</option>, <option value="classKateAttribute.html">kateattribute</option>, <option value="classKateAutoIndent.html">kateautoindent</option>, <option value="classKateBrowserExtension.html">katebrowserextension</option>, <option value="classKateBufBlock.html">katebufblock</option>, <option value="classKateBufBlockList.html">katebufblocklist</option>, <option value="classKateBuffer.html">katebuffer</option>, <option value="classKateCmdShellCompletion.html">katecmdshellcompletion</option>, <option value="classKateCommands_1_1Character.html">katecommands::character</option>, <option value="classKateCommands_1_1CoreCommands.html">katecommands::corecommands</option>, <option value="classKateCommands_1_1Date.html">katecommands::date</option>, <option value="classKateCommands_1_1SedReplace.html">katecommands::sedreplace</option>, <option value="classKateConfig.html">kateconfig</option>, <option value="classKateDocCursor.html">katedoccursor</option>, <option value="classKateJScript.html">katejscript</option>, <option value="classKateModOnHdPrompt.html">katemodonhdprompt</option>, <option value="classKateNormalIndent.html">katenormalindent</option>, <option value="classKateRenderer.html">katerenderer</option>, <option value="classKateReplacePrompt.html">katereplaceprompt</option>, <option value="classKateScrollBar.html">katescrollbar</option>, <option value="classKateSuperCursor.html">katesupercursor</option>, <option value="classKateSuperRange.html">katesuperrange</option>, <option value="classKateSyntaxContextData.html">katesyntaxcontextdata</option>, <option value="classKateSyntaxDocument.html">katesyntaxdocument</option>, <option value="classKateSyntaxModeListItem.html">katesyntaxmodelistitem</option>, <option value="classKateTextCursor.html">katetextcursor</option>, <option value="classKateTextLine.html">katetextline</option>, <option value="classKateUndoGroup.html">kateundogroup</option>, <option value="classKateVarIndent.html">katevarindent</option>, <option value="classKateViewIndentationAction.html">kateviewindentationaction</option>, <option value="classOutputFunction.html">outputfunction</option>, <option value="classOutputObject.html">outputobject</option>, </select> </form> </div> --> </div></div> <div class="menu_box"><h2>API Dox</h2> <div class="nav_list"> <ul> <li><a href="../../arts/html/index.html">arts</a></li><li><a href="../../dcop/html/index.html">dcop</a></li><li><a href="../../dnssd/html/index.html">dnssd</a></li><li><a href="../../interfaces/html/index.html">interfaces</a></li><li> <a href="../../interfaces/kimproxy/interface/html/index.html">interface</a></li><li> <a href="../../interfaces/kimproxy/library/html/index.html">library</a></li><li> <a href="../../interfaces/kspeech/html/index.html">kspeech</a></li><li> <a href="../../interfaces/ktexteditor/html/index.html">ktexteditor</a></li><li><a href="../../kabc/html/index.html">kabc</a></li><li><a href="../../kate/html/index.html">kate</a></li><li><a href="../../kcmshell/html/index.html">kcmshell</a></li><li><a href="../../kdecore/html/index.html">kdecore</a></li><li><a href="../../kded/html/index.html">kded</a></li><li><a href="../../kdefx/html/index.html">kdefx</a></li><li><a href="../../kdeprint/html/index.html">kdeprint</a></li><li><a href="../../kdesu/html/index.html">kdesu</a></li><li><a href="../../kdeui/html/index.html">kdeui</a></li><li><a href="../../kdoctools/html/index.html">kdoctools</a></li><li><a href="../../khtml/html/index.html">khtml</a></li><li><a href="../../kimgio/html/index.html">kimgio</a></li><li><a href="../../kinit/html/index.html">kinit</a></li><li><a href="../../kio/html/index.html">kio</a></li><li> <a href="../../kio/bookmarks/html/index.html">bookmarks</a></li><li> <a href="../../kio/httpfilter/html/index.html">httpfilter</a></li><li> <a href="../../kio/kfile/html/index.html">kfile</a></li><li> <a href="../../kio/kio/html/index.html">kio</a></li><li> <a href="../../kio/kioexec/html/index.html">kioexec</a></li><li> <a href="../../kio/kpasswdserver/html/index.html">kpasswdserver</a></li><li> <a href="../../kio/kssl/html/index.html">kssl</a></li><li><a href="../../kioslave/html/index.html">kioslave</a></li><li> <a href="../../kioslave/http/html/index.html">http</a></li><li><a href="../../kjs/html/index.html">kjs</a></li><li><a href="../../kmdi/html/index.html">kmdi</a></li><li> <a href="../../kmdi/kmdi/html/index.html">kmdi</a></li><li><a href="../../knewstuff/html/index.html">knewstuff</a></li><li><a href="../../kparts/html/index.html">kparts</a></li><li><a href="../../kresources/html/index.html">kresources</a></li><li><a href="../../kspell2/html/index.html">kspell2</a></li><li><a href="../../kunittest/html/index.html">kunittest</a></li><li><a href="../../kutils/html/index.html">kutils</a></li><li><a href="../../kwallet/html/index.html">kwallet</a></li><li><a href="../../libkmid/html/index.html">libkmid</a></li><li><a href="../../libkscreensaver/html/index.html">libkscreensaver</a></li> </ul></div></div> </td> </tr> </table> <span class="doNotDisplay"> <a href="http://www.kde.org/" accesskey="8">KDE Home</a> | <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> | <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a> </span> <div style="height: 8px"></div> <div id="footer"> <div id="footer_left"> Maintained by <a href="mailto:groot@kde.org">Adriaan de Groot</a> and <a href="mailto:winter@kde.org">Allen Winter</a>. <br/> KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> | <a href="http://www.kde.org/contact/impressum.php">Legal</a> </div> <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div> </div> <!-- WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL BE BLOCKED INSTANTLY AND PERMANENTLY! <a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a> WARNING END --> </body> </html>