Module: reefvision.widgets.progress

Source: ./reefvision/widgets/progress.reef


Overview

reefvision.widgets.progress — determinate + indeterminate gauge (Wave 4)

object ProgressBar extends view.View. Determinate: filled bar + optional percent. Indeterminate: bouncing block advanced by pulse() (caller drives on timer / poll). wants_focus false. Insertion is Group.add.

Usage: let p = new progress.ProgressBar(cell.rect(1, 3, 30, 1), 100) p.set_value(50) win.add(p)


Objects

ProgressBar

Extends: view.View

Fields:

Name Type
value int
max_val int
indeterminate bool
pulse_pos int
pulse_dir int
show_percent bool

proc init(bounds: cell.Rect, max_val: int)

Methods:

override shared fn wants_focus(): bool

shared fn value(): int

shared fn max_val(): int

shared fn percent(): int

shared fn is_indeterminate(): bool

shared fn show_percent(): bool

exclusive proc set_value(value: int)

exclusive proc set_max(max_val: int)

exclusive proc set_indeterminate(on: bool)

exclusive proc set_show_percent(on: bool)

exclusive proc pulse()

override exclusive proc draw(buf: cell.CellBuffer, abs: cell.Rect, clip: cell.Rect, focused: bool, th: theme.Theme)


Functions

fn block_full(): int

█ = 9608, ░ = 9617

fn block_empty(): int


Generated by reefc doc