3.3.5 Controls
3.3.5.1 Button
3.3.5.2 Checkbox
3.3.5.3 Choice
3.3.5.4 Radio  Choice
3.3.5.5 List  Choice
3.3.5.6 Table
3.3.5.7 Slider
3.3.5.8 Progress
3.3.5.9 Input
3.3.5.10 Label
3.3.5.11 Image
3.3.5.12 Spacer
On this page:
Progress
Progress.at_  value
Progress.Style
Progress.Style.horizontal
Progress.Style.vertical
Progress.Style.horizontal_  label
Progress.Style.vertical_  label

image

class

class gui.Progress():

  implements WindowChildView

  constructor (

    value :: ObsOrValue.of(View.SizeInt) = 0,

    ~label: label :: ObsOrValue.of(maybe(View.LabelString)) = #false,

    ~max_value: max_value :: ObsOrValue.of(View.PosSizeInt) = 100,

    ~enable: enable :: ObsOrValue.of(Boolean) = #true,

    ~margin: margin :: ObsOrValue.of(View.Margin) = [2, 2],

    ~min_size: min_size :: ObsOrValue.of(View.Size) = [#false, #false],

    ~stretch: stretch :: ObsOrValue.of(View.Stretch) = [#true, #true],

    ~styles: styles :: List.of(Progress.Style) = [#'horizontal],

    ~window_callbacks: window_callbacks :: maybe(WindowCallbacks) = #false

  )

 

property

property (prog :: gui.Progress).at_value :: Obs.of(SizeInt)

Creates a read-only (from the user’s perspective) progress gauge that show value out of max_value progress.

The styles list must include one of #'horiziontal and #'vertical.

The Progress.at_value property returns an observable that is updated whenever the progress gauge’s state changes through value as an observable.

A progress-gauge style option:

  • #'horizontal: Creates a horizontal progress gauge, where #'vertical and #'horizontal are mutually exclusive.

  • #'vertical: Creates a vertical progress gauge.

  • #'horizontal_label: When the progress gauge has a label, show it to the left of the gauge. Horizontal label placement is the default if #'vertical_label is not specified, and #'horizontal_label and #'vertical_label are mutually exclusive.

  • #'vertical_label: When the progress gauge has a label, show it above the gauge.