Class CPProgressIndicator

CPObject
    extended byCPResponder
        extended byCPView
            extended byCPProgressIndicator

@implementation CPProgressIndicator : CPView

This class is used in a Cappuccino GUI to display the progress of a function or task. If the duration of the task is unknown, there is also an indeterminate mode for the indicator.


Method Summary
-(id)initWithFrame:(CGRect)aFrame
          Initializes the receiver for usage with the specified bounding rectangle.
-(CPControlSize)controlSize
          Returns the progress indicator's size.
-(CPControlTint)controlTint
          Not yet impemented.
-(double)doubleValue
          Returns the value of the progress indicator.
-(void)incrementBy:(double)aValue
          Increases the progress of the bar by the specified value.
-(BOOL)isBezeled
          Not yet implemented.
-(BOOL)isDisplayedWhenStopped
          Returns YES if the progress bar is displayed when not animating.
-(BOOL)isIndeterminate
          Returns YES if the progress bar is indeterminate.
-(double)maxValue
          Returns the maximum value of the progress indicator.
-(double)minValue
          Returns the minimum value of the progress indicator.
-(void)setBezeled:(BOOL)isBezeled
          Not yet implemented.
-(void)setControlSize:(CPControlSize)aControlSize
          Sets the progress indicator's size.
-(void)setControlTint:(CPControlTint)aControlTint
          Not yet implemented.
-(void)setDisplayedWhenStopped:(BOOL)isDisplayedWhenStopped
          Sets whether the indicator should be displayed when it isn't animating.
-(void)setDoubleValue:(double)aValue
          Sets the progress value of the indicator.
-(void)setFrameSize:(CGSize)aSize
          Sets the receiver's frame size.
-(void)setIndeterminate:(BOOL)isIndeterminate
          Specifies whether this progress indicator should be indeterminate or display progress based on it's max and min.
-(void)setMaxValue:(double)aValue
          Sets the maximum value of the progress indicator.
-(void)setMinValue:(double)aValue
          Sets the minimum value of the progress indicator.
-(void)setStyle:(CPProgressIndicatorStyle)aStyle
          Sets the progress indicator's style.
-(void)sizeToFit
          Resizes the indicator based on it's style.
-(void)startAnimation:(id)aSender
          Starts the animation of the progress indicator in indeterminate mode.
-(void)stopAnimation:(id)aSender
          Stops the animation of the progress indicator in indeterminate mode.
-(BOOL)usesThreadedAnimation
          Always returns NO.

Methods inherited from class CPObject
initialize, alloc, class, instanceMethodForSelector, instancesRespondToSelector, isSubclassOfClass, load, new, setVersion, superclass, version, init, autorelease, awakeAfterUsingCoder, class, classForCoder, classForKeyedArchiver, className, copy, dealloc, description, doesNotRecognizeSelector, forwardInvocation, hash, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableCopy, performSelector, performSelector, performSelector, release, replacementObjectForArchiver, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, retain, self, superclass

Methods inherited from class CPResponder
acceptsFirstResponder, becomeFirstResponder, deleteBackward, doCommandBySelector, insertLineBreak, insertText, interpretKeyEvents, keyDown, keyUp, menu, mouseDown, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseUp, nextResponder, noResponderFor, performKeyEquivalent, resignFirstResponder, scrollWheel, setMenu, setNextResponder, tryToPerform, undoManager

Methods inherited from class CPView
initWithFrame, acceptsFirstMouse, addSubview, addSubview, adjustScroll, alphaValue, autoresizesSubviews, autoresizingMask, autoscroll, backgroundColor, bounds, convertPoint, convertPoint, convertRect, convertRect, convertSize, convertSize, didAddSubview, display, displayIfNeeded, displayIfNeededInRect, displayRect, displayRectIgnoringOpacity, dragImage, dragView, drawRect, enclosingMenuItem, enclosingScrollView, enterFullScreenMode, exitFullScreenModeWithOptions, frame, hitTest, hitTests, isDescendantOf, isFlipped, isHidden, isHiddenOrHasHiddenAncestor, isInFullScreenMode, isOpaque, lockFocus, mouseDown, mouseDownCanMoveWindow, needsDisplay, postsBoundsChangedNotifications, postsFrameChangedNotifications, reflectScrolledClipView, registerForDraggedTypes, registeredDraggedTypes, removeFromSuperview, replaceSubview, resizeSubviewsWithOldSize, resizeWithOldSuperviewSize, scrollClipView, scrollPoint, scrollRectToVisible, scrollRect, setAlphaValue, setAutoresizesSubviews, setAutoresizingMask, setBackgroundColor, setBounds, setBoundsOrigin, setBoundsSize, setFrame, setFrameOrigin, setFrameSize, setHidden, setHitTests, setNeedsDisplay, setNeedsDisplayInRect, setPostsBoundsChangedNotifications, setPostsFrameChangedNotifications, subviews, superview, unlockFocus, unregisterDraggedTypes, viewDidMoveToSuperview, viewDidMoveToWindow, viewWillMoveToSuperview, viewWillMoveToWindow, visibleRect, willRemoveSubview, window


