Liking cljdoc? Tell your friends :D

charm.components.progress

Progress bar component.

Usage: (def my-progress (progress-bar :width 40))

;; Update progress (0.0 to 1.0): (set-progress my-progress 0.5)

;; In view function: (progress-view my-progress)

Progress bar component.

Usage:
  (def my-progress (progress-bar :width 40))

  ;; Update progress (0.0 to 1.0):
  (set-progress my-progress 0.5)

  ;; In view function:
  (progress-view my-progress)
raw docstring

bar-stylesclj

Predefined progress bar styles.

Predefined progress bar styles.
sourceraw docstring

complete?clj

(complete? bar)

Check if progress is complete (100%).

Check if progress is complete (100%).
sourceraw docstring

decrementclj

(decrement bar)
(decrement bar amount)

Decrement progress by amount (default 0.01).

Decrement progress by amount (default 0.01).
sourceraw docstring

incrementclj

(increment bar)
(increment bar amount)

Increment progress by amount (default 0.01).

Increment progress by amount (default 0.01).
sourceraw docstring

percentclj

(percent bar)

Get current progress as 0.0-1.0.

Get current progress as 0.0-1.0.
sourceraw docstring

percent-intclj

(percent-int bar)

Get current progress as 0-100 integer.

Get current progress as 0-100 integer.
sourceraw docstring

progress-barclj

(progress-bar &
              {:keys [width percent bar-style show-percent full-style
                      empty-style percent-style id]
               :or {width 40
                    percent 0.0
                    bar-style :default
                    show-percent false
                    id (rand-int 1000000)}})

Create a progress bar component.

Options: :width - Total width in characters (default 40) :percent - Initial progress 0.0-1.0 (default 0) :bar-style - Keyword from bar-styles or custom map (default :default) :show-percent - Show percentage text (default false) :full-style - Style for filled portion :empty-style - Style for empty portion :percent-style - Style for percentage text :id - Unique ID

Create a progress bar component.

Options:
  :width           - Total width in characters (default 40)
  :percent         - Initial progress 0.0-1.0 (default 0)
  :bar-style       - Keyword from bar-styles or custom map (default :default)
  :show-percent    - Show percentage text (default false)
  :full-style      - Style for filled portion
  :empty-style     - Style for empty portion
  :percent-style   - Style for percentage text
  :id              - Unique ID
sourceraw docstring

progress-initclj

(progress-init bar)

Initialize progress bar, returns [bar cmd].

Initialize progress bar, returns [bar cmd].
sourceraw docstring

progress-updateclj

(progress-update bar _msg)

Update progress bar state. Progress bars are typically updated directly via set-progress rather than through messages. Returns [bar nil].

Update progress bar state. Progress bars are typically updated
directly via set-progress rather than through messages.
Returns [bar nil].
sourceraw docstring

progress-viewclj

(progress-view bar)

Render the progress bar to a string.

Render the progress bar to a string.
sourceraw docstring

resetclj

(reset bar)

Reset progress to 0.

Reset progress to 0.
sourceraw docstring

set-progressclj

(set-progress bar p)

Set progress (0.0 to 1.0).

Set progress (0.0 to 1.0).
sourceraw docstring

set-progress-intclj

(set-progress-int bar p)

Set progress as 0-100 integer.

Set progress as 0-100 integer.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close