summaryrefslogtreecommitdiff
path: root/freebsdtvision/doc/html/classTStaticText.html
blob: d9a02da607105c508059f7375e40682e17fcf93e (plain)
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>TStaticText class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>TStaticText Class Reference</h1>Used to show fixed text in a window. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="dialogs_8h-source.html">dialogs.h</a>&gt;</code>
<p>
<p>Inheritance diagram for TStaticText:
<p><center><img src="classTStaticText.png" usemap="#TStaticText_map" border="0" alt=""></center>
<map name="TStaticText_map">
<area href="classTView.html" alt="TView" shape="rect" coords="46,56,128,80">
<area href="classTObject.html" alt="TObject" shape="rect" coords="0,0,82,24">
<area href="classTStreamable.html" alt="TStreamable" shape="rect" coords="92,0,174,24">
<area href="classTLabel.html" alt="TLabel" shape="rect" coords="0,168,82,192">
<area href="classTParamText.html" alt="TParamText" shape="rect" coords="92,168,174,192">
</map>
<a href="classTStaticText-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#a0">TStaticText</a> (const <a class="el" href="classTRect.html">TRect</a> &amp;bounds, const char *aText)</td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#a1">~TStaticText</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#a2">draw</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual <a class="el" href="classTPalette.html">TPalette</a> &amp;&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#a3">getPalette</a> () const</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#a4">getText</a> (char *s)</td></tr>
<tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="classTStreamable.html">TStreamable</a> *&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#d0">build</a> ()</td></tr>
<tr><td colspan=2><br><h2>Static Public Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top>const char *const&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#p0">name</a></td></tr>
<tr><td colspan=2><br><h2>Protected Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#b0">TStaticText</a> (<a class="el" href="ttypes_8h.html#a14">StreamableInit</a>)</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#b1">write</a> (<a class="el" href="classopstream.html">opstream</a> &amp;os)</td></tr>
<tr><td nowrap align=right valign=top>virtual void *&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#b2">read</a> (<a class="el" href="classipstream.html">ipstream</a> &amp;is)</td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top>const char *&nbsp;</td><td valign=bottom><a class="el" href="classTStaticText.html#n0">text</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Used to show fixed text in a window.
<p>
TStaticText objects represent the simplest possible views: they contain fixed text and they ignore all events passed to them. They are generally used as messages or passive labels.
<p>
Descendants of TStaticText, such as <a class="el" href="classTLabel.html">TLabel</a> or <a class="el" href="classTParamText.html">TParamText</a> objects, usually perform more active roles. Use <a class="el" href="classTParamText.html">TParamText</a> if you want to show dynamic text also, where dynamic means user-selectable at run-time. 
<p>

<p>
Definition at line <a class="el" href="dialogs_8h-source.html#l01808">1808</a> of file <a class="el" href="dialogs_8h-source.html">dialogs.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="TStaticText::TStaticText"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> TStaticText::TStaticText </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classTRect.html">TRect</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>bounds</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>aText</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor.
<p>
Creates a TStaticText object of the given size by calling TView::TView(bounds), then sets text data member to newStr(aText). `bounds' is the bounding rectangle of the view. `aText' is a pointer to the string to show. <dl compact><dt><b>See also: </b></dt><dd>
<a class="el" href="classTView.html#a0">TView::TView</a> , <a class="el" href="util_8h.html#a15">newStr</a> </dl>    </td>
  </tr>
</table>
<a name="a1" doxytag="TStaticText::~TStaticText"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> TStaticText::~TStaticText </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Disposes of the text string, then calls <a class="el" href="classTView.html#a1">TView::~TView()</a> to destroy the object. <dl compact><dt><b>See also: </b></dt><dd>
<a class="el" href="classTView.html#a1">TView::~TView</a> </dl>    </td>
  </tr>
