#import <CPRadio.h>
Class Methods | |
(CPString) | + defaultThemeClass |
(id) | + radioWithTitle: |
(id) | + radioWithTitle:theme: |
(CPButton) | + standardButtonWithTitle: |
Class Methods inherited from CPButton | |
(id) | + buttonWithTitle: |
(id) | + buttonWithTitle:theme: |
(CPDictionary) | + themeAttributes |
Class Methods inherited from CPControl | |
(void) | + initialize |
Class Methods inherited from CPView | |
(Class) | + animatorClass |
(CAAnimation) | + defaultAnimationForKey: |
(CPMenu) | + defaultMenu |
(BOOL) | + isHighDPIDrawingEnabled |
(CPSet) | + keyPathsForValuesAffectingBounds |
(CPSet) | + keyPathsForValuesAffectingFrame |
(void) | + setHighDPIDrawingEnabled: |
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.
|
implementation |
Returns the image used when the button is in an alternate state.
Reimplemented from CPButton.
Provided by category CPRadio(CPCoding).
|
implementation |
|
implementation |
Archives this button into the provided coder.
aCoder | the coder to which the button's instance data will be written. |
Reimplemented from CPButton.
Provided by category CPRadio(CPCoding).
|
implementation |
Reimplemented from CPButton.
Provided by category CPRadio(CPCoding).
|
implementation |
Initializes the button by unarchiving data from aCoder
.
aCoder | the coder containing the archived CPButton. |
Reimplemented from CPButton.
Provided by category CPRadio(CPCoding).
|
implementation |
|
implementation |
|
implementation |
Returns the button's next state.
CPOffState
(the normal or unpressed state) or CPOnState
(the alternate or pressed state). If it has three, this value can be CPOnState
(the feature is in effect everywhere), CPOffState
(the feature is in effect nowhere), or CPMixedState
(the feature is in effect somewhere). Reimplemented from CPButton.
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
Reimplemented from CPButton.
Provided by category CPRadio(CPCoding).