summaryrefslogtreecommitdiff
path: root/sigalatvision/doc/html/classTButton.html
blob: a30fa0325dcf2a42763e282306af86011b6c4576 (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
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
<!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>TButton class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.8.1 -->
<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>TButton  Class Reference</h1>The button view. 
<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 TButton::
<p><center><img src="classTButton.gif" usemap="#TButton_map" border="0"></center>
<map name="TButton_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">
</map>
<a href="classTButton-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<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="classTButton.html#a0">TButton</a> (const <a class="el" href="classTRect.html">TRect</a> &amp;bounds, const char *aTitle, <a class="el" href="ttypes_8h.html#a0">ushort</a> aCommand, <a class="el" href="ttypes_8h.html#a0">ushort</a> aFlags)</td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#a1">~TButton</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#a2">draw</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#a3">drawState</a> (<a class="el" href="ttypes_8h.html#a13">Boolean</a> down)</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="classTButton.html#a4">getPalette</a> () const</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#a5">handleEvent</a> (<a class="el" href="structTEvent.html">TEvent</a> &amp;event)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#a6">makeDefault</a> (<a class="el" href="ttypes_8h.html#a13">Boolean</a> enable)</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#a7">press</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#a8">setState</a> (<a class="el" href="ttypes_8h.html#a0">ushort</a> aState, <a class="el" href="ttypes_8h.html#a13">Boolean</a> enable)</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="classTButton.html#d0">build</a> ()</td></tr>
<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top>const char*&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#m0">title</a></td></tr>
<tr><td colspan=2><br><h2>Static Public Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top>const char*&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#p0">shadows</a></td></tr>
<tr><td nowrap align=right valign=top>const char* const&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#p1">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="classTButton.html#b0">TButton</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="classTButton.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="classTButton.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><a class="el" href="ttypes_8h.html#a0">ushort</a>&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#n0">command</a></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="ttypes_8h.html#a1">uchar</a>&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#n1">flags</a></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="ttypes_8h.html#a13">Boolean</a>&nbsp;</td><td valign=bottom><a class="el" href="classTButton.html#n2">amDefault</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
One of the most used and easy to use views. A TButton object is a box with a title and a shadow that generates a command when pressed. A button can be selected by:
<p>
<ol>
<li>typing the highlighted letter<li>tabbing to the button and pressing Spacebar<li>pressing Enter when the button is the default<li>clicking on the button with a mouse</ol>
With color and black-and-white palettes, a button has a three-dimensional look that moves when selected. On monochrome systems, a button is bordered by brackets, and other ASCII characters are used to indicate whether the button is default, selected, and so on.
<p>
There can only be one default button in a window or dialog at any given time. Buttons that are peers in a group grab and release the default state via <a class="el" href="system_8h.html#a6">evBroadcast</a> messages. 
<p>

<p>
Definition at line <a class="el" href="dialogs_8h-source.html#l00536">536</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="TButton::TButton"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
TButton::TButton (
          </b></td>
          <td valign="bottom"><b>
const <a class="el" href="classTRect.html">TRect</a> &amp; <em>bounds</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
const char * <em>aTitle</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
<a class="el" href="ttypes_8h.html#a0">ushort</a> <em>aCommand</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
<a class="el" href="ttypes_8h.html#a0">ushort</a> <em>aFlags</em>&nbsp;)
          </b></td>
        </tr>

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

<p>
Constructor.
<p>
Creates a TButton class with the given size by calling the <a class="el" href="classTView.html">TView</a> constructor.
<p>
<ol>
<li>`bounds' is the bounding rectangle of the button<li>`aTitle' is a pointer to a string which will be the title of the button<li>`aCommand' is the command generated when the user presses the button. If the given `aCommand' is not enabled, <a class="el" href="views_8h.html#a34">sfDisabled</a> is set in the <a class="el" href="classTView.html#m4">state</a> data member.<li>`aFlags' is a combination of the following values:</ol>
<pre>
 Constant    Value Meaning

 <a class="el" href="dialogs_8h.html#a0">bfNormal</a>    0x00  Button is a normal, non-default button

 <a class="el" href="dialogs_8h.html#a1">bfDefault</a>   0x01  Button is the default button: if this bit is set this
                   button will be highlighted as the default button

 <a class="el" href="dialogs_8h.html#a2">bfLeftJust</a>  0x02  Button label is left-justified; if this bit is clear
                   the title will be centered

 <a class="el" href="dialogs_8h.html#a3">bfBroadcast</a> 0x04  Sends a broadcast message when pressed

 <a class="el" href="dialogs_8h.html#a4">bfGrabFocus</a> 0x08  The button grabs the focus when pressed
 </pre>
<p>
It is the responsibility of the programmer to ensure that there is only one default button in a <a class="el" href="classTGroup.html">TGroup</a>. However the default property can be passed to normal buttons by calling <a class="el" href="classTButton.html#a6">makeDefault</a>(). <dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classTButton.html#n2">TButton::amDefault</a>
<p>
</dl>The <a class="el" href="dialogs_8h.html#a2">bfLeftJust</a> value can be added to <a class="el" href="dialogs_8h.html#a0">bfNormal</a> or <a class="el" href="dialogs_8h.html#a1">bfDefault</a> and affects the position of the text displayed within the button: if clear, the label is centered; if set, the label is left-justified.
<p>
The <a class="el" href="classTView.html#m2">options</a> data member is set to (<a class="el" href="views_8h.html#a38">ofSelectable</a> | <a class="el" href="views_8h.html#a40">ofFirstClick</a> | <a class="el" href="views_8h.html#a42">ofPreProcess</a> | <a class="el" href="views_8h.html#a43">ofPostProcess</a>) so that by default TButton responds to these events.
<p>
<a class="el" href="classTView.html#m3">eventMask</a> is set to <a class="el" href="system_8h.html#a6">evBroadcast</a>.     </td>
  </tr>
</table>
<a name="a1" doxytag="TButton::~TButton"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
TButton::~TButton (
          </b></td>
          <td valign="bottom"><b>
)
          </b></td>
        </tr>

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

<p>
Destructor.
<p>
Frees the memory assigned to the button's title, then destroys the view with <a class="el" href="classTView.html#a1">TView::~TView</a>. <dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classTView.html#a1">TView::~TView</a> </dl>    </td>
  </tr>
</table>
<a name="b0" doxytag="TButton::TButton"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
TButton::TButton (
          </b></td>
          <td valign="bottom"><b>
<a class="el" href="ttypes_8h.html#a14">StreamableInit</a>&nbsp;)<code> [inline, protected]</code>
          </b></td>
        </tr>

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

<p>
Constructor.
<p>
Used to recover the view from a stream.
<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>. 
<p>
Definition at line <a class="el" href="dialogs_8h-source.html#l00731">731</a> of file <a class="el" href="dialogs_8h-source.html">dialogs.h</a>.    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="d0" doxytag="TButton::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 nowrap valign="top"><b> 
<a class="el" href="classTStreamable.html">TStreamable</a> * TButton::build (
          </b></td>
          <td valign="bottom"><b>
)<code> [static]</code>
          </b></td>
        </tr>

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

<p>
Creates a new TButton.
<p>
Used to recover the view from a stream. Called to create an object in certain stream-reading situations. 
<p>
Reimplemented from <a class="el" href="classTView.html#d8">TView</a>.    </td>
  </tr>
</table>
<a name="a2" doxytag="TButton::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 nowrap valign="top"><b> 
void TButton::draw (
          </b></td>
          <td valign="bottom"><b>
)<code> [virtual]</code>
          </b></td>
        </tr>

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

<p>
Draws the button by calling TButton::drawState(False). <dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classTButton.html#a3">TButton::drawState</a> </dl>
<p>
Reimplemented from <a class="el" href="classTView.html#a19">TView</a>.    </td>
  </tr>
</table>
<a name="a3" doxytag="TButton::drawState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void TButton::drawState (
          </b></td>
          <td valign="bottom"><b>
<a class="el" href="ttypes_8h.html#a13">Boolean</a> <em>down</em>&nbsp;)
          </b></td>
        </tr>

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

