CPRadio Class Reference
[AppKit]

List of all members.

Public Member Functions

(id) - initWithFrame:radioGroup: [implementation]
(id) - initWithFrame: [implementation]
(CPInteger) - nextState [implementation]
(void) - setRadioGroup: [implementation]
(CPRadioGroup- radioGroup [implementation]
(void) - setObjectValue: [implementation]
(id) - initWithCoder: [implementation]
(void) - encodeWithCoder: [implementation]

Static Public Member Functions

(id) + radioWithTitle:theme: [implementation]
(id) + radioWithTitle: [implementation]
(CPButton+ standardButtonWithTitle: [implementation]
(CPString+ themeClass [implementation]


Detailed Description

from this mailing list thread: http://groups.google.com/group/objectivej/browse_thread/thread/7c41cbd9cbee9ea3

-----------------------------------

Creating a checkbox is easy enough:

checkbox = [[CPCheckBox alloc] initWithFrame:aFrame];

That's basically all there is to it. Radio buttons are very similar, the key difference is the introduction of a new class CPRadioGroup, which defines which radio buttons are part of the same group:

[myRadioButton setRadioGroup:aRadioGroup];

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:

button1 = [[CPRadio alloc] initWithFrame:aFrame]; ... button2 = [[CPRadio alloc] initWithFrame:aFrame radioGroup:[button1 radioGroup]]; ... button3 = [[CPRadio alloc] initWithFrame:aFrame radioGroup:[button1 radioGroup]]; ...etc...

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.

Definition at line 65 of file CPRadio.j.


Member Function Documentation

- (void) encodeWithCoder: (CPCoder aCoder   [implementation]

Definition at line 165 of file CPRadio.j.

- (id) initWithCoder: (CPCoder aCoder   [implementation]

Definition at line 155 of file CPRadio.j.

- (id) initWithFrame: (CGRect)  aFrame   [implementation]

Definition at line 116 of file CPRadio.j.

- (id) initWithFrame: (CGRect)  aFrame
radioGroup: (CPRadioGroup aRadioGroup 
[implementation]

Definition at line 95 of file CPRadio.j.

- (CPInteger) nextState   [implementation]

Definition at line 121 of file CPRadio.j.

- (CPRadioGroup) radioGroup   [implementation]

Definition at line 136 of file CPRadio.j.

+ (id) radioWithTitle: (CPString aTitle   [implementation]

Definition at line 75 of file CPRadio.j.

+ (id) radioWithTitle: (CPString aTitle
theme: (CPTheme aTheme 
[implementation]

Definition at line 70 of file CPRadio.j.

- (void) setObjectValue: (id)  aValue   [implementation]

Definition at line 141 of file CPRadio.j.

- (void) setRadioGroup: (CPRadioGroup aRadioGroup   [implementation]

Definition at line 126 of file CPRadio.j.

+ (CPButton) standardButtonWithTitle: (CPString aTitle   [implementation]

Definition at line 80 of file CPRadio.j.

+ (CPString) themeClass   [implementation]

Definition at line 89 of file CPRadio.j.


The documentation for this class was generated from the following file:

Generated on Wed May 20 12:44:01 2009 for Cappuccino by  doxygen 1.5.8