CPSegmentedControl Class Reference

List of all members.

Public Member Functions

(id) - initWithFrame: [implementation]
(int) - selectedTag [implementation]
(void) - setSegmentCount: [implementation]
(unsigned) - segmentCount [implementation]
(void) - setSelectedSegment: [implementation]
(unsigned) - selectedSegment [implementation]
(BOOL) - selectSegmentWithTag: [implementation]
(BOOL) - isTracking [implementation]
(void) - setTrackingMode: [implementation]
(CPSegmentSwitchTracking) - trackingMode [implementation]
(void) - setWidth:forSegment: [implementation]
(float) - widthForSegment: [implementation]
(void) - setImage:forSegment: [implementation]
(CPImage- imageForSegment: [implementation]
(void) - setLabel:forSegment: [implementation]
(CPString- labelForSegment: [implementation]
(void) - setMenu:forSegment: [implementation]
(CPMenu- menuForSegment: [implementation]
(void) - setSelected:forSegment: [implementation]
(BOOL) - isSelectedForSegment: [implementation]
(void) - setEnabled:forSegment: [implementation]
(BOOL) - isEnabledForSegment: [implementation]
(void) - setTag:forSegment: [implementation]
(int) - tagForSegment: [implementation]
(void) - drawSegmentBezel:highlight: [implementation]
(void) - drawSegment:highlight: [implementation]
(void) - tileWithChangedSegment: [implementation]
(CGRect) - frameForSegment: [implementation]
(unsigned) - testSegment: [implementation]
(void) - mouseDown: [implementation]
(void) - mouseUp: [implementation]
(void) - trackSegment: [implementation]
(void) - setFont: [implementation]


Detailed Description

This class is a horizontal button with multiple segments.

Definition at line 47 of file CPSegmentedControl.j.


Member Function Documentation

- (void) drawSegment: (int)  aSegment
highlight: (BOOL)  shouldHighlight 
[implementation]

Draws the specified segment

Parameters:
aSegment the segment to draw
shouldHighlight YES highlights the bezel

Definition at line 462 of file CPSegmentedControl.j.

- (void) drawSegmentBezel: (int)  aSegment
highlight: (BOOL)  shouldHighlight 
[implementation]

Draws the specified segment bezel

Parameters:
aSegment the segment to draw the bezel for
shouldHighlight YES highlights the bezel

Definition at line 453 of file CPSegmentedControl.j.

- (CGRect) frameForSegment: (unsigned)  aSegment   [implementation]

Returns the bounding rectangle for the specified segment.

Parameters:
aSegment the segment to get the rectangle for

Definition at line 555 of file CPSegmentedControl.j.

- (CPImage) imageForSegment: (unsigned)  aSegment   [implementation]

Returns the image for the specified segment

Parameters:
aSegment the segment to obtain the image for
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 285 of file CPSegmentedControl.j.

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

Definition at line 59 of file CPSegmentedControl.j.

- (BOOL) isEnabledForSegment: (unsigned)  aSegment   [implementation]

Returns YES if the specified segment is enabled.

Parameters:
aSegment the segment to check
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 423 of file CPSegmentedControl.j.

- (BOOL) isSelectedForSegment: (unsigned)  aSegment   [implementation]

Returns YES if the specified segment is selected.

Parameters:
aSegment the segment to check for selection
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 402 of file CPSegmentedControl.j.

- (BOOL) isTracking   [implementation]

Definition at line 175 of file CPSegmentedControl.j.

- (CPString) labelForSegment: (unsigned)  aSegment   [implementation]

Returns the label for the specified segment

Parameters:
the segment to obtain the label for
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 335 of file CPSegmentedControl.j.

- (CPMenu) menuForSegment: (unsigned)  aSegment   [implementation]

Returns the menu for the specified segment.

Parameters:
aSegment the segment to obtain the menu for
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 356 of file CPSegmentedControl.j.

- (void) mouseDown: (CPEvent anEvent   [implementation]

Definition at line 577 of file CPSegmentedControl.j.

- (void) mouseUp: (CPEvent anEvent   [implementation]

Definition at line 586 of file CPSegmentedControl.j.

- (unsigned) segmentCount   [implementation]

Returns the number of segments in the button.

Definition at line 130 of file CPSegmentedControl.j.

- (unsigned) selectedSegment   [implementation]

Returns the selected segment.

Definition at line 150 of file CPSegmentedControl.j.

- (int) selectedTag   [implementation]

Returns the tag of the selected segment.

Definition at line 79 of file CPSegmentedControl.j.

- (BOOL) selectSegmentWithTag: (int)  aTag   [implementation]

Selects the button segment with the specified tag.

Definition at line 158 of file CPSegmentedControl.j.

- (void) setEnabled: (BOOL)  isEnabled
forSegment: (unsigned)  aSegment 
[implementation]

Enables/diables the specified segment.

Parameters:
isEnabled YES enables the segment
aSegment the segment to enable/disble
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 413 of file CPSegmentedControl.j.

- (void) setFont: (CPFont aFont   [implementation]

Definition at line 653 of file CPSegmentedControl.j.

- (void) setImage: (CPImage anImage
forSegment: (unsigned)  aSegment 
[implementation]

Sets the image for the specified segment.

Parameters:
anImage the image for the segment
aSegment the segment to set the image on
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 248 of file CPSegmentedControl.j.

- (void) setLabel: (CPString aLabel
forSegment: (unsigned)  aSegment 
[implementation]

Sets the label for the specified segment

Parameters:
aLabel the label for the segment
aSegment the segment to label
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 296 of file CPSegmentedControl.j.

- (void) setMenu: (CPMenu aMenu
forSegment: (unsigned)  aSegment 
[implementation]

Sets the menu for the specified segment

Parameters:
aMenu the menu to set
aSegment the segment to set the menu on
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 346 of file CPSegmentedControl.j.

- (void) setSegmentCount: (unsigned)  aCount   [implementation]

Sets the number of segments in the button.

Parameters:
aCount the number of segments on the button

Definition at line 89 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.

Parameters:
isSelected YES selects the segment. NO deselects it.
aSegment the segment to set the selection for
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 368 of file CPSegmentedControl.j.

- (void) setSelectedSegment: (unsigned)  aSegment   [implementation]

Selects a segment.

Parameters:
aSegment the segment to select
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 141 of file CPSegmentedControl.j.

- (void) setTag: (int)  aTag
forSegment: (unsigned)  aSegment 
[implementation]

Sets a tag for the specified segment.

Parameters:
aTag the tag to set
aSegment the segment to set the tag on

Definition at line 433 of file CPSegmentedControl.j.

- (void) setTrackingMode: (CPSegmentSwitchTracking)  aTrackingMode   [implementation]

Definition at line 180 of file CPSegmentedControl.j.

- (void) setWidth: (float)  aWidth
forSegment: (unsigned)  aSegment 
[implementation]

Sets the width of the specified segment.

Parameters:
aWidth the new width for the segment
aSegment the segment to set the width for
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 225 of file CPSegmentedControl.j.

- (int) tagForSegment: (unsigned)  aSegment   [implementation]

Returns the tag for the specified segment.

Parameters:
aSegment the segment to obtain the tag for

Definition at line 442 of file CPSegmentedControl.j.

- (unsigned) testSegment: (CGPoint)  aPoint   [implementation]

Returns the segment that is hit by the specified point.

Parameters:
aPoint the point to test for a segment hit
Returns:
the intersecting segment

Definition at line 565 of file CPSegmentedControl.j.

- (void) tileWithChangedSegment: (unsigned)  aSegment   [implementation]

Definition at line 508 of file CPSegmentedControl.j.

- (CPSegmentSwitchTracking) trackingMode   [implementation]

Returns the control's tracking mode.

Definition at line 213 of file CPSegmentedControl.j.

- (void) trackSegment: (CPEvent anEvent   [implementation]

Handles events for the segment

Parameters:
anEvent the event to handle

Definition at line 594 of file CPSegmentedControl.j.

- (float) widthForSegment: (unsigned)  aSegment   [implementation]

Returns the width for the specified segment.

Parameters:
aSegment the segment to get the width for
Exceptions:
CPRangeException if aSegment is out of bounds

Definition at line 237 of file CPSegmentedControl.j.


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

Generated on Thu Dec 11 01:55:51 2008 for Cappuccino by  doxygen 1.5.7.1