CPSegmentedControl Class Reference
[AppKit]

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]
(CGRect) - rectForEphemeralSubviewNamed: [implementation]
(CPView- createEphemeralSubviewNamed: [implementation]
(void) - layoutSubviews [implementation]
(void) - drawSegment:highlight: [implementation]
(void) - tileWithChangedSegment: [implementation]
(CGRect) - frameForSegment: [implementation]
(CGRect) - bezelFrameForSegment: [implementation]
(CGRect) - contentFrameForSegment: [implementation]
(unsigned) - testSegment: [implementation]
(void) - mouseDown: [implementation]
(void) - mouseUp: [implementation]
(void) - trackSegment: [implementation]
(void) - setFont: [implementation]
(id) - initWithCoder: [implementation]
(void) - encodeWithCoder: [implementation]

Static Public Member Functions

(CPString+ themeClass [implementation]
(id) + themeAttributes [implementation]


Detailed Description

This class is a horizontal button with multiple segments.

Definition at line 51 of file CPSegmentedControl.j.


Member Function Documentation

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

Definition at line 655 of file CPSegmentedControl.j.

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

Definition at line 665 of file CPSegmentedControl.j.

- (CPView) createEphemeralSubviewNamed: (CPString aName   [implementation]

Definition at line 492 of file CPSegmentedControl.j.

- (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 587 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 419 of file CPSegmentedControl.j.

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

Definition at line 837 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 650 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 267 of file CPSegmentedControl.j.

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

Definition at line 790 of file CPSegmentedControl.j.

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

Definition at line 75 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 389 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 365 of file CPSegmentedControl.j.

- (BOOL) isTracking   [implementation]

Definition at line 180 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 292 of file CPSegmentedControl.j.

- (void) layoutSubviews   [implementation]

Definition at line 500 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 313 of file CPSegmentedControl.j.

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

Definition at line 692 of file CPSegmentedControl.j.

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

Definition at line 701 of file CPSegmentedControl.j.

- (CGRect) rectForEphemeralSubviewNamed: (CPString aName   [implementation]

Definition at line 442 of file CPSegmentedControl.j.

- (unsigned) segmentCount   [implementation]

Returns the number of segments in the button.

Definition at line 135 of file CPSegmentedControl.j.

- (unsigned) selectedSegment   [implementation]

Returns the selected segment.

Definition at line 155 of file CPSegmentedControl.j.

- (int) selectedTag   [implementation]

Returns the tag of the selected segment.

Definition at line 95 of file CPSegmentedControl.j.

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

Selects the button segment with the specified tag.

Definition at line 163 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 376 of file CPSegmentedControl.j.

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

Definition at line 774 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 253 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 278 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 303 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 105 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 325 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 146 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 399 of file CPSegmentedControl.j.

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

Definition at line 185 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 230 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 408 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 680 of file CPSegmentedControl.j.

+ (id) themeAttributes   [implementation]

Definition at line 69 of file CPSegmentedControl.j.

+ (CPString) themeClass   [implementation]

Definition at line 64 of file CPSegmentedControl.j.

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

Definition at line 591 of file CPSegmentedControl.j.

- (CPSegmentSwitchTracking) trackingMode   [implementation]

Returns the control's tracking mode.

Definition at line 218 of file CPSegmentedControl.j.

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

Handles events for the segment

Parameters:
anEvent the event to handle

Definition at line 709 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 242 of file CPSegmentedControl.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