File: toHighlightedText.html

package info (click to toggle)
tora 1.3.23-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 15,984 kB
  • ctags: 14,460
  • sloc: cpp: 123,554; sh: 16,181; makefile: 966; xml: 69
file content (221 lines) | stat: -rw-r--r-- 15,834 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<HTML>
<HEAD>
<TITLE>class toHighlightedText</TITLE>

<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
	<TABLE BORDER="0">
		<TR><TD valign="top" align="left" cellspacing="10">
		<h1>class toHighlightedText</h1>
		</TD>
		<TD valign="top" align="right" colspan="1"> A simple editor which supports syntax highlighting. <small><A HREF="#longdesc">More...</A></small></TD></TR>
	</TABLE>
	<HR>
	<TABLE BORDER="0">
		<TR><TH>Definition</TH><TD><code>#include &lt;<A HREF="tohighlightedtext_h.html">tohighlightedtext.h</A>&gt;</code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="toMarkedText.html">toMarkedText</A> <small>[public ]</small></TD></TR>
<TR><TH>Inherited by</TH><TD><A HREF="toResultField.html">toResultField</A></TD></TR>
<TR><TH><A HREF="full-list-toHighlightedText.html">List of all Methods</A></TH></TR>
	</TABLE>
	</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref25">toHighlightedText</A></b> (<A HREF="/usr/lib/qt3/doc/html/qwidget.html">QWidget</A> *parent,const char *name=NULL) 
</LI>
<LI>virtual  &nbsp;<b><A HREF="#ref26">~toHighlightedText</A></b> () 
</LI>
<LI>void &nbsp;<b><A HREF="#ref27">clear</A></b> (void) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref28">setText</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref29">setErrors</A></b> (const std::map<int,<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A>> &errors) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref30">setCurrent</A></b> (int current) 
</LI>
<LI>int &nbsp;<b><A HREF="#ref31">current</A></b> (void) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref32">setKeywordUpper</A></b> (bool val) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref33">setHighlight</A></b> (bool val) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref34">setAnalyzer</A></b> (<A HREF="toSyntaxAnalyzer.html">toSyntaxAnalyzer</A> &analyzer) 
</LI>
<LI><A HREF="toSyntaxAnalyzer.html">toSyntaxAnalyzer</A> &&nbsp;<b><A HREF="#ref35">analyzer</A></b> (void) 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref36">paintCell</A></b> (<A HREF="/usr/lib/qt3/doc/html/qpainter.html">QPainter</A> *painter,int row,int col) 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref37">paintEvent</A></b> (<A HREF="/usr/lib/qt3/doc/html/qpaintevent.html">QPaintEvent</A> *pe) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref38">tableAtCursor</A></b> (<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &owner,<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &table,bool highlight=false) 
</LI>
<LI>bool &nbsp;<b><A HREF="#ref39">hasErrors</A></b> () 
</LI>
</ul><h4>Public Slots</h4><ul><LI>void &nbsp;<b><A HREF="#ref42">nextError</A></b> (void) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref43">previousError</A></b> (void) 
</LI>
</ul><h4>Signals</h4><ul><LI>void &nbsp;<b><A HREF="#ref40">insertedLines</A></b> (int start,int diff) 
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static  int &nbsp;<b><A HREF="#ref24">convertLine</A></b> (int line,int start,int diff) 
</LI>
</ul><h4>Protected Methods</h4><ul><LI>void &nbsp;<b><A HREF="#ref19">setLeftIgnore</A></b> (int ignore) 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref20">keyPressEvent</A></b> (<A HREF="/usr/lib/qt3/doc/html/qkeyevent.html">QKeyEvent</A> *e) 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref21">focusOutEvent</A></b> (<A HREF="/usr/lib/qt3/doc/html/qfocusevent.html">QFocusEvent</A> *e) 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref22">checkComplete</A></b> (void) 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref23">startComplete</A></b> (std::list<<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A>> &completes) 
</LI>
</ul><h4>Protected Slots</h4><ul><LI>void &nbsp;<b><A HREF="#ref41">textChanged</A></b> (void) 
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p> A simple editor which supports syntax highlighting.
 </p>
<A NAME="setLeftIgnore"></A><A NAME="ref19"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setLeftIgnore</strong> (int ignore)
<br></td><td align="right"><h3><strong>setLeftIgnore</strong></h3></td></tr></table><p> <small>[protected]</small></p><p> Set how much of the left margin to ignore painting.
   </p>
<A NAME="keyPressEvent"></A><A NAME="ref20"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>keyPressEvent</strong> (<A HREF="/usr/lib/qt3/doc/html/qkeyevent.html">QKeyEvent</A> *e)
<br></td><td align="right"><h3><strong>keyPressEvent</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p> Reimplemented for internal reasons.
   </p>
