|
@@ -10,23 +10,23 @@ Process: [Main](../tutorial/application-architecture.md#main-and-renderer-proces
|
|
|
* `segmentStyle` String (optional) - Style of the segments:
|
|
|
* `automatic` - Default. The appearance of the segmented control is
|
|
|
automatically determined based on the type of window in which the control
|
|
|
- is displayed and the position within the window.
|
|
|
- * `rounded` - The control is displayed using the rounded style.
|
|
|
+ is displayed and the position within the window. Maps to `NSSegmentStyleAutomatic`.
|
|
|
+ * `rounded` - The control is displayed using the rounded style. Maps to `NSSegmentStyleRounded`.
|
|
|
* `textured-rounded` - The control is displayed using the textured rounded
|
|
|
- style.
|
|
|
- * `round-rect` - The control is displayed using the round rect style.
|
|
|
+ style. Maps to `NSSegmentStyleTexturedRounded`.
|
|
|
+ * `round-rect` - The control is displayed using the round rect style. Maps to `NSSegmentStyleRoundRect`.
|
|
|
* `textured-square` - The control is displayed using the textured square
|
|
|
- style.
|
|
|
- * `capsule` - The control is displayed using the capsule style.
|
|
|
- * `small-square` - The control is displayed using the small square style.
|
|
|
+ style. Maps to `NSSegmentStyleTexturedSquare`.
|
|
|
+ * `capsule` - The control is displayed using the capsule style. Maps to `NSSegmentStyleCapsule`.
|
|
|
+ * `small-square` - The control is displayed using the small square style. Maps to `NSSegmentStyleSmallSquare`.
|
|
|
* `separated` - The segments in the control are displayed very close to each
|
|
|
- other but not touching.
|
|
|
+ other but not touching. Maps to `NSSegmentStyleSeparated`.
|
|
|
* `mode` String (optional) - The selection mode of the control:
|
|
|
- * `single` - Default. One item selected at a time, selecting one deselects the previously selected item.
|
|
|
- * `multiple` - Multiple items can be selected at a time.
|
|
|
- * `buttons` - Make the segments act as buttons, each segment can be pressed and released but never marked as active.
|
|
|
+ * `single` - Default. One item selected at a time, selecting one deselects the previously selected item. Maps to `NSSegmentSwitchTrackingSelectOne`.
|
|
|
+ * `multiple` - Multiple items can be selected at a time. Maps to `NSSegmentSwitchTrackingSelectAny`.
|
|
|
+ * `buttons` - Make the segments act as buttons, each segment can be pressed and released but never marked as active. Maps to `NSSegmentSwitchTrackingMomentary`.
|
|
|
* `segments` [SegmentedControlSegment[]](structures/segmented-control-segment.md) - An array of segments to place in this control.
|
|
|
- * `selectedIndex` Integer (optional) - The index of the currently selected segment, will update automatically with user interaction. When the mode is multiple it will be the last selected item.
|
|
|
+ * `selectedIndex` Integer (optional) - The index of the currently selected segment, will update automatically with user interaction. When the mode is `multiple` it will be the last selected item.
|
|
|
* `change` Function (optional) - Called when the user selects a new segment.
|
|
|
* `selectedIndex` Integer - The index of the segment the user selected.
|
|
|
* `isSelected` Boolean - Whether as a result of user selection the segment is selected or not.
|