本文へスキップ

Slider

連続値または段階値に対応した、制御されたネイティブ Slider です。

#インポート

quickgui から SwiftUiSlider をインポートします。

use quickgui::*;

#使い方

SwiftUiSlider::new(1, volume)
    .range(0.0, 100.0)
    .step(1.0)
    .label("Volume")

#API リファレンス

項目を展開すると説明と完全なシグネチャが表示されます。ダッシュは宣言に既定値が記載されていないことを示します。

SwiftUiSlider

ソースを見る
pub fn new(id: u64, value: f64) -> Self
rangepub fn range(mut self, minimum: f64, maximum: f64) -> Self—

Configures range for this part.

pub fn range(mut self, minimum: f64, maximum: f64) -> Self
ソースを見る
steppub fn step(mut self, step: f64) -> Self—

Configures step for this part.

pub fn step(mut self, step: f64) -> Self
ソースを見る
labelpub fn label(mut self, label: impl Into<Arc<str>>) -> Self—

Configures label for this part.

pub fn label(mut self, label: impl Into<Arc<str>>) -> Self
ソースを見る
test_idpub fn test_id(mut self, test_id: impl Into<Arc<str>>) -> Self—

Configures test id for this part.

pub fn test_id(mut self, test_id: impl Into<Arc<str>>) -> Self
ソースを見る
modifierpub fn modifier(mut self, modifier: SwiftUiModifier) -> Self—

Configures modifier for this part.

pub fn modifier(mut self, modifier: SwiftUiModifier) -> Self
ソースを見る
modifierspub fn modifiers(mut self, modifiers: impl IntoIterator<Item = SwiftUiModifier>) -> Self—

Configures modifiers for this part.

pub fn modifiers(mut self, modifiers: impl IntoIterator<Item = SwiftUiModifier>) -> Self
ソースを見る
on_value_changepub fn on_value_change(mut self, enabled: bool) -> Self—

Configures on value change for this part.

pub fn on_value_change(mut self, enabled: bool) -> Self
ソースを見る