Mac Developer Library

Developer

AppKit Framework Reference NSLevelIndicator Class Reference

Options
Deployment Target:

On This Page
Language:

NSLevelIndicator

NSLevelIndicator is a subclass of NSControl that displays a value on a linear scale. More...

Inheritance


Import Statement


import AppKit @import AppKit;

Availability


Available in OS X v10.4 and later.
  • Sets the minimum value the receiver can represent to minValue.

    Declaration

    Swift

    var minValue: Double

    Objective-C

    @property double minValue

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

    See Also

    – minValue

  • Returns the receiver’s minimum value.

    Declaration

    Swift

    var minValue: Double

    Objective-C

    @property double minValue

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Sets the maximum value the receiver can represent to maxValue.

    Declaration

    Swift

    var maxValue: Double

    Objective-C

    @property double maxValue

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

    See Also

    – maxValue

  • Returns the receiver’s maximum value.

    Declaration

    Swift

    var maxValue: Double

    Objective-C

    @property double maxValue

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Sets the receiver’s warning value to warningValue.

    Declaration

    Swift

    var warningValue: Double

    Objective-C

    @property double warningValue

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Returns the receiver’s warning value.

    Declaration

    Swift

    var warningValue: Double

    Objective-C

    @property double warningValue

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Sets the receiver’s critical value to criticalValue.

    Declaration

    Swift

    var criticalValue: Double

    Objective-C

    @property double criticalValue

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Returns the receiver’s critical value.

    Declaration

    Swift

    var criticalValue: Double

    Objective-C

    @property double criticalValue

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Sets where tick marks appear relative to the receiver.

    Declaration

    Swift

    var tickMarkPosition: NSTickMarkPosition

    Objective-C

    @property NSTickMarkPosition tickMarkPosition

    Discussion

    This method has no effect if no tick marks have been assigned (that is, numberOfTickMarks returns 0).

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Returns how the receiver’s tick marks are aligned with it.

    Declaration

    Swift

    var tickMarkPosition: NSTickMarkPosition

    Objective-C

    @property NSTickMarkPosition tickMarkPosition

    Discussion

    The default alignments are NSTickMarkBelow and NSTickMarkLeft.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Sets the number of tick marks displayed by the receiver (which include those assigned to the minimum and maximum values) to count.

    Declaration

    Swift

    var numberOfTickMarks: Int

    Objective-C

    @property NSInteger numberOfTickMarks

    Discussion

    By default, this value is 0, and no tick marks appear. The number of tick marks assigned to a slider, along with the slider’s minimum and maximum values, determines the values associated with the tick marks.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Returns the number of tick marks associated with the receiver.

    Declaration

    Swift

    var numberOfTickMarks: Int

    Objective-C

    @property NSInteger numberOfTickMarks

    Discussion

    The tick marks assigned to the minimum and maximum values are included.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Sets the number of major tick marks displayed by the receiver.

    Declaration

    Swift

    var numberOfMajorTickMarks: Int

    Objective-C

    @property NSInteger numberOfMajorTickMarks

    Discussion

    The count must be less than or equal to the number of tick marks returned by numberOfTickMarks. For example, if the number of tick marks is 11 and you specify 3 major tick marks, the resulting level indicator will display 3 major tickmarks alternating with 8 minor tick marks, as in the example shown in Figure 1.

    Figure 1Major and minor tick marks in a level indicator image: Art/disk_space.eps is missing from your submission.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Returns the number of major tick marks associated with the receiver.

    Declaration

    Swift

    var numberOfMajorTickMarks: Int

    Objective-C

    @property NSInteger numberOfMajorTickMarks

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Returns the receiver’s value represented by the tick mark at index (the minimum-value tick mark has an index of 0).

    Declaration

    Swift

    func tickMarkValueAtIndex(_ index: Int) -> Double

    Objective-C

    - (double)tickMarkValueAtIndex:(NSInteger)index

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Returns the bounding rectangle of the tick mark identified by index (the minimum-value tick mark is at index 0).

    Declaration

    Swift

    func rectOfTickMarkAtIndex(_ index: Int) -> NSRect

    Objective-C

    - (NSRect)rectOfTickMarkAtIndex:(NSInteger)index

    Discussion

    If no tick mark is associated with index, the method raises a NSRangeException.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.