![]() |
API 0.9.5
|
#import <CPSegmentedControl.h>
This class is a horizontal button with multiple segments.
Definition at line 2 of file CPSegmentedControl.h.
- (CGRect) bezelFrameForSegment: | (unsigned) | aSegment |
Definition at line 678 of file CPSegmentedControl.j.
- (CGRect) contentFrameForSegment: | (unsigned) | aSegment |
Definition at line 688 of file CPSegmentedControl.j.
Reimplemented from CPView.
Definition at line 501 of file CPSegmentedControl.j.
+ (CPString) defaultThemeClass |
Reimplemented from CPView.
Definition at line 49 of file CPSegmentedControl.j.
- (void) drawSegment: | (int) | aSegment | |
highlight: | (BOOL) | shouldHighlight | |
Draws the specified segment
aSegment | the segment to draw |
shouldHighlight | YES highlights the bezel |
Definition at line 605 of file CPSegmentedControl.j.
- (void) drawSegmentBezel: | (int) | aSegment | |
highlight: | (BOOL) | shouldHighlight | |
Draws the specified segment bezel
aSegment | the segment to draw the bezel for |
shouldHighlight | YES highlights the bezel |
Definition at line 415 of file CPSegmentedControl.j.
- (void) encodeWithCoder: | (CPCoder) | aCoder |
Archives the view to a coder.
aCoder | the object into which the view's data will be archived. |
Reimplemented from CPControl.
Definition at line 871 of file CPSegmentedControl.j.
- (CGRect) frameForSegment: | (unsigned) | aSegment |
Returns the bounding rectangle for the specified segment.
aSegment | the segment to get the rectangle for |
Definition at line 673 of file CPSegmentedControl.j.
- (CPImage) imageForSegment: | (unsigned) | aSegment |
Returns the image for the specified segment
aSegment | the segment to obtain the image for |
CPRangeException | if aSegment is out of bounds |
Definition at line 260 of file CPSegmentedControl.j.
- (id) initWithCoder: | (CPCoder) | aCoder |
Initializes the view from an archive.
aCoder | the coder from which to initialize |
Reimplemented from CPControl.
Definition at line 824 of file CPSegmentedControl.j.
- (id) initWithFrame: | (CGRect) | aFrame |
Initializes the receiver for usage with the specified bounding rectangle
Reimplemented from CPControl.
Definition at line 60 of file CPSegmentedControl.j.
- (BOOL) isEnabledForSegment: | (unsigned) | aSegment |
Returns YES
if the specified segment is enabled.
aSegment | the segment to check |
CPRangeException | if aSegment is out of bounds |
Definition at line 385 of file CPSegmentedControl.j.
- (BOOL) isSelectedForSegment: | (unsigned) | aSegment |
Returns YES
if the specified segment is selected.
aSegment | the segment to check for selection |
CPRangeException | if aSegment is out of bounds |
Definition at line 356 of file CPSegmentedControl.j.
- (BOOL) isTracking |
Definition at line 175 of file CPSegmentedControl.j.
- (CPString) labelForSegment: | (unsigned) | aSegment |
Returns the label for the specified segment
the | segment to obtain the label for |
CPRangeException | if aSegment is out of bounds |
Definition at line 283 of file CPSegmentedControl.j.
- (void) layoutSubviews |
Reimplemented from CPView.
Definition at line 509 of file CPSegmentedControl.j.
- (CPMenu) menuForSegment: | (unsigned) | aSegment |
Returns the menu for the specified segment.
aSegment | the segment to obtain the menu for |
CPRangeException | if aSegment is out of bounds |
Definition at line 304 of file CPSegmentedControl.j.
- (void) mouseDown: | (CPEvent) | anEvent |
Notifies the receiver that the user has clicked the mouse down in its area.
anEvent | contains information about the click |
Reimplemented from CPControl.
Definition at line 724 of file CPSegmentedControl.j.
- (void) mouseUp: | (CPEvent) | anEvent |
Notifies the receiver that the user has released the left mouse button.
anEvent | contains information about the release |
Reimplemented from CPResponder.
Definition at line 733 of file CPSegmentedControl.j.
- (CGRect) rectForEphemeralSubviewNamed: | (CPString) | aName |
Reimplemented from CPView.
Definition at line 448 of file CPSegmentedControl.j.
- (unsigned) segmentCount |
Returns the number of segments in the button.
Definition at line 130 of file CPSegmentedControl.j.
- (unsigned) selectedSegment |
Returns the selected segment.
Definition at line 150 of file CPSegmentedControl.j.
- (int) selectedTag |
Returns the tag of the selected segment.
Definition at line 80 of file CPSegmentedControl.j.
- (BOOL) selectSegmentWithTag: | (int) | aTag |
Selects the button segment with the specified tag.
Definition at line 158 of file CPSegmentedControl.j.
- (void) setEnabled: | (BOOL) | isEnabled | |
forSegment: | (unsigned) | aSegment | |
Enables/disables the specified segment.
isEnabled | YES enables the segment |
aSegment | the segment to enable/disable |
CPRangeException | if aSegment is out of bounds |
Definition at line 367 of file CPSegmentedControl.j.
- (void) setFont: | (CPFont) | aFont |
Sets the font of the control.
Reimplemented from CPControl.
Definition at line 808 of file CPSegmentedControl.j.
- (void) setImage: | (CPImage) | anImage | |
forSegment: | (unsigned) | aSegment | |
Sets the image for the specified segment.
anImage | the image for the segment |
aSegment | the segment to set the image on |
CPRangeException | if aSegment is out of bounds |
Definition at line 248 of file CPSegmentedControl.j.
- (void) setLabel: | (CPString) | aLabel | |
forSegment: | (unsigned) | aSegment | |
Sets the label for the specified segment
aLabel | the label for the segment |
aSegment | the segment to label |
CPRangeException | if aSegment is out of bounds |
Definition at line 271 of file CPSegmentedControl.j.
- (void) setMenu: | (CPMenu) | aMenu | |
forSegment: | (unsigned) | aSegment | |
Sets the menu for the specified segment
aMenu | the menu to set |
aSegment | the segment to set the menu on |
CPRangeException | if aSegment is out of bounds |
Definition at line 294 of file CPSegmentedControl.j.
- (void) setSegmentCount: | (unsigned) | aCount |
Sets the number of segments in the button.
aCount | the number of segments on the button |
Definition at line 90 of file CPSegmentedControl.j.
- (void) setSelected: | (BOOL) | isSelected | |
forSegment: | (unsigned) | aSegment | |
Sets the selection for the specified segment. If only one segment can be selected at a time, any other segment will be deselected.
isSelected | YES selects the segment. NO deselects it. |
aSegment | the segment to set the selection for |
CPRangeException | if aSegment is out of bounds |
Definition at line 316 of file CPSegmentedControl.j.
- (void) setSelectedSegment: | (unsigned) | aSegment |
Selects a segment.
aSegment | the segment to select |
CPRangeException | if aSegment is out of bounds |
Definition at line 141 of file CPSegmentedControl.j.
- (void) setTag: | (int) | aTag | |
forSegment: | (unsigned) | aSegment | |
Sets a tag for the specified segment.
aTag | the tag to set |
aSegment | the segment to set the tag on |
Definition at line 395 of file CPSegmentedControl.j.
- (void) setTrackingMode: | (CPSegmentSwitchTracking) | aTrackingMode |
Definition at line 180 of file CPSegmentedControl.j.
- (void) setWidth: | (float) | aWidth | |
forSegment: | (unsigned) | aSegment | |
Sets the width of the specified segment.
aWidth | the new width for the segment |
aSegment | the segment to set the width for |
CPRangeException | if aSegment is out of bounds |
Definition at line 225 of file CPSegmentedControl.j.
- (int) tagForSegment: | (unsigned) | aSegment |
Returns the tag for the specified segment.
aSegment | the segment to obtain the tag for |
Definition at line 404 of file CPSegmentedControl.j.
- (unsigned) testSegment: | (CGPoint) | aPoint |
Returns the segment that is hit by the specified point.
aPoint | the point to test for a segment hit |
Definition at line 703 of file CPSegmentedControl.j.
+ (id) themeAttributes |
Reimplemented from CPControl.
Definition at line 54 of file CPSegmentedControl.j.
- (void) tileWithChangedSegment: | (unsigned) | aSegment |
Definition at line 609 of file CPSegmentedControl.j.
- (CPSegmentSwitchTracking) trackingMode |
Returns the control's tracking mode.
Definition at line 213 of file CPSegmentedControl.j.
- (void) trackSegment: | (CPEvent) | anEvent |
Handles events for the segment
anEvent | the event to handle |
Definition at line 741 of file CPSegmentedControl.j.
- (float) widthForSegment: | (unsigned) | aSegment |
Returns the width for the specified segment.
aSegment | the segment to get the width for |
CPRangeException | if aSegment is out of bounds |
Definition at line 237 of file CPSegmentedControl.j.