Method Detail

initWithFrame

-(id)initWithFrame:(CGRect)aFrame
Initializes the receiver for usage with the specified bounding rectangle
Parameters:
aFrame
Returns:
the initialized view

controlSize

-(CPControlSize)controlSize
Returns the progress indicator's size

controlTint

-(CPControlTint)controlTint
Not yet impemented.

doubleValue

-(double)doubleValue
Returns the value of the progress indicator.

incrementBy

-(void)incrementBy:(double)aValue
Increases the progress of the bar by the specified value.
Parameters:
aValue - the amount to increase the progress value

isBezeled

-(BOOL)isBezeled
Not yet implemented.

isDisplayedWhenStopped

-(BOOL)isDisplayedWhenStopped
Returns YES if the progress bar is displayed when not animating.

isIndeterminate

-(BOOL)isIndeterminate
Returns YES if the progress bar is indeterminate.

maxValue

-(double)maxValue
Returns the maximum value of the progress indicator.

minValue

-(double)minValue
Returns the minimum value of the progress indicator.

setBezeled

-(void)setBezeled:(BOOL)isBezeled
Not yet implemented.
Parameters:
isBezeled

setControlSize

-(void)setControlSize:(CPControlSize)aControlSize
Sets the progress indicator's size.
Parameters:
aControlSize - the new size

setControlTint

-(void)setControlTint:(CPControlTint)aControlTint
Not yet implemented
Parameters:
aControlTint

setDisplayedWhenStopped

-(void)setDisplayedWhenStopped:(BOOL)isDisplayedWhenStopped
Sets whether the indicator should be displayed when it isn't animating. By default this is YES if the style is CPProgressIndicatorBarStyle, and NO if it's CPProgressIndicatorSpinningStyle.
Parameters:
isDisplayedWhenStopped - YES means the indicator will be displayed when it's not animating.

setDoubleValue

-(void)setDoubleValue:(double)aValue
Sets the progress value of the indicator.
Parameters:
aValue

setFrameSize

-(void)setFrameSize:(CGSize)aSize
Sets the receiver's frame size. If aSize is the same as the frame's current dimensions, this method simply returns. The method posts a CPViewFrameDidChangeNotification to the default notification center if the receiver is configured to do so.
Parameters:
aSize - the new size for the frame

setIndeterminate

-(void)setIndeterminate:(BOOL)isIndeterminate
Specifies whether this progress indicator should be indeterminate or display progress based on it's max and min.
Parameters:
isIndeterminate

setMaxValue

-(void)setMaxValue:(double)aValue
Sets the maximum value of the progress indicator. The default is 100.0.
Parameters:
aValue - the new maximum value.

setMinValue

-(void)setMinValue:(double)aValue
Sets the minimum value of the progress indicator. The default is 0.0.
Parameters:
aValue - the new minimum value

setStyle

-(void)setStyle:(CPProgressIndicatorStyle)aStyle
Sets the progress indicator's style
Parameters:
aStyle - the style to set it to

sizeToFit

-(void)sizeToFit
Resizes the indicator based on it's style.

startAnimation

-(void)startAnimation:(id)aSender
Starts the animation of the progress indicator in indeterminate mode.
Parameters:
aSender

stopAnimation

-(void)stopAnimation:(id)aSender
Stops the animation of the progress indicator in indeterminate mode.
Parameters:
aSender

usesThreadedAnimation

-(BOOL)usesThreadedAnimation
Always returns NO. Cappuccino does not have multiple threads.

Created on Sat Sep 13 14:15:43 PDT 2008