Source

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

Full commit
<!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/class_c_p_radio.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:17:53 GMT -->
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Cappuccino API: CPRadio Class Reference</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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>CPRadio Class Reference<br/>
<small>
[<a class="el" href="group__appkit.html">AppKit</a>]</small>
</h1><!-- doxytag: class="CPRadio" -->
<p><a href="class_c_p_radio-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="class_c_p_radio.html#a7992ae2e48ee6a7ae07355bf24690052">encodeWithCoder:</a><code> [implementation]</code></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(id)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="class_c_p_radio.html#a70f613eebc8ce78b995f3d58c385631a">initWithCoder:</a><code> [implementation]</code></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(id)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="class_c_p_radio.html#a51a3a1aed0b1d2c18815b53dd639a3f9">initWithFrame:</a><code> [implementation]</code></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(id)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="class_c_p_radio.html#a1bf179fdcdbe762e76da74d75f1f0b95">initWithFrame:radioGroup:</a><code> [implementation]</code></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(CPInteger)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="class_c_p_radio.html#abb96ecf6e03d225f3561e5de71a8e0f1">nextState</a><code> [implementation]</code></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="class_c_p_radio_group.html">CPRadioGroup</a>)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="class_c_p_radio.html#a7fd0c0c85329ce639780907de2d526e7">radioGroup</a><code> [implementation]</code></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="class_c_p_radio.html#aa7edf2bec2e3a9a35ed372c8304a8826">setObjectValue:</a><code> [implementation]</code></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="class_c_p_radio.html#a3c7c02361805649a3d055776792f6888">setRadioGroup:</a><code> [implementation]</code></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(id)&nbsp;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="class_c_p_radio.html#a9a360c43b75c5aa22dbb9ff8de7e9b27">radioWithTitle:</a><code> [implementation]</code></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(id)&nbsp;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="class_c_p_radio.html#a83022c2719ff630aaa8db33de7b42387">radioWithTitle:theme:</a><code> [implementation]</code></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="class_c_p_button.html">CPButton</a>)&nbsp;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="class_c_p_radio.html#a91be6109c21b95903de009e362c17834">standardButtonWithTitle:</a><code> [implementation]</code></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="class_c_p_string.html">CPString</a>)&nbsp;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="class_c_p_radio.html#a6428039299c21c563560463ac3b70607">themeClass</a><code> [implementation]</code></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>from this mailing list thread: <a href="http://groups.google.com/group/objectivej/browse_thread/thread/7c41cbd9cbee9ea3">http://groups.google.com/group/objectivej/browse_thread/thread/7c41cbd9cbee9ea3</a></p>
<p>-----------------------------------</p>
<p>Creating a checkbox is easy enough:</p>
<p>checkbox = [[<a class="el" href="class_c_p_check_box.html">CPCheckBox</a> alloc] initWithFrame:aFrame];</p>
<p>That's basically all there is to it. Radio buttons are very similar, the key difference is the introduction of a new class <a class="el" href="class_c_p_radio_group.html">CPRadioGroup</a>, which defines which radio buttons are part of the same group:</p>
<p>[myRadioButton setRadioGroup:aRadioGroup];</p>
<p>Every radio button receives a unique radio group by default (so if you do nothing further, they will all behave independently), but you can use an existing radio button's group with other buttons as so:</p>
<p>button1 = [[<a class="el" href="class_c_p_radio.html">CPRadio</a> alloc] initWithFrame:aFrame]; ... button2 = [[<a class="el" href="class_c_p_radio.html">CPRadio</a> alloc] initWithFrame:aFrame radioGroup:[button1 radioGroup]]; ... button3 = [[<a class="el" href="class_c_p_radio.html">CPRadio</a> alloc] initWithFrame:aFrame radioGroup:[button1 radioGroup]]; ...etc...</p>
<p>Here, all the radio buttons will act "together". [[button1 radioGroup] allRadios] returns every button that's part of this group, and [[button1 radioGroup] selectedRadio] returns the currently selected option. </p>

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00065">65</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7992ae2e48ee6a7ae07355bf24690052"></a><!-- doxytag: member="CPRadio::encodeWithCoder:" ref="a7992ae2e48ee6a7ae07355bf24690052" args="(CPCoder aCoder)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) encodeWithCoder: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="class_c_p_coder.html">CPCoder</a>)&nbsp;</td>
          <td class="paramname"> <em>aCoder</em></td>
          <td>&nbsp;</td>
          <td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00165">165</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="a70f613eebc8ce78b995f3d58c385631a"></a><!-- doxytag: member="CPRadio::initWithCoder:" ref="a70f613eebc8ce78b995f3d58c385631a" args="(CPCoder aCoder)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (id) initWithCoder: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="class_c_p_coder.html">CPCoder</a>)&nbsp;</td>
          <td class="paramname"> <em>aCoder</em></td>
          <td>&nbsp;</td>
          <td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00155">155</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="a51a3a1aed0b1d2c18815b53dd639a3f9"></a><!-- doxytag: member="CPRadio::initWithFrame:" ref="a51a3a1aed0b1d2c18815b53dd639a3f9" args="(CGRect aFrame)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (id) initWithFrame: </td>
          <td></td>
          <td class="paramtype">(CGRect)&nbsp;</td>
          <td class="paramname"> <em>aFrame</em></td>
          <td>&nbsp;</td>
          <td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00116">116</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="a1bf179fdcdbe762e76da74d75f1f0b95"></a><!-- doxytag: member="CPRadio::initWithFrame:radioGroup:" ref="a1bf179fdcdbe762e76da74d75f1f0b95" args="(CGRect aFrame,[radioGroup] CPRadioGroup aRadioGroup)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (id) initWithFrame: </td>
          <td></td>
          <td class="paramtype">(CGRect)&nbsp;</td>
          <td class="paramname"> <em>aFrame</em></td>
        </tr>
        <tr>
          <td class="paramkey">radioGroup:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="class_c_p_radio_group.html">CPRadioGroup</a>)&nbsp;</td>
          <td class="paramname"> <em>aRadioGroup</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td><td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00095">95</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="abb96ecf6e03d225f3561e5de71a8e0f1"></a><!-- doxytag: member="CPRadio::nextState" ref="abb96ecf6e03d225f3561e5de71a8e0f1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (CPInteger) nextState </td>
          <td></td>
          <td class="paramname"></td>
          <td>&nbsp;</td>
          <td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00121">121</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="a7fd0c0c85329ce639780907de2d526e7"></a><!-- doxytag: member="CPRadio::radioGroup" ref="a7fd0c0c85329ce639780907de2d526e7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="el" href="class_c_p_radio_group.html">CPRadioGroup</a>) radioGroup </td>
          <td></td>
          <td class="paramname"></td>
          <td>&nbsp;</td>
          <td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00136">136</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="a9a360c43b75c5aa22dbb9ff8de7e9b27"></a><!-- doxytag: member="CPRadio::radioWithTitle:" ref="a9a360c43b75c5aa22dbb9ff8de7e9b27" args="(CPString aTitle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (id) radioWithTitle: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="class_c_p_string.html">CPString</a>)&nbsp;</td>
          <td class="paramname"> <em>aTitle</em></td>
          <td>&nbsp;</td>
          <td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00075">75</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="a83022c2719ff630aaa8db33de7b42387"></a><!-- doxytag: member="CPRadio::radioWithTitle:theme:" ref="a83022c2719ff630aaa8db33de7b42387" args="(CPString aTitle,[theme] CPTheme aTheme)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (id) radioWithTitle: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="class_c_p_string.html">CPString</a>)&nbsp;</td>
          <td class="paramname"> <em>aTitle</em></td>
        </tr>
        <tr>
          <td class="paramkey">theme:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="class_c_p_theme.html">CPTheme</a>)&nbsp;</td>
          <td class="paramname"> <em>aTheme</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td><td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00070">70</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="aa7edf2bec2e3a9a35ed372c8304a8826"></a><!-- doxytag: member="CPRadio::setObjectValue:" ref="aa7edf2bec2e3a9a35ed372c8304a8826" args="(id aValue)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) setObjectValue: </td>
          <td></td>
          <td class="paramtype">(id)&nbsp;</td>
          <td class="paramname"> <em>aValue</em></td>
          <td>&nbsp;</td>
          <td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00141">141</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="a3c7c02361805649a3d055776792f6888"></a><!-- doxytag: member="CPRadio::setRadioGroup:" ref="a3c7c02361805649a3d055776792f6888" args="(CPRadioGroup aRadioGroup)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) setRadioGroup: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="class_c_p_radio_group.html">CPRadioGroup</a>)&nbsp;</td>
          <td class="paramname"> <em>aRadioGroup</em></td>
          <td>&nbsp;</td>
          <td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00126">126</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="a91be6109c21b95903de009e362c17834"></a><!-- doxytag: member="CPRadio::standardButtonWithTitle:" ref="a91be6109c21b95903de009e362c17834" args="(CPString aTitle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="class_c_p_button.html">CPButton</a>) standardButtonWithTitle: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="class_c_p_string.html">CPString</a>)&nbsp;</td>
          <td class="paramname"> <em>aTitle</em></td>
          <td>&nbsp;</td>
          <td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00080">80</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<a class="anchor" id="a6428039299c21c563560463ac3b70607"></a><!-- doxytag: member="CPRadio::themeClass" ref="a6428039299c21c563560463ac3b70607" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="class_c_p_string.html">CPString</a>) themeClass </td>
          <td></td>
          <td class="paramname"></td>
          <td>&nbsp;</td>
          <td><code> [implementation]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_p_radio_8j_source.html#l00089">89</a> of file <a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>AppKit/<a class="el" href="_c_p_radio_8j_source.html">CPRadio.j</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 10:33:06 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/class_c_p_radio.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:17:54 GMT -->
</html>