API  1.0.0
CPStepper Class Reference

#import <CPStepper.h>

+ Inheritance diagram for CPStepper:

Instance Methods

(BOOL) - autorepeat
 
(void) - encodeWithCoder:
 
(int) - increment
 
(id) - initWithCoder:
 
(id) - initWithFrame:
 
(void) - layoutSubviews
 
(int) - maxValue
 
(int) - minValue
 
(IBAction) - performClickDown:
 
(IBAction) - performClickUp:
 
(void) - setAutorepeat:
 
(void) - setControlSize:
 
(void) - setDoubleValue:
 
(void) - setEnabled:
 
(void) - setFrame:
 
(void) - setIncrement:
 
(void) - setMaxValue:
 
(void) - setMinValue:
 
(void) - setValueWraps:
 
(BOOL) - valueWraps
 
- Instance Methods inherited from CPControl
(BOOL) - acceptsFirstMouse:
 
(SEL) - action
 
(CPTextAlignment) - alignment
 
(CPWritingDirection) - baseWritingDirection
 
(BOOL) - continueTracking:at:
 
(CPControlSize) - controlSize
 
(double) - doubleValue
 
(float) - floatValue
 
(CPFont- font
 
(CPFormatter- formatter
 
(void) - highlight:
 
(CPCellImagePosition) - imagePosition
 
(CPUInteger) - imageScaling
 
(int) - integerValue
 
(int) - intValue
 
(BOOL) - isContinuous
 
(BOOL) - isEnabled
 
(BOOL) - isHighlighted
 
(CPLineBreakMode) - lineBreakMode
 
(void) - mouseDown:
 
(unsigned) - mouseDownFlags
 
(void) - mouseEntered:
 
(void) - mouseExited:
 
(CPInteger) - nextState
 
(id) - objectValue
 
(void) - performClick:
 
(BOOL) - sendAction:to:
 
(int) - sendActionOn:
 
(BOOL) - sendsActionOnEndEditing
 
(void) - setAction:
 
(void) - setAlignment:
 
(void) - setBaseWritingDirection:
 
(void) - setContinuous:
 
(void) - setFloatValue:
 
(void) - setFont:
 
(void) - setFormatter:
 
(void) - setHighlighted:
 
(void) - setImagePosition:
 
(void) - setImageScaling:
 
(void) - setIntegerValue:
 
(void) - setIntValue:
 
(void) - setLineBreakMode:
 
(void) - setObjectValue:
 
(void) - setSendsActionOnEndEditing:
 
(void) - setState:
 
(void) - setStringValue:
 
(void) - setTarget:
 
(void) - setTextColor:
 
(void) - setTextShadowColor:
 
(void) - setTextShadowOffset:
 
(void) - setVerticalAlignment:
 
(BOOL) - startTrackingAt:
 
(void) - stopTracking:at:mouseIsUp:
 
(CPString- stringValue
 
(void) - takeDoubleValueFrom:
 
(void) - takeFloatValueFrom:
 
(void) - takeIntegerValueFrom:
 
(void) - takeIntValueFrom:
 
(void) - takeObjectValueFrom:
 
(void) - takeStringValueFrom:
 
(id) - target
 
(CPColor- textColor
 
(void) - textDidBeginEditing:
 
(void) - textDidChange:
 
(void) - textDidEndEditing:
 
(CPColor- textShadowColor
 
(CGSize) - textShadowOffset
 
(void) - trackMouse:
 
(BOOL) - tracksMouseOutsideOfFrame
 
(void) - unhighlightButtonTimerDidFinish:
 
(void) - updateTrackingAreas
 
(CPTextVerticalAlignment) - verticalAlignment
 
- Instance Methods inherited from CPView
(void) - addSubview:
 
(void) - addSubview:positioned:relativeTo:
 
(void) - addTrackingArea:
 
(CGRect) - adjustScroll:
 
(float) - alphaValue
 
(CAAnimation- animationForKey:
 
(CPDictionary- animations
 
(id) - animator
 
(BOOL) - autoresizesSubviews
 
(unsigned) - autoresizingMask
 
(BOOL) - autoscroll:
 
(CPColor- backgroundColor
 
(BOOL) - becomeFirstResponder
 
(CGRect) - bounds
 
(CGPoint) - boundsOrigin
 
(CGSize) - boundsSize
 
(BOOL) - canBecomeKeyView
 
(CGPoint) - center
 
(BOOL) - clipsToBounds
 
(CGPoint) - convertPoint:fromView:
 
(CGPoint) - convertPoint:toView:
 
(CGPoint) - convertPointFromBase:
 
(CGPoint) - convertPointToBase:
 
(CGRect) - convertRect:fromView:
 
(CGRect) - convertRect:toView:
 
(CGRect) - convertRectFromBase:
 
(CGRect) - convertRectToBase:
 
(CGSize) - convertSize:fromView:
 
(CGSize) - convertSize:toView:
 
(CPView- createEphemeralSubviewNamed:
 
(CPString- debug_description
 
(void) - didAddSubview:
 
(void) - display
 
(void) - displayIfNeeded
 
(void) - displayIfNeededInRect:
 
(void) - displayRect:
 
(void) - displayRectIgnoringOpacity:inContext:
 
(void) - dragImage:at:offset:event:pasteboard:source:slideBack:
 
(void) - dragView:at:offset:event:pasteboard:source:slideBack:
 
(void) - drawRect:
 
(CPAppearance- effectiveAppearance
 
(CPMenuItem- enclosingMenuItem
 
(CPScrollView- enclosingScrollView
 
(BOOL) - enterFullScreenMode
 
(BOOL) - enterFullScreenMode:withOptions:
 
(CPView- ephemeralSubviewNamed:
 
(void) - exitFullScreenMode
 
(void) - exitFullScreenModeWithOptions:
 
(CGRect) - frame
 
(CGPoint) - frameOrigin
 
(CGRect) - frameRectOfView:inSuperviewSize:
 
(CGSize) - frameSize
 
(CGRect) - frameWithNewSuperviewSize:
 
(BOOL) - hasCustomDrawRect
 
(BOOL) - hasCustomLayoutSubviews
 
(CPView- hitTest:
 
(BOOL) - hitTests
 
(id) - init
 
(BOOL) - inLiveResize
 
(BOOL) - isDescendantOf:
 
(BOOL) - isFlipped
 
(BOOL) - isHidden
 
(BOOL) - isHiddenOrHasHiddenAncestor
 
(BOOL) - isInFullScreenMode
 
(BOOL) - isOpaque
 
(CALayer- layer
 
(void) - layout
 
(CPView- layoutEphemeralSubviewNamed:positioned:relativeToEphemeralSubviewNamed:
 
(void) - layoutIfNeeded
 
(void) - lockFocus
 
(CPMenu- menuForEvent:
 
(BOOL) - mouseDownCanMoveWindow
 
(BOOL) - needsDisplay
 
(BOOL) - needsLayout
 
(BOOL) - needsPanelToBecomeKey
 
(CPView- nextKeyView
 
(CPView- nextValidKeyView
 
(void) - objectDidChangeTheme
 
(BOOL) - performKeyEquivalent:
 
(BOOL) - postsBoundsChangedNotifications
 
(BOOL) - postsFrameChangedNotifications
 
(CPView- previousKeyView
 
(CPView- previousValidKeyView
 
(CGRect) - rectForEphemeralSubviewNamed:
 
(void) - reflectScrolledClipView:
 
(CPArray) - registeredDraggedTypes
 
(void) - registerForDraggedTypes:
 
(void) - removeFromSuperview
 
(void) - removeTrackingArea:
 
(void) - replaceSubview:with:
 
(BOOL) - resignFirstResponder
 
(void) - resizeSubviewsWithOldSize:
 
(void) - resizeWithOldSuperviewSize:
 
(void) - rightMouseDown:
 
(CGSize) - scaleSize
 
(void) - scaleUnitSquareToSize:
 
(void) - scrollClipView:toPoint:
 
(void) - scrollPoint:
 
(void) - scrollRect:by:
 
(BOOL) - scrollRectToVisible:
 
(void) - setAlphaValue:
 
(void) - setAnimations:
 
(void) - setAppearance:
 
(void) - setAutoresizesSubviews:
 
(void) - setAutoresizingMask:
 
(void) - setBackgroundColor:
 
(void) - setBounds:
 
(void) - setBoundsOrigin:
 
(void) - setBoundsSize:
 
(void) - setCenter:
 
(void) - setClipsToBounds:
 
(void) - setDOMClassName:
 
(void) - setFrameOrigin:
 
(void) - setFrameSize:
 
(void) - setHidden:
 
(void) - setHitTests:
 
(void) - setLayer:
 
(void) - setNeedsDisplay:
 
(void) - setNeedsDisplayInRect:
 
(void) - setNeedsLayout
 
(void) - setNeedsLayout:
 
(void) - setNextKeyView:
 
(void) - setPostsBoundsChangedNotifications:
 
(void) - setPostsFrameChangedNotifications:
 
(void) - setScaleSize:
 
(void) - setSubviews:
 
(void) - setTag:
 
(void) - setThemeClass:
 
(BOOL) - setThemeState:
 
(void) - setToolTip:
 
(void) - setValue:forThemeAttribute:
 
(void) - setValue:forThemeAttribute:inState:
 
(void) - setWantsLayer:
 
(CPArray) - subviews
 
(CPView- superview
 
(CPInteger) - tag
 
(void) - unlockFocus
 
(void) - unregisterDraggedTypes
 
(BOOL) - unsetThemeState:
 
(void) - viewDidEndLiveResize
 
(void) - viewDidHide
 
(void) - viewDidLayout
 
(void) - viewDidMoveToSuperview
 
(void) - viewDidMoveToWindow
 
(void) - viewDidUnhide
 
(void) - viewWillDraw
 
(void) - viewWillLayout
 
(void) - viewWillMoveToSuperview:
 
(void) - viewWillMoveToWindow:
 
(void) - viewWillStartLiveResize
 
(CPView- viewWithTag:
 
(CGRect) - visibleRect
 
(BOOL) - wantsLayer
 
(void) - willRemoveSubview:
 
(CPWindow- window
 

Class Methods

(CPString+ defaultThemeClass
 
(id) + stepper
 
(id) + stepperWithInitialValue:minValue:maxValue:
 
(CPDictionary+ themeAttributes
 
- Class Methods inherited from CPControl
(void) + initialize
 
- Class Methods inherited from CPView
(Class) + animatorClass
 
(CAAnimation+ defaultAnimationForKey:
 
(CPMenu+ defaultMenu
 
(BOOL) + isHighDPIDrawingEnabled
 
(CPSet) + keyPathsForValuesAffectingBounds
 
(CPSet) + keyPathsForValuesAffectingFrame
 
(void) + setHighDPIDrawingEnabled:
 

Detailed Description

CPStepper is an implementation of Cocoa NSStepper.

This control displays a two part button that can be used to increase or decrease a value with a given interval.

Definition at line 2 of file CPStepper.h.

Method Documentation

◆ autorepeat()

- (BOOL) autorepeat
implementation

Synthesized accessor method.

Provided by category CPStepper(CPSynthesizedAccessors).

Definition at line 367 of file CPStepper.j.

◆ defaultThemeClass()

+ (CPString) defaultThemeClass
implementation

Reimplemented from CPView.

Definition at line 269 of file CPStepper.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Archives the view to a coder.

Parameters
aCoderthe object into which the view's data will be archived.

Reimplemented from CPControl.

Provided by category CPStepper(CPCoding).

Definition at line 328 of file CPStepper.j.

◆ increment()

- (int) increment
implementation

Synthesized accessor method.

Provided by category CPStepper(CPSynthesizedAccessors).

Definition at line 375 of file CPStepper.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the view from an archive.

Parameters
aCoderthe coder from which to initialize
Returns
the initialized view

Reimplemented from CPControl.

Provided by category CPStepper(CPCoding).

Definition at line 312 of file CPStepper.j.

◆ initWithFrame:()

- (id) initWithFrame: (CGRect)  aFrame
implementation

Initializes a CPStepper.

Parameters
aFramethe frame of the control
Returns
initialized CPStepper

Reimplemented from CPControl.

Definition at line 100 of file CPStepper.j.

◆ layoutSubviews()

- (void) layoutSubviews
implementation

Reimplemented from CPView.

Definition at line 176 of file CPStepper.j.

◆ maxValue()

- (int) maxValue
implementation

Synthesized accessor method.

Provided by category CPStepper(CPSynthesizedAccessors).

Definition at line 391 of file CPStepper.j.

◆ minValue()

- (int) minValue
implementation

Synthesized accessor method.

Provided by category CPStepper(CPSynthesizedAccessors).

Definition at line 407 of file CPStepper.j.

◆ performClickDown:()

- (IBAction) performClickDown: (id)  aSender
implementation

Perform a programatic click on down button.

Parameters
aSendersender of the action

Definition at line 260 of file CPStepper.j.

◆ performClickUp:()

- (IBAction) performClickUp: (id)  aSender
implementation

Perform a programatic click on up button.

Parameters
aSendersender of the action

Definition at line 251 of file CPStepper.j.

◆ setAutorepeat:()

- (void) setAutorepeat: (BOOL)  shouldAutoRepeat
implementation

Set if CPStepper should autorepeat.

Parameters
shouldAutoRepeatif YES, the first mouse down does one increment (decrement) and, after each delay of 0.5 seconds

Definition at line 205 of file CPStepper.j.

◆ setControlSize:()

- (void) setControlSize: (CPControlSize)  aControlSize
implementation

Sets the control's size.

Parameters
aControlSizethe control's size

Reimplemented from CPControl.

Definition at line 141 of file CPStepper.j.

◆ setDoubleValue:()

- (void) setDoubleValue: (double)  aValue
implementation

Set the current value of the stepper.

Parameters
aValuea float containing the value

Reimplemented from CPControl.

Definition at line 220 of file CPStepper.j.

◆ setEnabled:()

- (void) setEnabled: (BOOL)  shouldEnabled
implementation

Set if the CPStepper is enabled or not.

Parameters
shouldEnabledBOOL that define if stepper is enabled or not.

Reimplemented from CPControl.

Definition at line 154 of file CPStepper.j.

◆ setFrame:()

- (void) setFrame: (CGRect)  aFrame
implementation

Sets the frame size of the receiver to the dimensions and origin of the provided rectangle in the coordinate system of the superview. The method also posts a CPViewFrameDidChangeNotification to the notification center if the receiver is configured to do so. If the frame is the same as the current frame, the method simply returns (and no notification is posted).

Parameters
aFramethe rectangle specifying the new origin and size of the receiver

Reimplemented from CPView.

Definition at line 163 of file CPStepper.j.

◆ setIncrement:()

- (void) setIncrement: (int)  aValue
implementation

Synthesized accessor method.

Provided by category CPStepper(CPSynthesizedAccessors).

Definition at line 383 of file CPStepper.j.

◆ setMaxValue:()

- (void) setMaxValue: (int)  aValue
implementation

Synthesized accessor method.

Provided by category CPStepper(CPSynthesizedAccessors).

Definition at line 399 of file CPStepper.j.

◆ setMinValue:()

- (void) setMinValue: (int)  aValue
implementation

Synthesized accessor method.

Provided by category CPStepper(CPSynthesizedAccessors).

Definition at line 415 of file CPStepper.j.

◆ setValueWraps:()

- (void) setValueWraps: (BOOL)  aValue
implementation

Synthesized accessor method.

Provided by category CPStepper(CPSynthesizedAccessors).

Definition at line 359 of file CPStepper.j.

◆ stepper()

+ (id) stepper
implementation

Initializes a CPStepper with default values:

  • minValue = 0.0
  • maxValue = 59.0
  • value = 0.0
Returns
Initialized CPStepper

Definition at line 74 of file CPStepper.j.

◆ stepperWithInitialValue:minValue:maxValue:()

+ (id) stepperWithInitialValue: (float)  aValue
minValue: (float)  aMinValue
maxValue: (float)  aMaxValue 
implementation

Initializes a CPStepper with given values.

Parameters
aValuethe initial value of the CPStepper
minValuethe minimal acceptable value of the stepper
maxValuethe maximal acceptable value of the stepper
Returns
Initialized CPStepper

Definition at line 52 of file CPStepper.j.

◆ themeAttributes()

+ (CPDictionary) themeAttributes
implementation

Reimplemented from CPControl.

Definition at line 274 of file CPStepper.j.

◆ valueWraps()

- (BOOL) valueWraps
implementation

Synthesized accessor method.

Provided by category CPStepper(CPSynthesizedAccessors).

Definition at line 351 of file CPStepper.j.


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