</table>
<a name="b0" doxytag="TStaticText::TStaticText"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> TStaticText::TStaticText </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="ttypes_8h.html#a14">StreamableInit</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Each streamable class needs a "builder" to allocate the correct memory for its objects together with the initialized virtual table pointers. This is achieved by calling this constructor with an argument of type <a class="el" href="ttypes_8h.html#a14">StreamableInit</a>.     </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="d0" doxytag="TStaticText::build"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classTStreamable.html">TStreamable</a>* TStaticText::build </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creates a new TStaticText.
<p>
Called to create an object in certain stream-reading situations. 
<p>
Reimplemented from <a class="el" href="classTView.html#d8">TView</a>.
<p>
Reimplemented in <a class="el" href="classTParamText.html#d0">TParamText</a>, and <a class="el" href="classTLabel.html#d0">TLabel</a>.    </td>
  </tr>
</table>
<a name="a2" doxytag="TStaticText::draw"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void TStaticText::draw </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Draws the text string inside the view, word wrapped if necessary. A '\n' in the text indicates the beginning of a new line. A line of text is centered in the view if the string begins with 0x03 (Ctrl-C). 
<p>
Reimplemented from <a class="el" href="classTView.html#a19">TView</a>.
<p>
Reimplemented in <a class="el" href="classTLabel.html#a1">TLabel</a>.    </td>
  </tr>
</table>
<a name="a3" doxytag="TStaticText::getPalette"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual <a class="el" href="classTPalette.html">TPalette</a>&amp; TStaticText::getPalette </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a reference to the default palette. 
<p>
Reimplemented from <a class="el" href="classTView.html#a46">TView</a>.
<p>
Reimplemented in <a class="el" href="classTLabel.html#a2">TLabel</a>.    </td>
  </tr>
</table>
<a name="a4" doxytag="TStaticText::getText"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void TStaticText::getText </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>s</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Writes the string at address `s'. 
<p>
Reimplemented in <a class="el" href="classTParamText.html#a2">TParamText</a>.    </td>
  </tr>
</table>
<a name="b2" doxytag="TStaticText::read"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void* TStaticText::read </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classipstream.html">ipstream</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>is</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Reads from the input stream `is'. 
<p>
Reimplemented from <a class="el" href="classTView.html#b2">TView</a>.
<p>
Reimplemented in <a class="el" href="classTParamText.html#b2">TParamText</a>, and <a class="el" href="classTLabel.html#b2">TLabel</a>.    </td>
  </tr>
</table>
<a name="b1" doxytag="TStaticText::write"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void TStaticText::write </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classopstream.html">opstream</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>os</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Writes to the output stream `os'. 
<p>
Reimplemented from <a class="el" href="classTView.html#b1">TView</a>.
<p>
Reimplemented in <a class="el" href="classTParamText.html#b1">TParamText</a>, and <a class="el" href="classTLabel.html#b1">TLabel</a>.    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="p0" doxytag="TStaticText::name"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const char* const TStaticText::name<code> [static]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Undocumented. 
<p>
Reimplemented from <a class="el" href="classTView.html#p4">TView</a>.
<p>
Reimplemented in <a class="el" href="classTParamText.html#p0">TParamText</a>, and <a class="el" href="classTLabel.html#p0">TLabel</a>.
<p>
Definition at line <a class="el" href="dialogs_8h-source.html#l01870">1870</a> of file <a class="el" href="dialogs_8h-source.html">dialogs.h</a>.    </td>
  </tr>
</table>
<a name="n0" doxytag="TStaticText::text"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const char* TStaticText::text<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
A pointer to the (constant) text string to be displayed in the view. 
<p>
Definition at line <a class="el" href="dialogs_8h-source.html#l01846">1846</a> of file <a class="el" href="dialogs_8h-source.html">dialogs.h</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="dialogs_8h-source.html">dialogs.h</a></ul>
<hr><address style="align: right;"><small>Generated on Wed Apr 2 22:13:17 2003 for TVision by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.18 </small></address>
</body>
</html>