<p>Reimplemented from <A HREF="toMarkedText.html#keyPressEvent">toMarkedText</A>.</p>
<A NAME="focusOutEvent"></A><A NAME="ref21"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>focusOutEvent</strong> (<A HREF="/usr/lib/qt3/doc/html/qfocusevent.html">QFocusEvent</A> *e)
<br></td><td align="right"><h3><strong>focusOutEvent</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p> Reimplemented for internal reasons.
   </p>
<p>Reimplemented from <A HREF="toMarkedText.html#focusOutEvent">toMarkedText</A>.</p>
<A NAME="checkComplete"></A><A NAME="ref22"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>checkComplete</strong> (void)
<br></td><td align="right"><h3><strong>checkComplete</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p> Check if to view completion.
   </p>
<A NAME="startComplete"></A><A NAME="ref23"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>startComplete</strong> (std::list<<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A>> &completes)
<br></td><td align="right"><h3><strong>startComplete</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p> Start a completion with a given completelist.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>completes</i></TD><TD align="left" valign="top">List of available completions.
   </TD></TR>
</TABLE></P>
<A NAME="convertLine"></A><A NAME="ref24"></A><table width="100%"><tr bgcolor="#eeeeee"><td> int &nbsp;<strong>convertLine</strong> (int line,int start,int diff)
<br></td><td align="right"><h3><strong>convertLine</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Convert a linenumber after a change of the buffer to another linenumber. Can be
 used to convert a specific linenumber after receiving a <A HREF="toHighlightedText.html#insertedLines">insertedLines</A> call.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>line</i></TD><TD align="left" valign="top">Line number.
</TD></TR>
<TR><TD align="left" valign="top"><i>start</i></TD><TD align="left" valign="top">Start of change.
</TD></TR>
<TR><TD align="left" valign="top"><i>diff</i></TD><TD align="left" valign="top">Lines added or removed.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: New linenumber or -1 if line doesn't exist anymore.
   </p>
<A NAME="toHighlightedText"></A><A NAME="ref25"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>toHighlightedText</strong> (<A HREF="/usr/lib/qt3/doc/html/qwidget.html">QWidget</A> *parent,const char *name=NULL)
<br></td><td align="right"><h3><strong>toHighlightedText</strong></h3></td></tr></table><p></p><p> Create a new editor.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>parent</i></TD><TD align="left" valign="top">Parent of widget.
</TD></TR>
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Name of widget.
   </TD></TR>
</TABLE></P>
<A NAME="~toHighlightedText"></A><A NAME="ref26"></A><table width="100%"><tr bgcolor="#eeeeee"><td> &nbsp;<strong>~toHighlightedText</strong> ()
<br></td><td align="right"><h3><strong>~toHighlightedText</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p> Reimplemented for internal reasons
   </p>
<A NAME="clear"></A><A NAME="ref27"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>clear</strong> (void)
<br></td><td align="right"><h3><strong>clear</strong></h3></td></tr></table><p></p><p> Clear the editor.
   </p>
<p>Reimplemented from <A HREF="toMarkedText.html#clear">toMarkedText</A>.</p>
<A NAME="setText"></A><A NAME="ref28"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setText</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str)
<br></td><td align="right"><h3><strong>setText</strong></h3></td></tr></table><p></p><p> Set the text of this editor.
   </p>
<A NAME="setErrors"></A><A NAME="ref29"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setErrors</strong> (const std::map<int,<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A>> &errors)
<br></td><td align="right"><h3><strong>setErrors</strong></h3></td></tr></table><p></p><p> Set the error list map.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>errors</i></TD><TD align="left" valign="top">A map of linenumbers to errorstrings. These will be displayed in the
               statusbar if the cursor is placed on the line.
   </TD></TR>
</TABLE></P>
<A NAME="setCurrent"></A><A NAME="ref30"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setCurrent</strong> (int current)
<br></td><td align="right"><h3><strong>setCurrent</strong></h3></td></tr></table><p></p><p> Set current line. Will be indicated with a different background.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>current</i></TD><TD align="left" valign="top">Current line.
   </TD></TR>
</TABLE></P>
<A NAME="current"></A><A NAME="ref31"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int &nbsp;<strong>current</strong> (void)
<br></td><td align="right"><h3><strong>current</strong></h3></td></tr></table><p></p><p> Get current line.
</p>
<p><b>Returns</b>: Current line.
   </p>
