Public Member Functions | |
(CGRect) | - bezelFrameForSegment: [implementation] |
(CGRect) | - contentFrameForSegment: [implementation] |
(CPView) | - createEphemeralSubviewNamed: [implementation] |
(void) | - drawSegment:highlight: [implementation] |
(void) | - drawSegmentBezel:highlight: [implementation] |
(void) | - encodeWithCoder: [implementation] |
(CGRect) | - frameForSegment: [implementation] |
(CPImage) | - imageForSegment: [implementation] |
(id) | - initWithCoder: [implementation] |
(id) | - initWithFrame: [implementation] |
(BOOL) | - isEnabledForSegment: [implementation] |
(BOOL) | - isSelectedForSegment: [implementation] |
(BOOL) | - isTracking [implementation] |
(CPString) | - labelForSegment: [implementation] |
(void) | - layoutSubviews [implementation] |
(CPMenu) | - menuForSegment: [implementation] |
(void) | - mouseDown: [implementation] |
(void) | - mouseUp: [implementation] |
(CGRect) | - rectForEphemeralSubviewNamed: [implementation] |
(unsigned) | - segmentCount [implementation] |
(unsigned) | - selectedSegment [implementation] |
(int) | - selectedTag [implementation] |
(BOOL) | - selectSegmentWithTag: [implementation] |
(void) | - setEnabled:forSegment: [implementation] |
(void) | - setFont: [implementation] |
(void) | - setImage:forSegment: [implementation] |
(void) | - setLabel:forSegment: [implementation] |
(void) | - setMenu:forSegment: [implementation] |
(void) | - setSegmentCount: [implementation] |
(void) | - setSelected:forSegment: [implementation] |
(void) | - setSelectedSegment: [implementation] |
(void) | - setTag:forSegment: [implementation] |
(void) | - setTrackingMode: [implementation] |
(void) | - setWidth:forSegment: [implementation] |
(int) | - tagForSegment: [implementation] |
(unsigned) | - testSegment: [implementation] |
(void) | - tileWithChangedSegment: [implementation] |
(CPSegmentSwitchTracking) | - trackingMode [implementation] |
(void) | - trackSegment: [implementation] |
(float) | - widthForSegment: [implementation] |
Static Public Member Functions | |
(id) | + themeAttributes [implementation] |
(CPString) | + themeClass [implementation] |
This class is a horizontal button with multiple segments.
Definition at line 39 of file CPSegmentedControl.j.
- (CGRect) bezelFrameForSegment: | (unsigned) | aSegment | [implementation] |
Definition at line 670 of file CPSegmentedControl.j.
- (CGRect) contentFrameForSegment: | (unsigned) | aSegment | [implementation] |
Definition at line 680 of file CPSegmentedControl.j.
Definition at line 496 of file CPSegmentedControl.j.
- (void) drawSegment: | (int) | aSegment | ||
highlight: | (BOOL) | shouldHighlight | ||
[implementation] |
Draws the specified segment
aSegment | the segment to draw | |
shouldHighlight | YES highlights the bezel |
Definition at line 602 of file CPSegmentedControl.j.
- (void) drawSegmentBezel: | (int) | aSegment | ||
highlight: | (BOOL) | shouldHighlight | ||
[implementation] |
Draws the specified segment bezel
aSegment | the segment to draw the bezel for | |
shouldHighlight | YES highlights the bezel |
Definition at line 410 of file CPSegmentedControl.j.
- (void) encodeWithCoder: | (CPCoder) | aCoder | [implementation] |
Definition at line 863 of file CPSegmentedControl.j.
- (CGRect) frameForSegment: | (unsigned) | aSegment | [implementation] |
Returns the bounding rectangle for the specified segment.
aSegment | the segment to get the rectangle for |
Definition at line 665 of file CPSegmentedControl.j.
- (CPImage) imageForSegment: | (unsigned) | aSegment | [implementation] |
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 255 of file CPSegmentedControl.j.
- (id) initWithCoder: | (CPCoder) | aCoder | [implementation] |
Definition at line 816 of file CPSegmentedControl.j.
- (id) initWithFrame: | (CGRect) | aRect | [implementation] |
Definition at line 63 of file CPSegmentedControl.j.
- (BOOL) isEnabledForSegment: | (unsigned) | aSegment | [implementation] |
Returns YES
if the specified segment is enabled.
aSegment | the segment to check |
CPRangeException | if aSegment is out of bounds |
Definition at line 380 of file CPSegmentedControl.j.
- (BOOL) isSelectedForSegment: | (unsigned) | aSegment | [implementation] |
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 353 of file CPSegmentedControl.j.
- (BOOL) isTracking | [implementation] |
Definition at line 168 of file CPSegmentedControl.j.
- (CPString) labelForSegment: | (unsigned) | aSegment | [implementation] |
Returns the label for the specified segment
the | segment to obtain the label for |
CPRangeException | if aSegment is out of bounds |
Definition at line 280 of file CPSegmentedControl.j.
- (void) layoutSubviews | [implementation] |
Definition at line 504 of file CPSegmentedControl.j.
- (CPMenu) menuForSegment: | (unsigned) | aSegment | [implementation] |
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 301 of file CPSegmentedControl.j.
- (void) mouseDown: | (CPEvent) | anEvent | [implementation] |
Definition at line 716 of file CPSegmentedControl.j.
- (void) mouseUp: | (CPEvent) | anEvent | [implementation] |
Definition at line 725 of file CPSegmentedControl.j.
- (CGRect) rectForEphemeralSubviewNamed: | (CPString) | aName | [implementation] |
Definition at line 443 of file CPSegmentedControl.j.
- (unsigned) segmentCount | [implementation] |
Returns the number of segments in the button.
Definition at line 123 of file CPSegmentedControl.j.
- (unsigned) selectedSegment | [implementation] |
Returns the selected segment.
Definition at line 143 of file CPSegmentedControl.j.
- (int) selectedTag | [implementation] |
Returns the tag of the selected segment.
Definition at line 83 of file CPSegmentedControl.j.
- (BOOL) selectSegmentWithTag: | (int) | aTag | [implementation] |
Selects the button segment with the specified tag.
Definition at line 151 of file CPSegmentedControl.j.
- (void) setEnabled: | (BOOL) | isEnabled | ||
forSegment: | (unsigned) | aSegment | ||
[implementation] |
Enables/diables the specified segment.
isEnabled | YES enables the segment | |
aSegment | the segment to enable/disble |
CPRangeException | if aSegment is out of bounds |
Definition at line 364 of file CPSegmentedControl.j.
- (void) setFont: | (CPFont) | aFont | [implementation] |
Definition at line 800 of file CPSegmentedControl.j.
- (void) setImage: | (CPImage) | anImage | ||
forSegment: | (unsigned) | aSegment | ||
[implementation] |
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 241 of file CPSegmentedControl.j.
- (void) setLabel: | (CPString) | aLabel | ||
forSegment: | (unsigned) | aSegment | ||
[implementation] |
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 266 of file CPSegmentedControl.j.
- (void) setMenu: | (CPMenu) | aMenu | ||
forSegment: | (unsigned) | aSegment | ||
[implementation] |
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 291 of file CPSegmentedControl.j.
- (void) setSegmentCount: | (unsigned) | aCount | [implementation] |
Sets the number of segments in the button.
aCount | the number of segments on the button |
Definition at line 93 of file CPSegmentedControl.j.
- (void) setSelected: | (BOOL) | isSelected | ||
forSegment: | (unsigned) | aSegment | ||
[implementation] |
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 313 of file CPSegmentedControl.j.
- (void) setSelectedSegment: | (unsigned) | aSegment | [implementation] |
Selects a segment.
aSegment | the segment to select |
CPRangeException | if aSegment is out of bounds |
Definition at line 134 of file CPSegmentedControl.j.
- (void) setTag: | (int) | aTag | ||
forSegment: | (unsigned) | aSegment | ||
[implementation] |
Sets a tag for the specified segment.
aTag | the tag to set | |
aSegment | the segment to set the tag on |
Definition at line 390 of file CPSegmentedControl.j.
- (void) setTrackingMode: | (CPSegmentSwitchTracking) | aTrackingMode | [implementation] |
Definition at line 173 of file CPSegmentedControl.j.
- (void) setWidth: | (float) | aWidth | ||
forSegment: | (unsigned) | aSegment | ||
[implementation] |
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 218 of file CPSegmentedControl.j.
- (int) tagForSegment: | (unsigned) | aSegment | [implementation] |
Returns the tag for the specified segment.
aSegment | the segment to obtain the tag for |
Definition at line 399 of file CPSegmentedControl.j.
- (unsigned) testSegment: | (CGPoint) | aPoint | [implementation] |
Returns the segment that is hit by the specified point.
aPoint | the point to test for a segment hit |
Definition at line 695 of file CPSegmentedControl.j.
+ (id) themeAttributes | [implementation] |
Definition at line 57 of file CPSegmentedControl.j.
+ (CPString) themeClass | [implementation] |
Definition at line 52 of file CPSegmentedControl.j.
- (void) tileWithChangedSegment: | (unsigned) | aSegment | [implementation] |
Definition at line 606 of file CPSegmentedControl.j.
- (CPSegmentSwitchTracking) trackingMode | [implementation] |
Returns the control's tracking mode.
Definition at line 206 of file CPSegmentedControl.j.
- (void) trackSegment: | (CPEvent) | anEvent | [implementation] |
Handles events for the segment
anEvent | the event to handle |
Definition at line 733 of file CPSegmentedControl.j.
- (float) widthForSegment: | (unsigned) | aSegment | [implementation] |
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 230 of file CPSegmentedControl.j.