Source

cappuccino-docs / cappuccino docs / cappuccino.org / learn / documentation / _c_p_button_8j_source.html

Full commit
  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
<!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">

<!-- Mirrored from cappuccino.org/learn/documentation/_c_p_button_8j_source.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:19:29 GMT -->
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Cappuccino API: AppKit/CPButton.j Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>AppKit/CPButton.j</h1><a href="_c_p_button_8j.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * CPButton.j</span>
<a name="l00003"></a>00003 <span class="comment"> * AppKit</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Created by Francisco Tolmasky.</span>
<a name="l00006"></a>00006 <span class="comment"> * Copyright 2008, 280 North, Inc.</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 Lesser General Public</span>
<a name="l00010"></a>00010 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00011"></a>00011 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00016"></a>00016 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00019"></a>00019 <span class="comment"> * License along with this library; if not, write to the Free Software</span>
<a name="l00020"></a>00020 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, 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="keyword">import</span> <span class="stringliteral">&quot;_CPImageAndTextView.j&quot;</span>
<a name="l00024"></a>00024 @<span class="keyword">import</span> <span class="stringliteral">&quot;CGGeometry.j&quot;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 @<span class="keyword">import</span> <span class="stringliteral">&quot;CPControl.j&quot;</span>
<a name="l00027"></a>00027 @<span class="keyword">import</span> <span class="stringliteral">&quot;CPStringDrawing.j&quot;</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="_c_g_geometry_8h.html">CoreGraphics/CGGeometry.h</a>&quot;</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="comment">/* @group CPBezelStyle */</span>
<a name="l00033"></a>00033 
<a name="l00034"></a><a class="code" href="_c_p_button_8j.html#a207f1b680826a03044d066de71ec1f8a">00034</a> <a class="code" href="_c_p_button_8j.html#a207f1b680826a03044d066de71ec1f8a">CPRoundedBezelStyle</a>             = 1;
<a name="l00035"></a><a class="code" href="_c_p_button_8j.html#aa07de86256642da4984f1e884086a33e">00035</a> <a class="code" href="_c_p_button_8j.html#aa07de86256642da4984f1e884086a33e">CPRegularSquareBezelStyle</a>       = 2;
<a name="l00036"></a><a class="code" href="_c_p_button_8j.html#a91ca2e524c0c1b32c0f6d55de441da3d">00036</a> <a class="code" href="_c_p_button_8j.html#a91ca2e524c0c1b32c0f6d55de441da3d">CPThickSquareBezelStyle</a>         = 3;
<a name="l00037"></a><a class="code" href="_c_p_button_8j.html#a7f564fcdce30a05c2da8db60997a9552">00037</a> <a class="code" href="_c_p_button_8j.html#a7f564fcdce30a05c2da8db60997a9552">CPThickerSquareBezelStyle</a>       = 4;
<a name="l00038"></a><a class="code" href="_c_p_button_8j.html#af2a06584d8a947009a0c4ec4652605bf">00038</a> <a class="code" href="_c_p_button_8j.html#af2a06584d8a947009a0c4ec4652605bf">CPDisclosureBezelStyle</a>          = 5;
<a name="l00039"></a><a class="code" href="_c_p_button_8j.html#afea57ee98b9fa89f47260157f97c531f">00039</a> <a class="code" href="_c_p_button_8j.html#afea57ee98b9fa89f47260157f97c531f">CPShadowlessSquareBezelStyle</a>    = 6;
<a name="l00040"></a><a class="code" href="_c_p_button_8j.html#a6820c83ac495a646c038025917444dfd">00040</a> <a class="code" href="_c_p_button_8j.html#a6820c83ac495a646c038025917444dfd">CPCircularBezelStyle</a>            = 7;
<a name="l00041"></a><a class="code" href="_c_p_button_8j.html#ae2e56f439cd8b1ed33d5fee05b89fecf">00041</a> <a class="code" href="_c_p_button_8j.html#ae2e56f439cd8b1ed33d5fee05b89fecf">CPTexturedSquareBezelStyle</a>      = 8;
<a name="l00042"></a><a class="code" href="_c_p_button_8j.html#a9d4e4294338c97a6607e825bca1ad111">00042</a> <a class="code" href="_c_p_button_8j.html#a9d4e4294338c97a6607e825bca1ad111">CPHelpButtonBezelStyle</a>          = 9;
<a name="l00043"></a><a class="code" href="_c_p_button_8j.html#a3af012a13d6169e6dc6cb788857702f2">00043</a> <a class="code" href="_c_p_button_8j.html#a3af012a13d6169e6dc6cb788857702f2">CPSmallSquareBezelStyle</a>         = 10;
<a name="l00044"></a><a class="code" href="_c_p_button_8j.html#a4ababde5a34fe7a856b7ced71baf3821">00044</a> <a class="code" href="_c_p_button_8j.html#a4ababde5a34fe7a856b7ced71baf3821">CPTexturedRoundedBezelStyle</a>     = 11;
<a name="l00045"></a><a class="code" href="_c_p_button_8j.html#a385f72ca75bac002537c8eba617383bd">00045</a> <a class="code" href="_c_p_button_8j.html#a385f72ca75bac002537c8eba617383bd">CPRoundRectBezelStyle</a>           = 12;
<a name="l00046"></a><a class="code" href="_c_p_button_8j.html#a9e5ad794b35856b3471012f36cb85b8b">00046</a> <a class="code" href="_c_p_button_8j.html#a9e5ad794b35856b3471012f36cb85b8b">CPRecessedBezelStyle</a>            = 13;
<a name="l00047"></a><a class="code" href="_c_p_button_8j.html#a95896f010878cd49f0f122388c6703ff">00047</a> <a class="code" href="_c_p_button_8j.html#a95896f010878cd49f0f122388c6703ff">CPRoundedDisclosureBezelStyle</a>   = 14;
<a name="l00048"></a><a class="code" href="_c_p_button_8j.html#a12a08b89cc3f07b7e8a8e93ecd5a91ef">00048</a> <a class="code" href="_c_p_button_8j.html#a12a08b89cc3f07b7e8a8e93ecd5a91ef">CPHUDBezelStyle</a>                 = -1;
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 <span class="comment">/* @group CPButtonType */</span>
<a name="l00052"></a><a class="code" href="_c_p_button_8j.html#a4db4061d61a64c9b579c7693bf6294b5">00052</a> <a class="code" href="_c_p_button_8j.html#a4db4061d61a64c9b579c7693bf6294b5">CPMomentaryLightButton</a>  = 0;
<a name="l00053"></a><a class="code" href="_c_p_button_8j.html#ae6c474f50085ad1c5ebeab45cd5cfdaf">00053</a> <a class="code" href="_c_p_button_8j.html#ae6c474f50085ad1c5ebeab45cd5cfdaf">CPPushOnPushOffButton</a>   = 1;
<a name="l00054"></a><a class="code" href="_c_p_button_8j.html#a1dc7a0c64e4edd74486b72d84ae254b5">00054</a> <a class="code" href="_c_p_button_8j.html#a1dc7a0c64e4edd74486b72d84ae254b5">CPToggleButton</a>          = 2;
<a name="l00055"></a><a class="code" href="_c_p_button_8j.html#a37af3072dabe645d45124faa3ee9f385">00055</a> <a class="code" href="_c_p_button_8j.html#a37af3072dabe645d45124faa3ee9f385">CPSwitchButton</a>          = 3; <span class="comment">// Deprecated, use CPCheckBox instead.</span>
<a name="l00056"></a><a class="code" href="_c_p_button_8j.html#a3278fc250dd26ee4ede81cfad7ef0051">00056</a> <a class="code" href="_c_p_button_8j.html#a3278fc250dd26ee4ede81cfad7ef0051">CPRadioButton</a>           = 4; <span class="comment">// Deprecated, use CPRadio instead.</span>
<a name="l00057"></a><a class="code" href="_c_p_button_8j.html#a0f97913542c3135419b84e157c34822a">00057</a> <a class="code" href="_c_p_button_8j.html#a0f97913542c3135419b84e157c34822a">CPMomentaryChangeButton</a> = 5;
<a name="l00058"></a><a class="code" href="_c_p_button_8j.html#a034e06781167bdb9929c343219b7fcfb">00058</a> <a class="code" href="_c_p_button_8j.html#a034e06781167bdb9929c343219b7fcfb">CPOnOffButton</a>           = 6;
<a name="l00059"></a><a class="code" href="_c_p_button_8j.html#a912edf384e3d0cfe4544e91c7d2d42d4">00059</a> <a class="code" href="_c_p_button_8j.html#a912edf384e3d0cfe4544e91c7d2d42d4">CPMomentaryPushInButton</a> = 7;
<a name="l00060"></a><a class="code" href="_c_p_button_8j.html#a828c3e5bd92640626461af41e0ae9f3b">00060</a> <a class="code" href="_c_p_button_8j.html#a828c3e5bd92640626461af41e0ae9f3b">CPMomentaryPushButton</a>   = 0;
<a name="l00061"></a><a class="code" href="_c_p_button_8j.html#a99a60cfa8b8ed3537e14d64f0fbd8438">00061</a> <a class="code" href="_c_p_button_8j.html#a99a60cfa8b8ed3537e14d64f0fbd8438">CPMomentaryLight</a>        = 7;
<a name="l00062"></a>00062 
<a name="l00063"></a><a class="code" href="_c_p_button_8j.html#ab21cabc6f8ea7e73c72fd0c7038c11cb">00063</a> <a class="code" href="_c_p_button_8j.html#ab21cabc6f8ea7e73c72fd0c7038c11cb">CPNoButtonMask</a>              = 0;
<a name="l00064"></a><a class="code" href="_c_p_button_8j.html#a7545871ad62f0cac1d77bfaa397615c4">00064</a> <a class="code" href="_c_p_button_8j.html#a7545871ad62f0cac1d77bfaa397615c4">CPContentsButtonMask</a>        = 1;
<a name="l00065"></a><a class="code" href="_c_p_button_8j.html#a05fdc909bd7701ce4995ea89d02e8c67">00065</a> <a class="code" href="_c_p_button_8j.html#a05fdc909bd7701ce4995ea89d02e8c67">CPPushInButtonMask</a>          = 2;
<a name="l00066"></a><a class="code" href="_c_p_button_8j.html#a98f8ec50f32e1dae4e43646c0cb7abd4">00066</a> <a class="code" href="_c_p_button_8j.html#a98f8ec50f32e1dae4e43646c0cb7abd4">CPGrayButtonMask</a>            = 4;
<a name="l00067"></a><a class="code" href="_c_p_button_8j.html#a8ea06993855ea23352857f937737ef4c">00067</a> <a class="code" href="_c_p_button_8j.html#a8ea06993855ea23352857f937737ef4c">CPBackgroundButtonMask</a>      = 8;
<a name="l00068"></a>00068 
<a name="l00069"></a><a class="code" href="_c_p_button_8j.html#a7511aa72f94cd2e8e89092a01b86c240">00069</a> <a class="code" href="_c_p_button_8j.html#a7511aa72f94cd2e8e89092a01b86c240">CPNoCellMask</a>                = <a class="code" href="_c_p_button_8j.html#ab21cabc6f8ea7e73c72fd0c7038c11cb">CPNoButtonMask</a>;
<a name="l00070"></a><a class="code" href="_c_p_button_8j.html#a75d12a164ac9ae40fe424dd77c399b6d">00070</a> <a class="code" href="_c_p_button_8j.html#a75d12a164ac9ae40fe424dd77c399b6d">CPContentsCellMask</a>          = <a class="code" href="_c_p_button_8j.html#a7545871ad62f0cac1d77bfaa397615c4">CPContentsButtonMask</a>;
<a name="l00071"></a><a class="code" href="_c_p_button_8j.html#a6267a1ee4219c75e4b4f356f6eee4c63">00071</a> <a class="code" href="_c_p_button_8j.html#a6267a1ee4219c75e4b4f356f6eee4c63">CPPushInCellMask</a>            = <a class="code" href="_c_p_button_8j.html#a05fdc909bd7701ce4995ea89d02e8c67">CPPushInButtonMask</a>;
<a name="l00072"></a><a class="code" href="_c_p_button_8j.html#a5993f9df1751c0bb2ad3bba7a3073319">00072</a> <a class="code" href="_c_p_button_8j.html#a5993f9df1751c0bb2ad3bba7a3073319">CPChangeGrayCellMask</a>        = <a class="code" href="_c_p_button_8j.html#a98f8ec50f32e1dae4e43646c0cb7abd4">CPGrayButtonMask</a>;
<a name="l00073"></a><a class="code" href="_c_p_button_8j.html#a345ac142982c47c2a8b0667c13469e77">00073</a> <a class="code" href="_c_p_button_8j.html#a345ac142982c47c2a8b0667c13469e77">CPChangeBackgroundCellMask</a>  = <a class="code" href="_c_p_button_8j.html#a8ea06993855ea23352857f937737ef4c">CPBackgroundButtonMask</a>;
<a name="l00074"></a>00074 
<a name="l00075"></a><a class="code" href="_c_p_button_8j.html#a253f3511e431680dce390b793b8b9c7e">00075</a> <a class="code" href="_c_p_button_8j.html#a253f3511e431680dce390b793b8b9c7e">CPButtonStateMixed</a>  = <a class="code" href="_c_p_theme_8j.html#ad6e2552ced62697350961183fed236ac">CPThemeState</a>(<span class="stringliteral">&quot;mixed&quot;</span>);
<a name="l00076"></a>00076 
<a name="l00085"></a><a class="code" href="class_c_p_button.html">00085</a> <span class="keyword">@implementation </span><a class="code" href="class_c_p_button.html">CPButton</a> : <a class="code" href="class_c_p_control.html">CPControl</a>
<a name="l00086"></a>00086 {
<a name="l00087"></a>00087     BOOL                _allowsMixedState;
<a name="l00088"></a>00088     
<a name="l00089"></a>00089     <a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>            _title;
<a name="l00090"></a>00090     <a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>            _alternateTitle;
<a name="l00091"></a>00091     
<a name="l00092"></a>00092     <a class="code" href="class_c_p_image.html">CPImage</a>             _image;
<a name="l00093"></a>00093     <a class="code" href="class_c_p_image.html">CPImage</a>             _alternateImage;
<a name="l00094"></a>00094 
<a name="l00095"></a>00095     CPInteger           _showsStateBy;
<a name="l00096"></a>00096     CPInteger           _highlightsBy;
<a name="l00097"></a>00097     BOOL                _imageDimsWhenDisabled;
<a name="l00098"></a>00098 
<a name="l00099"></a>00099     <span class="comment">// NS-style Display Properties</span>
<a name="l00100"></a>00100     CPBezelStyle        _bezelStyle;
<a name="l00101"></a>00101     CPControlSize       _controlSize;
<a name="l00102"></a>00102 }
<a name="l00103"></a>00103 
<a name="l00104"></a><a class="code" href="class_c_p_button.html#a7c74af9a10709bd4cb12d21a8afdf078">00104</a> + (id)buttonWithTitle:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aTitle
<a name="l00105"></a>00105 {
<a name="l00106"></a>00106     <span class="keywordflow">return</span> [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a61caeda2cb913c5437719d3716d43b29">buttonWithTitle</a>:aTitle <a class="code" href="class_c_p_button.html#a61caeda2cb913c5437719d3716d43b29">theme</a>:[<a class="code" href="class_c_p_theme.html">CPTheme</a> <a class="code" href="class_c_p_theme.html#a19028d2f26f8d89be574ebdbdcfa5f16">defaultTheme</a>]];
<a name="l00107"></a>00107 }
<a name="l00108"></a>00108 
<a name="l00109"></a><a class="code" href="class_c_p_button.html#a61caeda2cb913c5437719d3716d43b29">00109</a> + (id)buttonWithTitle:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aTitle theme:(<a class="code" href="class_c_p_theme.html">CPTheme</a>)aTheme
<a name="l00110"></a>00110 {
<a name="l00111"></a>00111     var button = [[<span class="keyword">self</span> alloc] init];
<a name="l00112"></a>00112 
<a name="l00113"></a>00113     [button setTheme:aTheme];
<a name="l00114"></a>00114     [button setTitle:aTitle];
<a name="l00115"></a>00115     [button sizeToFit];
<a name="l00116"></a>00116 
<a name="l00117"></a>00117     <span class="keywordflow">return</span> button;
<a name="l00118"></a>00118 }
<a name="l00119"></a>00119 
<a name="l00120"></a><a class="code" href="class_c_p_button.html#aa1ca6c1efdfdcac8095dfedc89e39f92">00120</a> + (<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)themeClass
<a name="l00121"></a>00121 {
<a name="l00122"></a>00122     <span class="keywordflow">return</span> <span class="stringliteral">@&quot;button&quot;</span>;
<a name="l00123"></a>00123 }
<a name="l00124"></a>00124 
<a name="l00125"></a><a class="code" href="class_c_p_button.html#a4fbf64da10be6d1f89fdf1aec752108b">00125</a> + (id)themeAttributes
<a name="l00126"></a>00126 {
<a name="l00127"></a>00127     <span class="keywordflow">return</span> [<a class="code" href="class_c_p_dictionary.html" title="A mutable key-value pair collection.">CPDictionary</a> <a class="code" href="class_c_p_dictionary.html#ac4d7617692c892eaed4d00de281c4c83">dictionaryWithObjects</a>:[_CGInsetMakeZero(), _CGInsetMakeZero(), [<a class="code" href="class_c_p_null.html" title="An object representation of nil.">CPNull</a> null]]
<a name="l00128"></a>00128                                        <a class="code" href="class_c_p_dictionary.html#ac4d7617692c892eaed4d00de281c4c83">forKeys</a>:[@&quot;bezel-inset&quot;, @&quot;content-inset&quot;, @&quot;bezel-color&quot;]];
<a name="l00129"></a>00129 }
<a name="l00130"></a>00130 
<a name="l00131"></a><a class="code" href="class_c_p_button.html#afb22c3bdad196ecdde17482b53360f26">00131</a> - (id)initWithFrame:(CGRect)aFrame
<a name="l00132"></a>00132 {
<a name="l00133"></a>00133     <span class="keyword">self</span> = [<span class="keyword">super</span> initWithFrame:aFrame];
<a name="l00134"></a>00134     
<a name="l00135"></a>00135     <span class="keywordflow">if</span> (<span class="keyword">self</span>)
<a name="l00136"></a>00136     {
<a name="l00137"></a>00137         <span class="comment">// Should we instead override the defaults?</span>
<a name="l00138"></a>00138         [<span class="keyword">self</span> setValue:CPCenterTextAlignment forThemeAttribute:@&quot;alignment&quot;];
<a name="l00139"></a>00139         [<span class="keyword">self</span> setValue:CPCenterVerticalTextAlignment forThemeAttribute:@&quot;vertical-alignment&quot;];
<a name="l00140"></a>00140         [<span class="keyword">self</span> setValue:CPImageLeft forThemeAttribute:@&quot;image-position&quot;];
<a name="l00141"></a>00141         [<span class="keyword">self</span> setValue:CPScaleNone forThemeAttribute:@&quot;image-scaling&quot;];
<a name="l00142"></a>00142         
<a name="l00143"></a>00143         _controlSize = <a class="code" href="_c_p_control_8j.html#a82b50db8ccc16f5dd5895d4958eaa86a">CPRegularControlSize</a>;
<a name="l00144"></a>00144         
<a name="l00145"></a>00145 <span class="comment">//        [self setBezelStyle:CPRoundRectBezelStyle];</span>
<a name="l00146"></a>00146         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#ab4bd38912589224fe944013f05ddf075">setBordered</a>:YES];
<a name="l00147"></a>00147     }
<a name="l00148"></a>00148     
<a name="l00149"></a>00149     <span class="keywordflow">return</span> <span class="keyword">self</span>;
<a name="l00150"></a>00150 }
<a name="l00151"></a>00151 
<a name="l00152"></a>00152 <span class="comment">// Setting the state</span>
<a name="l00156"></a><a class="code" href="class_c_p_button.html#a7195c57c583bd02f2c5619c36078a1da">00156</a> <span class="comment"></span>- (BOOL)allowsMixedState
<a name="l00157"></a>00157 {
<a name="l00158"></a>00158     <span class="keywordflow">return</span> _allowsMixedState;
<a name="l00159"></a>00159 }
<a name="l00160"></a>00160 
<a name="l00165"></a><a class="code" href="class_c_p_button.html#a6abbae5b108d8265ed063eb001438f0f">00165</a> - (void)setAllowsMixedState:(BOOL)aFlag
<a name="l00166"></a>00166 {
<a name="l00167"></a>00167     aFlag = !!aFlag;
<a name="l00168"></a>00168 
<a name="l00169"></a>00169     <span class="keywordflow">if</span> (_allowsMixedState === aFlag)
<a name="l00170"></a>00170         <span class="keywordflow">return</span>;
<a name="l00171"></a>00171 
<a name="l00172"></a>00172     _allowsMixedState = aFlag;
<a name="l00173"></a>00173 
<a name="l00174"></a>00174     <span class="keywordflow">if</span> (!_allowsMixedState &amp;&amp; [<span class="keyword">self</span> state] === <a class="code" href="_c_p_control_8j.html#a92c09f65447777f5abc972ecff887627">CPMixedState</a>)
<a name="l00175"></a>00175         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a6e73e626fdbe41080c183ed8f8ed7c13">setState</a>:CPOnState];
<a name="l00176"></a>00176 }
<a name="l00177"></a>00177 
<a name="l00178"></a><a class="code" href="class_c_p_button.html#ace077cd8f89436b9d1ea4ba995c70367">00178</a> - (void)setObjectValue:(<span class="keywordtype">id</span>)anObjectValue
<a name="l00179"></a>00179 {
<a name="l00180"></a>00180     <span class="keywordflow">if</span> (!anObjectValue || anObjectValue === <span class="stringliteral">@&quot;&quot;</span> || ([anObjectValue intValue] === 0))
<a name="l00181"></a>00181         anObjectValue = <a class="code" href="_c_p_control_8j.html#a20b0a4f18db100ff9f1f0092b0964f11">CPOffState</a>;
<a name="l00182"></a>00182 
<a name="l00183"></a>00183     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (![anObjectValue isKindOfClass:[<a class="code" href="class_c_p_number.html" title="A bridged object to native Javascript numbers.">CPNumber</a> <span class="keyword">class</span>]])
<a name="l00184"></a>00184         anObjectValue = <a class="code" href="_c_p_control_8j.html#ac927247dd7513ff04bb772aa70d3023f">CPOnState</a>;
<a name="l00185"></a>00185 
<a name="l00186"></a>00186     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (anObjectValue &gt; <a class="code" href="_c_p_control_8j.html#ac927247dd7513ff04bb772aa70d3023f">CPOnState</a>)
<a name="l00187"></a>00187         anObjectValue = <a class="code" href="_c_p_control_8j.html#ac927247dd7513ff04bb772aa70d3023f">CPOnState</a>
<a name="l00188"></a>00188 
<a name="l00189"></a>00189     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (anObjectValue &lt; <a class="code" href="_c_p_control_8j.html#a20b0a4f18db100ff9f1f0092b0964f11">CPOffState</a>)
<a name="l00190"></a>00190         <span class="keywordflow">if</span> ([<span class="keyword">self</span> allowsMixedState])
<a name="l00191"></a>00191             anObjectValue = <a class="code" href="_c_p_control_8j.html#a92c09f65447777f5abc972ecff887627">CPMixedState</a>;
<a name="l00192"></a>00192 
<a name="l00193"></a>00193         <span class="keywordflow">else</span>
<a name="l00194"></a>00194             anObjectValue = <a class="code" href="_c_p_control_8j.html#ac927247dd7513ff04bb772aa70d3023f">CPOnState</a>;
<a name="l00195"></a>00195 
<a name="l00196"></a>00196     [<span class="keyword">super</span> setObjectValue:anObjectValue];
<a name="l00197"></a>00197 
<a name="l00198"></a>00198     <span class="keywordflow">switch</span> ([<span class="keyword">self</span> objectValue])
<a name="l00199"></a>00199     {
<a name="l00200"></a>00200         <span class="keywordflow">case</span> <a class="code" href="_c_p_control_8j.html#a92c09f65447777f5abc972ecff887627">CPMixedState</a>:  [<span class="keyword">self</span> unsetThemeState:CPThemeStateSelected];
<a name="l00201"></a>00201                             [<span class="keyword">self</span> setThemeState:CPButtonStateMixed];
<a name="l00202"></a>00202                             <span class="keywordflow">break</span>;
<a name="l00203"></a>00203 
<a name="l00204"></a>00204         <span class="keywordflow">case</span> <a class="code" href="_c_p_control_8j.html#ac927247dd7513ff04bb772aa70d3023f">CPOnState</a>:     [<span class="keyword">self</span> unsetThemeState:CPButtonStateMixed];
<a name="l00205"></a>00205                             [<span class="keyword">self</span> setThemeState:CPThemeStateSelected];
<a name="l00206"></a>00206                             <span class="keywordflow">break</span>;
<a name="l00207"></a>00207 
<a name="l00208"></a>00208         <span class="keywordflow">case</span> <a class="code" href="_c_p_control_8j.html#a20b0a4f18db100ff9f1f0092b0964f11">CPOffState</a>:    [<span class="keyword">self</span> unsetThemeState:CPThemeStateSelected | CPButtonStateMixed];
<a name="l00209"></a>00209     }
<a name="l00210"></a>00210 }
<a name="l00211"></a>00211 
<a name="l00212"></a><a class="code" href="class_c_p_button.html#adb39d5f05192e5e8c74acc15e29e9573">00212</a> - (CPInteger)nextState
<a name="l00213"></a>00213 {
<a name="l00214"></a>00214    <span class="keywordflow">if</span> ([<span class="keyword">self</span> allowsMixedState])
<a name="l00215"></a>00215    {
<a name="l00216"></a>00216       var value = [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aaaf1c2d5c50bce5ec1fe075b668f62a8">state</a>];
<a name="l00217"></a>00217 
<a name="l00218"></a>00218       <span class="keywordflow">return</span> value - ((value === -1) ? -2 : 1);
<a name="l00219"></a>00219    }
<a name="l00220"></a>00220 
<a name="l00221"></a>00221     <span class="keywordflow">return</span> 1 - [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aaaf1c2d5c50bce5ec1fe075b668f62a8">state</a>];
<a name="l00222"></a>00222 }
<a name="l00223"></a>00223 
<a name="l00224"></a><a class="code" href="class_c_p_button.html#aa1663ac8f947af39baa8d82e68583bcf">00224</a> - (void)setNextState
<a name="l00225"></a>00225 {
<a name="l00226"></a>00226     [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a6e73e626fdbe41080c183ed8f8ed7c13">setState</a>:[<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#adb39d5f05192e5e8c74acc15e29e9573">nextState</a>]];
<a name="l00227"></a>00227 }
<a name="l00228"></a>00228 
<a name="l00234"></a><a class="code" href="class_c_p_button.html#a6e73e626fdbe41080c183ed8f8ed7c13">00234</a> - (void)setState:(CPInteger)aState
<a name="l00235"></a>00235 {
<a name="l00236"></a>00236     [<span class="keyword">self</span> setIntValue:aState];
<a name="l00237"></a>00237 }
<a name="l00238"></a>00238 
<a name="l00242"></a><a class="code" href="class_c_p_button.html#aaaf1c2d5c50bce5ec1fe075b668f62a8">00242</a> - (CPInteger)state
<a name="l00243"></a>00243 {
<a name="l00244"></a>00244     <span class="keywordflow">return</span> [<span class="keyword">self</span> intValue];
<a name="l00245"></a>00245 }
<a name="l00246"></a>00246 
<a name="l00247"></a><a class="code" href="class_c_p_button.html#a50d7ea362f0c65a12ef538d59ebe5684">00247</a> - (void)setTitle:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aTitle
<a name="l00248"></a>00248 {
<a name="l00249"></a>00249     <span class="keywordflow">if</span> (_title === aTitle)
<a name="l00250"></a>00250         <span class="keywordflow">return</span>;
<a name="l00251"></a>00251     
<a name="l00252"></a>00252     _title = aTitle;
<a name="l00253"></a>00253     
<a name="l00254"></a>00254     [<span class="keyword">self</span> setNeedsLayout];
<a name="l00255"></a>00255     [<span class="keyword">self</span> setNeedsDisplay:YES];
<a name="l00256"></a>00256 }
<a name="l00257"></a>00257 
<a name="l00258"></a><a class="code" href="class_c_p_button.html#aafcbe2a896b8bb157c799b2cd182732c">00258</a> - (<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)title
<a name="l00259"></a>00259 {
<a name="l00260"></a>00260     <span class="keywordflow">return</span> _title;
<a name="l00261"></a>00261 }
<a name="l00262"></a>00262 
<a name="l00263"></a><a class="code" href="class_c_p_button.html#a4217c9128b9da57963a0e996550750f7">00263</a> - (void)setAlternateTitle:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aTitle
<a name="l00264"></a>00264 {
<a name="l00265"></a>00265     <span class="keywordflow">if</span> (_alternateTitle === aTitle)
<a name="l00266"></a>00266         <span class="keywordflow">return</span>;
<a name="l00267"></a>00267     
<a name="l00268"></a>00268     _alternateTitle = aTitle;
<a name="l00269"></a>00269 
<a name="l00270"></a>00270     [<span class="keyword">self</span> setNeedsLayout];
<a name="l00271"></a>00271     [<span class="keyword">self</span> setNeedsDisplay:YES];
<a name="l00272"></a>00272 }
<a name="l00273"></a>00273 
<a name="l00274"></a><a class="code" href="class_c_p_button.html#a4800e002492d340a8111d5de27aac2fc">00274</a> - (<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)alternateTitle
<a name="l00275"></a>00275 {
<a name="l00276"></a>00276     <span class="keywordflow">return</span> _alternateTitle;
<a name="l00277"></a>00277 }
<a name="l00278"></a>00278 
<a name="l00279"></a><a class="code" href="class_c_p_button.html#ac944a76b467e4cbf802880c852c653f9">00279</a> - (void)setImage:(<a class="code" href="class_c_p_image.html">CPImage</a>)anImage
<a name="l00280"></a>00280 {
<a name="l00281"></a>00281     <span class="keywordflow">if</span> (_image === anImage)
<a name="l00282"></a>00282         <span class="keywordflow">return</span>;
<a name="l00283"></a>00283     
<a name="l00284"></a>00284     _image = anImage;
<a name="l00285"></a>00285     
<a name="l00286"></a>00286     [<span class="keyword">self</span> setNeedsLayout];
<a name="l00287"></a>00287     [<span class="keyword">self</span> setNeedsDisplay:YES];
<a name="l00288"></a>00288 }
<a name="l00289"></a>00289 
<a name="l00290"></a><a class="code" href="class_c_p_button.html#a4e406994e18c5961bc500757c61db382">00290</a> - (<a class="code" href="class_c_p_image.html">CPImage</a>)image
<a name="l00291"></a>00291 {
<a name="l00292"></a>00292     <span class="keywordflow">return</span> _image;
<a name="l00293"></a>00293 }
<a name="l00294"></a>00294 
<a name="l00299"></a><a class="code" href="class_c_p_button.html#a56654c0a6e47d47f93f6f1d2518304b4">00299</a> - (void)setAlternateImage:(<a class="code" href="class_c_p_image.html">CPImage</a>)anImage
<a name="l00300"></a>00300 {
<a name="l00301"></a>00301     <span class="keywordflow">if</span> (_alternateImage === anImage)
<a name="l00302"></a>00302         <span class="keywordflow">return</span>;
<a name="l00303"></a>00303     
<a name="l00304"></a>00304     _alternateImage = anImage;
<a name="l00305"></a>00305     
<a name="l00306"></a>00306     [<span class="keyword">self</span> setNeedsLayout];
<a name="l00307"></a>00307     [<span class="keyword">self</span> setNeedsDisplay:YES];
<a name="l00308"></a>00308 }
<a name="l00309"></a>00309 
<a name="l00313"></a><a class="code" href="class_c_p_button.html#a1549717791bd8aaba280a32d2a0fdc08">00313</a> - (<a class="code" href="class_c_p_image.html">CPImage</a>)alternateImage
<a name="l00314"></a>00314 {
<a name="l00315"></a>00315     <span class="keywordflow">return</span> _alternateImage;
<a name="l00316"></a>00316 }
<a name="l00317"></a>00317 
<a name="l00318"></a><a class="code" href="class_c_p_button.html#aee9ea8acd2baf5b8ab46174021c547e2">00318</a> - (void)setShowsStateBy:(CPInteger)aMask
<a name="l00319"></a>00319 {
<a name="l00320"></a>00320     <span class="keywordflow">if</span> (_showsStateBy === aMask)
<a name="l00321"></a>00321         <span class="keywordflow">return</span>;
<a name="l00322"></a>00322 
<a name="l00323"></a>00323     _showsStateBy = aMask;
<a name="l00324"></a>00324 
<a name="l00325"></a>00325     [<span class="keyword">self</span> setNeedsDisplay:YES];
<a name="l00326"></a>00326     [<span class="keyword">self</span> setNeedsLayout];
<a name="l00327"></a>00327 }
<a name="l00328"></a>00328 
<a name="l00329"></a><a class="code" href="class_c_p_button.html#a2dbab1134d62e8eb46bc29451d70193c">00329</a> - (CPInteger)showsStateBy
<a name="l00330"></a>00330 {
<a name="l00331"></a>00331     <span class="keywordflow">return</span> _showsStateBy;
<a name="l00332"></a>00332 }
<a name="l00333"></a>00333 
<a name="l00334"></a><a class="code" href="class_c_p_button.html#a72e35f0c7f20f6874b4e7eddb89531b5">00334</a> - (void)setHighlightsBy:(CPInteger)aMask
<a name="l00335"></a>00335 {
<a name="l00336"></a>00336     <span class="keywordflow">if</span> (_highlightsBy === aMask)
<a name="l00337"></a>00337         <span class="keywordflow">return</span>;
<a name="l00338"></a>00338 
<a name="l00339"></a>00339     _highlightsBy = aMask;
<a name="l00340"></a>00340 
<a name="l00341"></a>00341     <span class="keywordflow">if</span> ([<span class="keyword">self</span> hasThemeState:<a class="code" href="_c_p_theme_8j.html#aa68f7cdbec02d10022cccba055493bec">CPThemeStateHighlighted</a>])
<a name="l00342"></a>00342     {
<a name="l00343"></a>00343         [<span class="keyword">self</span> setNeedsDisplay:YES];
<a name="l00344"></a>00344         [<span class="keyword">self</span> setNeedsLayout];
<a name="l00345"></a>00345     }
<a name="l00346"></a>00346 }
<a name="l00347"></a>00347 
<a name="l00348"></a><a class="code" href="class_c_p_button.html#ad07d6dce612537d97936614beb2d959f">00348</a> - (void)setButtonType:(CPButtonType)aButtonType
<a name="l00349"></a>00349 {
<a name="l00350"></a>00350     <span class="keywordflow">switch</span> (aButtonType)
<a name="l00351"></a>00351     {
<a name="l00352"></a>00352         <span class="keywordflow">case</span> <a class="code" href="_c_p_button_8j.html#a4db4061d61a64c9b579c7693bf6294b5">CPMomentaryLightButton</a>:    [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a72e35f0c7f20f6874b4e7eddb89531b5">setHighlightsBy</a>:CPChangeBackgroundCellMask];
<a name="l00353"></a>00353                                         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aee9ea8acd2baf5b8ab46174021c547e2">setShowsStateBy</a>:CPNoCellMask];
<a name="l00354"></a>00354                                         <span class="keywordflow">break</span>;
<a name="l00355"></a>00355 
<a name="l00356"></a>00356         <span class="keywordflow">case</span> <a class="code" href="_c_p_button_8j.html#a912edf384e3d0cfe4544e91c7d2d42d4">CPMomentaryPushInButton</a>:   [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a72e35f0c7f20f6874b4e7eddb89531b5">setHighlightsBy</a>:CPPushInCellMask | CPChangeGrayCellMask];
<a name="l00357"></a>00357                                         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aee9ea8acd2baf5b8ab46174021c547e2">setShowsStateBy</a>:CPNoCellMask];
<a name="l00358"></a>00358                                         <span class="keywordflow">break</span>;
<a name="l00359"></a>00359 
<a name="l00360"></a>00360         <span class="keywordflow">case</span> <a class="code" href="_c_p_button_8j.html#a0f97913542c3135419b84e157c34822a">CPMomentaryChangeButton</a>:   [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a72e35f0c7f20f6874b4e7eddb89531b5">setHighlightsBy</a>:CPContentsCellMask];
<a name="l00361"></a>00361                                         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aee9ea8acd2baf5b8ab46174021c547e2">setShowsStateBy</a>:CPNoCellMask];
<a name="l00362"></a>00362                                         <span class="keywordflow">break</span>;
<a name="l00363"></a>00363 
<a name="l00364"></a>00364         <span class="keywordflow">case</span> <a class="code" href="_c_p_button_8j.html#ae6c474f50085ad1c5ebeab45cd5cfdaf">CPPushOnPushOffButton</a>:     [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a72e35f0c7f20f6874b4e7eddb89531b5">setHighlightsBy</a>:CPPushInCellMask | CPChangeGrayCellMask];
<a name="l00365"></a>00365                                         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aee9ea8acd2baf5b8ab46174021c547e2">setShowsStateBy</a>:CPChangeBackgroundCellMask];
<a name="l00366"></a>00366                                         <span class="keywordflow">break</span>;
<a name="l00367"></a>00367 
<a name="l00368"></a>00368         <span class="keywordflow">case</span> <a class="code" href="_c_p_button_8j.html#a034e06781167bdb9929c343219b7fcfb">CPOnOffButton</a>:             [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a72e35f0c7f20f6874b4e7eddb89531b5">setHighlightsBy</a>:CPChangeBackgroundCellMask];
<a name="l00369"></a>00369                                         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aee9ea8acd2baf5b8ab46174021c547e2">setShowsStateBy</a>:CPChangeBackgroundCellMask];
<a name="l00370"></a>00370                                         <span class="keywordflow">break</span>;
<a name="l00371"></a>00371 
<a name="l00372"></a>00372         <span class="keywordflow">case</span> <a class="code" href="_c_p_button_8j.html#a1dc7a0c64e4edd74486b72d84ae254b5">CPToggleButton</a>:            [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a72e35f0c7f20f6874b4e7eddb89531b5">setHighlightsBy</a>:CPPushInCellMask | CPContentsCellMask];
<a name="l00373"></a>00373                                         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aee9ea8acd2baf5b8ab46174021c547e2">setShowsStateBy</a>:CPContentsCellMask];
<a name="l00374"></a>00374                                         <span class="keywordflow">break</span>;
<a name="l00375"></a>00375 
<a name="l00376"></a>00376         <span class="keywordflow">case</span> <a class="code" href="_c_p_button_8j.html#a37af3072dabe645d45124faa3ee9f385">CPSwitchButton</a>:            [<a class="code" href="class_c_p_exception.html" title="Used to implement exception handling (creating &amp;amp; raising).">CPException</a> <a class="code" href="class_c_p_exception.html#ac8f34bd11868822e26a7b952810128b8">raise</a>:CPInvalidArgumentException 
<a name="l00377"></a>00377                                                     <a class="code" href="class_c_p_exception.html#ac8f34bd11868822e26a7b952810128b8">reason</a>:&quot;The CPSwitchButton type is not supported in Cappuccino, use the CPCheckBox class instead.&quot;];
<a name="l00378"></a>00378 
<a name="l00379"></a>00379         <span class="keywordflow">case</span> <a class="code" href="_c_p_button_8j.html#a3278fc250dd26ee4ede81cfad7ef0051">CPRadioButton</a>:             [<a class="code" href="class_c_p_exception.html" title="Used to implement exception handling (creating &amp;amp; raising).">CPException</a> <a class="code" href="class_c_p_exception.html#ac8f34bd11868822e26a7b952810128b8">raise</a>:CPInvalidArgumentException 
<a name="l00380"></a>00380                                                     <a class="code" href="class_c_p_exception.html#ac8f34bd11868822e26a7b952810128b8">reason</a>:&quot;The CPRadioButton type is not supported in Cappuccino, use the CPRadio class instead.&quot;];
<a name="l00381"></a>00381 
<a name="l00382"></a>00382         <span class="keywordflow">default</span>:                        [<a class="code" href="class_c_p_exception.html" title="Used to implement exception handling (creating &amp;amp; raising).">CPException</a> <a class="code" href="class_c_p_exception.html#ac8f34bd11868822e26a7b952810128b8">raise</a>:CPInvalidArgumentException 
<a name="l00383"></a>00383                                                     <a class="code" href="class_c_p_exception.html#ac8f34bd11868822e26a7b952810128b8">reason</a>:&quot;Unknown button type.&quot;];
<a name="l00384"></a>00384     }
<a name="l00385"></a>00385 
<a name="l00386"></a>00386     [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a36bb3ca0c942495ca35d54955fff4407">setImageDimsWhenDisabled</a>:YES];
<a name="l00387"></a>00387 }
<a name="l00388"></a>00388 
<a name="l00389"></a><a class="code" href="class_c_p_button.html#a36bb3ca0c942495ca35d54955fff4407">00389</a> - (void)setImageDimsWhenDisabled:(BOOL)imageShouldDimWhenDisabled
<a name="l00390"></a>00390 {
<a name="l00391"></a>00391     imageShouldDimWhenDisabled = !!imageShouldDimWhenDisabled;
<a name="l00392"></a>00392 
<a name="l00393"></a>00393     <span class="keywordflow">if</span> (_imageDimsWhenDisabled === imageShouldDimWhenDisabled)
<a name="l00394"></a>00394         <span class="keywordflow">return</span>;
<a name="l00395"></a>00395 
<a name="l00396"></a>00396     _imageDimsWhenDisabled = imageShouldDimWhenDisabled;
<a name="l00397"></a>00397 
<a name="l00398"></a>00398     <span class="keywordflow">if</span> (_imageDimsWhenDisabled)
<a name="l00399"></a>00399     {
<a name="l00400"></a>00400         [<span class="keyword">self</span> setNeedsDisplay:YES];
<a name="l00401"></a>00401         [<span class="keyword">self</span> setNeedsLayout];
<a name="l00402"></a>00402     }
<a name="l00403"></a>00403 }
<a name="l00404"></a>00404 
<a name="l00405"></a><a class="code" href="class_c_p_button.html#a9d764fd23cbbe3c9180dcd89c2434fb6">00405</a> - (BOOL)imageDimsWhenDisabled
<a name="l00406"></a>00406 {
<a name="l00407"></a>00407     <span class="keywordflow">return</span> _imageDimsWhenDisabled;
<a name="l00408"></a>00408 }
<a name="l00409"></a>00409 
<a name="l00410"></a><a class="code" href="class_c_p_button.html#a1fab798da9422db1241cfd9c2350b7ac">00410</a> - (BOOL)startTrackingAt:(CGPoint)aPoint
<a name="l00411"></a>00411 {
<a name="l00412"></a>00412     [<span class="keyword">self</span> highlight:YES];
<a name="l00413"></a>00413     
<a name="l00414"></a>00414     <span class="keywordflow">return</span> [<span class="keyword">super</span> startTrackingAt:aPoint];
<a name="l00415"></a>00415 }
<a name="l00416"></a>00416 
<a name="l00417"></a><a class="code" href="class_c_p_button.html#a4e739cdf65e34629983db81882dbe307">00417</a> - (void)stopTracking:(CGPoint)lastPoint at:(CGPoint)aPoint mouseIsUp:(BOOL)mouseIsUp
<a name="l00418"></a>00418 {
<a name="l00419"></a>00419     [<span class="keyword">self</span> highlight:NO];
<a name="l00420"></a>00420 
<a name="l00421"></a>00421     [<span class="keyword">super</span> stopTracking:lastPoint at:aPoint mouseIsUp:mouseIsUp];
<a name="l00422"></a>00422 
<a name="l00423"></a>00423     <span class="keywordflow">if</span> (mouseIsUp &amp;&amp; <a class="code" href="_c_g_geometry_8j.html#a1a96c087c2dc31ab61c3c88a3c6ec7c5">CGRectContainsPoint</a>([<span class="keyword">self</span> bounds], aPoint))
<a name="l00424"></a>00424         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aa1663ac8f947af39baa8d82e68583bcf">setNextState</a>];
<a name="l00425"></a>00425 }
<a name="l00426"></a>00426 
<a name="l00427"></a><a class="code" href="class_c_p_button.html#a739bbcc8710ac6b35aeb41cc89fc8252">00427</a> - (CGRect)contentRectForBounds:(CGRect)bounds
<a name="l00428"></a>00428 {
<a name="l00429"></a>00429     var contentInset = [<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;content-inset&quot;];
<a name="l00430"></a>00430 
<a name="l00431"></a>00431     <span class="keywordflow">if</span> (_CGInsetIsEmpty(contentInset))
<a name="l00432"></a>00432         <span class="keywordflow">return</span> bounds;
<a name="l00433"></a>00433 
<a name="l00434"></a>00434     bounds.origin.x += contentInset.left;
<a name="l00435"></a>00435     bounds.origin.y += contentInset.top;
<a name="l00436"></a>00436     bounds.size.width -= contentInset.left + contentInset.right;
<a name="l00437"></a>00437     bounds.size.height -= contentInset.top + contentInset.bottom;
<a name="l00438"></a>00438     
<a name="l00439"></a>00439     <span class="keywordflow">return</span> bounds;
<a name="l00440"></a>00440 }
<a name="l00441"></a>00441 
<a name="l00442"></a><a class="code" href="class_c_p_button.html#aa64f59537499c8d0a1b41754abb393c2">00442</a> - (CGRect)bezelRectForBounds:(CGRect)bounds
<a name="l00443"></a>00443 {
<a name="l00444"></a>00444     <span class="keywordflow">if</span> (![<span class="keyword">self</span> isBordered])
<a name="l00445"></a>00445         <span class="keywordflow">return</span> _CGRectMakeZero();
<a name="l00446"></a>00446 
<a name="l00447"></a>00447     var bezelInset = [<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;bezel-inset&quot;];
<a name="l00448"></a>00448 
<a name="l00449"></a>00449     <span class="keywordflow">if</span> (_CGInsetIsEmpty(bezelInset))
<a name="l00450"></a>00450         <span class="keywordflow">return</span> bounds;
<a name="l00451"></a>00451 
<a name="l00452"></a>00452     bounds.origin.x += bezelInset.left;
<a name="l00453"></a>00453     bounds.origin.y += bezelInset.top;
<a name="l00454"></a>00454     bounds.size.width -= bezelInset.left + bezelInset.right;
<a name="l00455"></a>00455     bounds.size.height -= bezelInset.top + bezelInset.bottom;
<a name="l00456"></a>00456 
<a name="l00457"></a>00457     <span class="keywordflow">return</span> bounds;
<a name="l00458"></a>00458 }
<a name="l00459"></a>00459 
<a name="l00463"></a><a class="code" href="class_c_p_button.html#a9dab50382b15564a320b091506c0b6c6">00463</a> - (void)sizeToFit
<a name="l00464"></a>00464 {
<a name="l00465"></a>00465     var <a class="code" href="_c_p_screen_8j.html#ad241596b0d0f8cbdd1529d94ea71337b">size</a> = [([<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aafcbe2a896b8bb157c799b2cd182732c">title</a>] || &quot; &quot;) <a class="code" href="class_c_p_string.html#a9042937019e6d3ef7784e26ab80969db">sizeWithFont</a>:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;font&quot;]],
<a name="l00466"></a>00466         contentInset = [<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;content-inset&quot;],
<a name="l00467"></a>00467         minSize = [<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;min-size&quot;],
<a name="l00468"></a>00468         maxSize = [<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;max-size&quot;];
<a name="l00469"></a>00469 
<a name="l00470"></a>00470     <a class="code" href="_c_p_screen_8j.html#ad241596b0d0f8cbdd1529d94ea71337b">size</a>.width = <a class="code" href="_c_p_obj_j_runtime_8j.html#a45f5f88d061da0c18bcb6b6a854fe898">MAX</a>(<a class="code" href="_c_p_screen_8j.html#ad241596b0d0f8cbdd1529d94ea71337b">size</a>.width + contentInset.left + contentInset.right, minSize.width);
<a name="l00471"></a>00471     <a class="code" href="_c_p_screen_8j.html#ad241596b0d0f8cbdd1529d94ea71337b">size</a>.height = <a class="code" href="_c_p_obj_j_runtime_8j.html#a45f5f88d061da0c18bcb6b6a854fe898">MAX</a>(<a class="code" href="_c_p_screen_8j.html#ad241596b0d0f8cbdd1529d94ea71337b">size</a>.height + contentInset.top + contentInset.bottom, minSize.height);
<a name="l00472"></a>00472 
<a name="l00473"></a>00473     <span class="keywordflow">if</span> (maxSize.width &gt;= 0.0)
<a name="l00474"></a>00474         <a class="code" href="_c_p_screen_8j.html#ad241596b0d0f8cbdd1529d94ea71337b">size</a>.width = <a class="code" href="_c_p_obj_j_runtime_8j.html#a4fca277171215842609dc38a6f0c19fb">MIN</a>(<a class="code" href="_c_p_screen_8j.html#ad241596b0d0f8cbdd1529d94ea71337b">size</a>.width, maxSize.width);
<a name="l00475"></a>00475 
<a name="l00476"></a>00476     <span class="keywordflow">if</span> (maxSize.height &gt;= 0.0)
<a name="l00477"></a>00477         <a class="code" href="_c_p_screen_8j.html#ad241596b0d0f8cbdd1529d94ea71337b">size</a>.height = <a class="code" href="_c_p_obj_j_runtime_8j.html#a4fca277171215842609dc38a6f0c19fb">MIN</a>(<a class="code" href="_c_p_screen_8j.html#ad241596b0d0f8cbdd1529d94ea71337b">size</a>.height, maxSize.height);
<a name="l00478"></a>00478 
<a name="l00479"></a>00479     [<span class="keyword">self</span> setFrameSize:size];
<a name="l00480"></a>00480 }
<a name="l00481"></a>00481 
<a name="l00482"></a><a class="code" href="class_c_p_button.html#a8c7e0fd79e24bbf12cd999ef268a9c71">00482</a> - (CGRect)rectForEphemeralSubviewNamed:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aName
<a name="l00483"></a>00483 {
<a name="l00484"></a>00484     <span class="keywordflow">if</span> (aName === <span class="stringliteral">&quot;bezel-view&quot;</span>)
<a name="l00485"></a>00485         <span class="keywordflow">return</span> [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#aa64f59537499c8d0a1b41754abb393c2">bezelRectForBounds</a>:[<span class="keyword">self</span> bounds]];
<a name="l00486"></a>00486     
<a name="l00487"></a>00487     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (aName === <span class="stringliteral">&quot;content-view&quot;</span>)
<a name="l00488"></a>00488         <span class="keywordflow">return</span> [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a739bbcc8710ac6b35aeb41cc89fc8252">contentRectForBounds</a>:[<span class="keyword">self</span> bounds]];
<a name="l00489"></a>00489     
<a name="l00490"></a>00490     <span class="keywordflow">return</span> [<span class="keyword">super</span> rectForEphemeralSubviewNamed:aName];
<a name="l00491"></a>00491 }
<a name="l00492"></a>00492 
<a name="l00493"></a><a class="code" href="class_c_p_button.html#a3aea6067759046903fb82e99625bb0b7">00493</a> - (<a class="code" href="class_c_p_view.html">CPView</a>)createEphemeralSubviewNamed:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aName
<a name="l00494"></a>00494 {
<a name="l00495"></a>00495     <span class="keywordflow">if</span> (aName === <span class="stringliteral">&quot;bezel-view&quot;</span>)
<a name="l00496"></a>00496     {
<a name="l00497"></a>00497         var view = [[<a class="code" href="class_c_p_view.html">CPView</a> alloc] initWithFrame:_CGRectMakeZero()];
<a name="l00498"></a>00498 
<a name="l00499"></a>00499         [view setHitTests:NO];
<a name="l00500"></a>00500         
<a name="l00501"></a>00501         <span class="keywordflow">return</span> view;
<a name="l00502"></a>00502     }
<a name="l00503"></a>00503     <span class="keywordflow">else</span>
<a name="l00504"></a>00504         <span class="keywordflow">return</span> [[_CPImageAndTextView alloc] initWithFrame:_CGRectMakeZero()];
<a name="l00505"></a>00505 }
<a name="l00506"></a>00506 
<a name="l00507"></a><a class="code" href="class_c_p_button.html#a0c278d568572de8f5698b7e09e2fde80">00507</a> - (void)layoutSubviews
<a name="l00508"></a>00508 {
<a name="l00509"></a>00509     var bezelView = [<span class="keyword">self</span> layoutEphemeralSubviewNamed:@&quot;bezel-view&quot;
<a name="l00510"></a>00510                                            positioned:CPWindowBelow
<a name="l00511"></a>00511                       relativeToEphemeralSubviewNamed:@&quot;content-view&quot;];
<a name="l00512"></a>00512 
<a name="l00513"></a>00513     [bezelView setBackgroundColor:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;bezel-color&quot;]];
<a name="l00514"></a>00514 
<a name="l00515"></a>00515     var contentView = [<span class="keyword">self</span> layoutEphemeralSubviewNamed:@&quot;content-view&quot;
<a name="l00516"></a>00516                                              positioned:CPWindowAbove
<a name="l00517"></a>00517                         relativeToEphemeralSubviewNamed:@&quot;bezel-view&quot;];
<a name="l00518"></a>00518 
<a name="l00519"></a>00519     <span class="keywordflow">if</span> (contentView)
<a name="l00520"></a>00520     {
<a name="l00521"></a>00521         [contentView setText:([<span class="keyword">self</span> hasThemeState:CPThemeStateHighlighted] &amp;&amp; _alternateTitle) ? _alternateTitle : _title];
<a name="l00522"></a>00522         [contentView setImage:([<span class="keyword">self</span> hasThemeState:CPThemeStateHighlighted] &amp;&amp; _alternateImage) ? _alternateImage : _image];
<a name="l00523"></a>00523 
<a name="l00524"></a>00524         [contentView setFont:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;font&quot;]];
<a name="l00525"></a>00525         [contentView setTextColor:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;text-color&quot;]];
<a name="l00526"></a>00526         [contentView setAlignment:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;alignment&quot;]];
<a name="l00527"></a>00527         [contentView setVerticalAlignment:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;vertical-alignment&quot;]];
<a name="l00528"></a>00528         [contentView setLineBreakMode:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;line-break-mode&quot;]];
<a name="l00529"></a>00529         [contentView setTextShadowColor:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;text-shadow-color&quot;]];
<a name="l00530"></a>00530         [contentView setTextShadowOffset:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;text-shadow-offset&quot;]];
<a name="l00531"></a>00531         [contentView setImagePosition:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;image-position&quot;]];
<a name="l00532"></a>00532         [contentView setImageScaling:[<span class="keyword">self</span> currentValueForThemeAttribute:@&quot;image-scaling&quot;]];
<a name="l00533"></a>00533     }
<a name="l00534"></a>00534 }
<a name="l00535"></a>00535 
<a name="l00536"></a><a class="code" href="class_c_p_button.html#a0a5d89e8904662a7118e035877dbd579">00536</a> - (void)setDefaultButton:(BOOL)shouldBeDefaultButton
<a name="l00537"></a>00537 {
<a name="l00538"></a>00538     <span class="keywordflow">if</span> (shouldBeDefaultButton)
<a name="l00539"></a>00539         [<span class="keyword">self</span> setThemeState:CPThemeStateDefault];
<a name="l00540"></a>00540     <span class="keywordflow">else</span>
<a name="l00541"></a>00541         [<span class="keyword">self</span> unsetThemeState:CPThemeStateDefault];
<a name="l00542"></a>00542 }
<a name="l00543"></a>00543 
<a name="l00544"></a><a class="code" href="class_c_p_button.html#ab4bd38912589224fe944013f05ddf075">00544</a> - (void)setBordered:(BOOL)shouldBeBordered
<a name="l00545"></a>00545 {
<a name="l00546"></a>00546     <span class="keywordflow">if</span> (shouldBeBordered)
<a name="l00547"></a>00547         [<span class="keyword">self</span> setThemeState:CPThemeStateBordered];
<a name="l00548"></a>00548     <span class="keywordflow">else</span>
<a name="l00549"></a>00549         [<span class="keyword">self</span> unsetThemeState:CPThemeStateBordered];
<a name="l00550"></a>00550 }
<a name="l00551"></a>00551 
<a name="l00552"></a><a class="code" href="class_c_p_button.html#a916a1b5704e5f758059631b25242d959">00552</a> - (BOOL)isBordered
<a name="l00553"></a>00553 {
<a name="l00554"></a>00554     <span class="keywordflow">return</span> [<span class="keyword">self</span> hasThemeState:CPThemeStateBordered];
<a name="l00555"></a>00555 }
<a name="l00556"></a>00556 
<a name="l00557"></a>00557 <span class="keyword">@end</span>
<a name="l00558"></a>00558 
<a name="l00559"></a>00559 <span class="keyword">@implementation </span><a class="code" href="class_c_p_button.html">CPButton</a> (NS)
<a name="l00560"></a>00560 
<a name="l00561"></a><a class="code" href="class_c_p_button.html#ae26ef1d9eca07f4e588c29a757d4d17e">00561</a> - (void)setBezelStyle:(<span class="keywordtype">unsigned</span>)aBezelStyle
<a name="l00562"></a>00562 {
<a name="l00563"></a>00563 }
<a name="l00564"></a>00564 
<a name="l00565"></a><a class="code" href="class_c_p_button.html#ae11dc0cf4fff58c351bde29b6ca71f64">00565</a> - (unsigned)<a class="code" href="class_c_p_button.html#ae11dc0cf4fff58c351bde29b6ca71f64">bezelStyle</a>
<a name="l00566"></a>00566 {
<a name="l00567"></a>00567 }
<a name="l00568"></a>00568 
<a name="l00569"></a>00569 <span class="keyword">@end</span>
<a name="l00570"></a>00570 
<a name="l00571"></a>00571 
<a name="l00572"></a><a class="code" href="_c_p_button_8j.html#a58b4348ea1a919144b72725b8a319dcf">00572</a> var <a class="code" href="_c_p_button_8j.html#a58b4348ea1a919144b72725b8a319dcf">CPButtonImageKey</a>                = <span class="stringliteral">@&quot;CPButtonImageKey&quot;</span>,
<a name="l00573"></a><a class="code" href="_c_p_button_8j.html#afdc5595f9e31045f4b2c29e03c08fcb1">00573</a>     <a class="code" href="_c_p_button_8j.html#afdc5595f9e31045f4b2c29e03c08fcb1">CPButtonAlternateImageKey</a>       = <span class="stringliteral">@&quot;CPButtonAlternateImageKey&quot;</span>,
<a name="l00574"></a><a class="code" href="_c_p_button_8j.html#a5228b61d4e079fbb8e19dfcca254c721">00574</a>     <a class="code" href="_c_p_button_8j.html#a5228b61d4e079fbb8e19dfcca254c721">CPButtonTitleKey</a>                = <span class="stringliteral">@&quot;CPButtonTitleKey&quot;</span>,
<a name="l00575"></a><a class="code" href="_c_p_button_8j.html#a358637f1ce125f77a713851a6c7188ff">00575</a>     <a class="code" href="_c_p_button_8j.html#a358637f1ce125f77a713851a6c7188ff">CPButtonAlternateTitleKey</a>       = <span class="stringliteral">@&quot;CPButtonAlternateTitleKey&quot;</span>,
<a name="l00576"></a><a class="code" href="_c_p_button_8j.html#a19f86e4127a2b9fbb34a7a8b35accde4">00576</a>     <a class="code" href="_c_p_button_8j.html#a19f86e4127a2b9fbb34a7a8b35accde4">CPButtonIsBorderedKey</a>           = <span class="stringliteral">@&quot;CPButtonIsBorderedKey&quot;</span>;
<a name="l00577"></a>00577 
<a name="l00578"></a>00578 <span class="keyword">@implementation </span><a class="code" href="class_c_p_button.html">CPButton</a> (CPCoding)
<a name="l00579"></a>00579 
<a name="l00584"></a><a class="code" href="class_c_p_button.html#ad485e8309f60d57e31c0c18b54d20b08">00584</a> - (id)initWithCoder:(<a class="code" href="class_c_p_coder.html" title="Defines methods for use when archiving &amp;amp; restoring (enc/decoding).">CPCoder</a>)aCoder
<a name="l00585"></a>00585 {
<a name="l00586"></a>00586     <span class="keyword">self</span> = [<span class="keyword">super</span> initWithCoder:aCoder];
<a name="l00587"></a>00587     
<a name="l00588"></a>00588     <span class="keywordflow">if</span> (<span class="keyword">self</span>)
<a name="l00589"></a>00589     {
<a name="l00590"></a>00590         _controlSize = <a class="code" href="_c_p_control_8j.html#a82b50db8ccc16f5dd5895d4958eaa86a">CPRegularControlSize</a>;
<a name="l00591"></a>00591 
<a name="l00592"></a>00592         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#ac944a76b467e4cbf802880c852c653f9">setImage</a>:[aCoder decodeObjectForKey:CPButtonImageKey]];
<a name="l00593"></a>00593         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a56654c0a6e47d47f93f6f1d2518304b4">setAlternateImage</a>:[aCoder decodeObjectForKey:CPButtonAlternateImageKey]];
<a name="l00594"></a>00594         
<a name="l00595"></a>00595         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a50d7ea362f0c65a12ef538d59ebe5684">setTitle</a>:[aCoder decodeObjectForKey:CPButtonTitleKey]];
<a name="l00596"></a>00596         [<span class="keyword">self</span> <a class="code" href="class_c_p_button.html#a4217c9128b9da57963a0e996550750f7">setAlternateTitle</a>:[aCoder decodeObjectForKey:CPButtonAlternateTitleKey]];
<a name="l00597"></a>00597         
<a name="l00598"></a>00598         [<span class="keyword">self</span> setNeedsLayout];
<a name="l00599"></a>00599         [<span class="keyword">self</span> setNeedsDisplay:YES];
<a name="l00600"></a>00600     }
<a name="l00601"></a>00601     
<a name="l00602"></a>00602     <span class="keywordflow">return</span> <span class="keyword">self</span>;
<a name="l00603"></a>00603 }
<a name="l00604"></a>00604 
<a name="l00609"></a><a class="code" href="class_c_p_button.html#a8def77fbc2c16741076ed5f2bc1cce99">00609</a> - (void)encodeWithCoder:(<a class="code" href="class_c_p_coder.html" title="Defines methods for use when archiving &amp;amp; restoring (enc/decoding).">CPCoder</a>)aCoder
<a name="l00610"></a>00610 {
<a name="l00611"></a>00611     [<span class="keyword">super</span> encodeWithCoder:aCoder];
<a name="l00612"></a>00612 
<a name="l00613"></a>00613     [aCoder encodeObject:_image forKey:CPButtonImageKey];
<a name="l00614"></a>00614     [aCoder encodeObject:_alternateImage forKey:CPButtonAlternateImageKey];
<a name="l00615"></a>00615 
<a name="l00616"></a>00616     [aCoder encodeObject:_title forKey:CPButtonTitleKey];
<a name="l00617"></a>00617     [aCoder encodeObject:_alternateTitle forKey:CPButtonAlternateTitleKey];
<a name="l00618"></a>00618 }
<a name="l00619"></a>00619 
<a name="l00620"></a>00620 <span class="keyword">@end</span>
<a name="l00621"></a>00621 
<a name="l00622"></a>00622 @<span class="keyword">import</span> <span class="stringliteral">&quot;CPCheckBox.j&quot;</span>
<a name="l00623"></a>00623 @<span class="keyword">import</span> <span class="stringliteral">&quot;CPRadio.j&quot;</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 10:32:54 2010 for Cappuccino API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>

<!-- Mirrored from cappuccino.org/learn/documentation/_c_p_button_8j_source.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:19:29 GMT -->
</html>