<p>
Called by <a class="el" href="classTButton.html#a2">draw</a>().
<p>
Draws the button in the "down" state (no shadow) if down is True; otherwise, it draws the button in the "up" state if down is False.
<p>
The appropriate palettes are used to reflect the current state (normal, default, disabled). The button label is positioned according to the <a class="el" href="dialogs_8h.html#a2">bfLeftJust</a> bit in the <a class="el" href="classTButton.html#n1">flags</a> data member.     </td>
  </tr>
</table>
<a name="a4" doxytag="TButton::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 nowrap valign="top"><b> 
<a class="el" href="classTPalette.html">TPalette</a> &amp; TButton::getPalette (
          </b></td>
          <td valign="bottom"><b>
) const<code> [virtual]</code>
          </b></td>
        </tr>

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

<p>
Returns a reference to the standard TButton palette string. 
<p>
Reimplemented from <a class="el" href="classTView.html#a46">TView</a>.    </td>
  </tr>
</table>
<a name="a5" doxytag="TButton::handleEvent"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void TButton::handleEvent (
          </b></td>
          <td valign="bottom"><b>
<a class="el" href="structTEvent.html">TEvent</a> &amp; <em>event</em>&nbsp;)<code> [virtual]</code>
          </b></td>
        </tr>

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