<A NAME="setKeywordUpper"></A><A NAME="ref32"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setKeywordUpper</strong> (bool val)
<br></td><td align="right"><h3><strong>setKeywordUpper</strong></h3></td></tr></table><p></p><p> Set keyword upper flag. If this is set keywords will be converted to uppercase when painted.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>val</i></TD><TD align="left" valign="top">New value of keyword to upper flag.
   </TD></TR>
</TABLE></P>
<A NAME="setHighlight"></A><A NAME="ref33"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setHighlight</strong> (bool val)
<br></td><td align="right"><h3><strong>setHighlight</strong></h3></td></tr></table><p></p><p> The the highlighting flag. If this isn't set no highlighting is done.
   </p>
<A NAME="setAnalyzer"></A><A NAME="ref34"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setAnalyzer</strong> (<A HREF="toSyntaxAnalyzer.html">toSyntaxAnalyzer</A> &analyzer)
<br></td><td align="right"><h3><strong>setAnalyzer</strong></h3></td></tr></table><p></p><p> Set the syntax highlighter to use.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>analyzer</i></TD><TD align="left" valign="top">Analyzer to use.
   </TD></TR>
</TABLE></P>
<A NAME="analyzer"></A><A NAME="ref35"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="toSyntaxAnalyzer.html">toSyntaxAnalyzer</A> &&nbsp;<strong>analyzer</strong> (void)
<br></td><td align="right"><h3><strong>analyzer</strong></h3></td></tr></table><p></p><p> Get the current syntaxhighlighter.
</p>
<p><b>Returns</b>: Analyzer used.
   </p>
<A NAME="paintCell"></A><A NAME="ref36"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>paintCell</strong> (<A HREF="/usr/lib/qt3/doc/html/qpainter.html">QPainter</A> *painter,int row,int col)
<br></td><td align="right"><h3><strong>paintCell</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p> Reimplemented for internal reasons.
   </p>
<A NAME="paintEvent"></A><A NAME="ref37"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>paintEvent</strong> (<A HREF="/usr/lib/qt3/doc/html/qpaintevent.html">QPaintEvent</A> *pe)
<br></td><td align="right"><h3><strong>paintEvent</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p> Reimplemented for internal reasons.
   </p>
<p>Reimplemented from <A HREF="toMarkedText.html#paintEvent">toMarkedText</A>.</p>
<A NAME="tableAtCursor"></A><A NAME="ref38"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>tableAtCursor</strong> (<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &owner,<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &table,bool highlight=false)
<br></td><td align="right"><h3><strong>tableAtCursor</strong></h3></td></tr></table><p></p><p> Get the tablename currently under the cursor.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>owner</i></TD><TD align="left" valign="top">Filled with owner or table or QString::null if no owner specified.
</TD></TR>
<TR><TD align="left" valign="top"><i>table</i></TD><TD align="left" valign="top">Filled with tablename.
</TD></TR>
<TR><TD align="left" valign="top"><i>highlight</i></TD><TD align="left" valign="top">If true mark the extracted tablename
   </TD></TR>
</TABLE></P>
<A NAME="hasErrors"></A><A NAME="ref39"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool &nbsp;<strong>hasErrors</strong> ()
<br></td><td align="right"><h3><strong>hasErrors</strong></h3></td></tr></table><p></p><p> Returns true if the editor has any errors.
   </p>
<A NAME="insertedLines"></A><A NAME="ref40"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>insertedLines</strong> (int start,int diff)
<br></td><td align="right"><h3><strong>insertedLines</strong></h3></td></tr></table><p> <small>[signal]</small></p><p> Emitted when lines are inserted or removed.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>start</i></TD><TD align="left" valign="top">Start of line inserted.
</TD></TR>
<TR><TD align="left" valign="top"><i>diff</i></TD><TD align="left" valign="top">Number of lines inserted or removed.
   </TD></TR>
</TABLE></P>
<A NAME="textChanged"></A><A NAME="ref41"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>textChanged</strong> (void)
<br></td><td align="right"><h3><strong>textChanged</strong></h3></td></tr></table><p> <small>[protected slots slot]</small></p><A NAME="nextError"></A><A NAME="ref42"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>nextError</strong> (void)
<br></td><td align="right"><h3><strong>nextError</strong></h3></td></tr></table><p> <small>[slot]</small></p><p> Go to next error.
   </p>
<A NAME="previousError"></A><A NAME="ref43"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>previousError</strong> (void)
<br></td><td align="right"><h3><strong>previousError</strong></h3></td></tr></table><p> <small>[slot]</small></p><p> Go to previous error.
   </p>
<HR>
	<table>
	<tr><td><small>Generated by: nneul on skyhawk on Wed Feb 23 19:49:58 2005, using kdoc 2.0a54.</small></td></tr>
	</table>
</BODY>
</HTML>