<p>
Handles TButton events.
<p>
Responds to being pressed in any of three ways: mouse clicks on the button, its hot key being pressed, or being the default button when a cmDefault broadcast arrives.
<p>
When the button is pressed, a command event is generated with <a class="el" href="classTView.html#a42">putEvent</a>(), with the <a class="el" href="classTButton.html#n0">command</a> data member assigned to command and infoPtr set to this.
<p>
Buttons also recognize the broadcast commands cmGrabDefault and cmReleaseDefault, to become or "unbecome" the default button, as appropriate, and cmCommandSetChanged, which causes them to check whether their commands have been enabled or disabled. 
<p>
Reimplemented from <a class="el" href="classTView.html#a41">TView</a>.    </td>
  </tr>
</table>
<a name="a6" doxytag="TButton::makeDefault"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void TButton::makeDefault (
          </b></td>
          <td valign="bottom"><b>
<a class="el" href="ttypes_8h.html#a13">Boolean</a> <em>enable</em>&nbsp;)
          </b></td>
        </tr>

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

<p>
Changes the default property of this button. Used to make this button the default with `enable' set to True, or to release the default with `enable' set to False. Three notes:
<p>
<ol>
<li>If `enable' is True, the button grabs the default property from the default button (if exists) with a cmGrabDefault broadcast command, so the default button losts the default property.<li>If `enable' is False, the button releases the default property to the default button (if exists) with a cmReleaseDefault broadcast command, so the default button gains the default property. These changes are usually the result of tabbing within a dialog box. The status is changed without actually operating the button. The default button can be subsequently "pressed" by using the Enter key. This mechanism allows a normal button (without the <a class="el" href="dialogs_8h.html#a1">bfDefault</a> bit set) to behave like a default button. The button is redrawn if necessary to show the new status.<li>This method does nothing if the button is a default button (i.e. it has the <a class="el" href="dialogs_8h.html#a1">bfDefault</a> bit set).</ol>
<dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classTButton.html#n1">TButton::flags</a> </dl>    </td>
  </tr>
</table>
<a name="a7" doxytag="TButton::press"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void TButton::press (
          </b></td>
          <td valign="bottom"><b>
)<code> [virtual]</code>
          </b></td>
        </tr>

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

<p>
This method is called whenever the button is pressed.
<p>
Its task is to send a message. The message is a broadcast message to the owner of the view if the button has the <a class="el" href="dialogs_8h.html#a3">bfBroadcast</a> bit set, otherwise the message is a command message. <dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classTButton.html#n1">TButton::flags</a>
<p>
</dl>Used internally by <a class="el" href="classTButton.html#a5">handleEvent</a>() when a mouse click "press" is detected or when the default button is "pressed" with the Enter key.     </td>
  </tr>
</table>
<a name="b2" doxytag="TButton::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 nowrap valign="top"><b> 
void * TButton::read (
          </b></td>
          <td valign="bottom"><b>
<a class="el" href="classipstream.html">ipstream</a> &amp; <em>is</em>&nbsp;)<code> [protected, virtual]</code>
          </b></td>
        </tr>

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

<p>
Used to recover the view from a stream.
<p>
Reads from the input stream `is'. 
<p>
Reimplemented from <a class="el" href="classTView.html#b2">TView</a>.    </td>
  </tr>
</table>
<a name="a8" doxytag="TButton::setState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void TButton::setState (
          </b></td>
          <td valign="bottom"><b>
<a class="el" href="ttypes_8h.html#a0">ushort</a> <em>aState</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
<a class="el" href="ttypes_8h.html#a13">Boolean</a> <em>enable</em>&nbsp;)<code> [virtual]</code>
          </b></td>
        </tr>

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

<p>
Changes the state of the button.
<p>
Calls <a class="el" href="classTButton.html#a8">setState</a>(), then calls <a class="el" href="classTView.html#a20">drawView</a>() to redraw the button if it has been made <a class="el" href="views_8h.html#a31">sfSelected</a> or <a class="el" href="views_8h.html#a30">sfActive</a>. <dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classTView.html#m4">TView::state</a>
<p>
</dl>If focus is received (that is, if `aState' is <a class="el" href="views_8h.html#a32">sfFocused</a>), the button grabs or releases default from the default button by calling <a class="el" href="classTButton.html#a6">makeDefault</a>(). 
<p>
Reimplemented from <a class="el" href="classTView.html#a50">TView</a>.    </td>
  </tr>
</table>
<a name="b1" doxytag="TButton::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 nowrap valign="top"><b> 
void TButton::write (
          </b></td>
          <td valign="bottom"><b>
<a class="el" href="classopstream.html">opstream</a> &amp; <em>os</em>&nbsp;)<code> [protected, virtual]</code>
          </b></td>
        </tr>

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

<p>
Used to store the view in a stream.
<p>
Writes to the output stream `os'. 
<p>
Reimplemented from <a class="el" href="classTView.html#b1">TView</a>.    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="n2" doxytag="TButton::amDefault"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
<a class="el" href="ttypes_8h.html#a13">Boolean</a> TButton::amDefault<code> [protected]</code>
          </b></td>
        </tr>

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

<p>
If True the button has the default property.
<p>
The default button is automatically selected when the user presses the Enter key. If this variable is False, the button is a normal button. 
<p>
Definition at line <a class="el" href="dialogs_8h-source.html#l00712">712</a> of file <a class="el" href="dialogs_8h-source.html">dialogs.h</a>.    </td>
  </tr>
</table>
<a name="n0" doxytag="TButton::command"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
<a class="el" href="ttypes_8h.html#a0">ushort</a> TButton::command<code> [protected]</code>
          </b></td>
        </tr>

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

<p>
This is the command word of the event generated when this button is pressed. 
<p>
Definition at line <a class="el" href="dialogs_8h-source.html#l00697">697</a> of file <a class="el" href="dialogs_8h-source.html">dialogs.h</a>.    </td>
  </tr>
</table>
<a name="n1" doxytag="TButton::flags"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
<a class="el" href="ttypes_8h.html#a1">uchar</a> TButton::flags<code> [protected]</code>
          </b></td>
        </tr>

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

<p>
This variabile is a bitmapped data member used to indicate whether button text is left-justified or centered.
<p>
The individual flags are the various bfXXXX constants. <dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classTButton.html#a0">TButton::TButton</a> </dl>
<p>
Definition at line <a class="el" href="dialogs_8h-source.html#l00705">705</a> of file <a class="el" href="dialogs_8h-source.html">dialogs.h</a>.    </td>
  </tr>
</table>
<a name="p1" doxytag="TButton::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 nowrap valign="top"><b> 
const char *const TButton::name<code> [static]</code>
          </b></td>
        </tr>

      </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>
Definition at line <a class="el" href="dialogs_8h-source.html#l00748">748</a> of file <a class="el" href="dialogs_8h-source.html">dialogs.h</a>.    </td>
  </tr>
</table>
<a name="p0" doxytag="TButton::shadows"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
const char * TButton::shadows<code> [static]</code>
          </b></td>
        </tr>

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

<p>
A pointer to the shadow characters.
<p>
These characters are used to draw the button shadow. 
<p>
Definition at line <a class="el" href="dialogs_8h-source.html#l00691">691</a> of file <a class="el" href="dialogs_8h-source.html">dialogs.h</a>.    </td>
  </tr>
</table>
<a name="m0" doxytag="TButton::title"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
const char * TButton::title
          </b></td>
        </tr>

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

<p>
This is a pointer to the label text of the button. 
<p>
Definition at line <a class="el" href="dialogs_8h-source.html#l00685">685</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><small>Generated at Sat Sep 22 20:19:20 2001 for TVision by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.8.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
 &copy;&nbsp;1997-2001</small></address>
</body>
</html>