wGauge

A gauge is a horizontal or vertical bar which shows a quantity. wGauge supports two working modes: determinate and indeterminate progress.

Appearance:
Superclass:wControl
Styles:
StylesDescription
wGaHorizontalCreates a horizontal gauge.
wGaVerticalCreates a vertical gauge.
wGaSmoothCreates smooth progress bar with one pixel wide update step.
wGaProgressReflect the value of gauge in the taskbar button under Windows 7 and later.

Consts

wGaHorizontal = 0
wGaVertical = 0x00000004
wGaSmooth = 0x00000001
wGaProgress = 1152921504606846976'i64

Procs

proc setRange(self: wGauge; range: int) {...}{.inline, raises: [Exception],
                                     tags: [RootEffect].}
Sets the range (maximum value) of the gauge.
proc getRange(self: wGauge): int {...}{.inline, raises: [], tags: [].}
Returns the maximum position of the gauge.
proc setValue(self: wGauge; value: int) {...}{.raises: [Exception], tags: [RootEffect].}
Sets the position of the gauge. Use a value >= maximum to clear the taskbar progress.
proc getValue(self: wGauge): int {...}{.inline, raises: [], tags: [].}
Returns the current position of the gauge
proc pulse(self: wGauge) {...}{.inline, raises: [Exception], tags: [RootEffect].}
Switch the gauge to indeterminate mode.
proc pause(self: wGauge) {...}{.inline, raises: [Exception], tags: [RootEffect].}
Pause the taskbar progress.
proc error(self: wGauge) {...}{.inline, raises: [Exception], tags: [RootEffect].}
Stop the taskbar progress and indicate an error.
proc isVertical(self: wGauge): bool {...}{.inline, raises: [], tags: [].}
Returns true if the gauge is vertical and false otherwise.
proc init(self: wGauge; parent: wWindow; id = wDefaultID; range = 100; value = 0;
         pos = wDefaultPoint; size = wDefaultSize; style: wStyle = wGaHorizontal) {...}{.raises: [
    wNilAccess, wWindowError, wCursorError, wBrushError, Exception, IndexDefect,
    wFontError], tags: [RootEffect].}
Initializes a gauge control.
proc Gauge(parent: wWindow; id = wDefaultID; range = 100; value = 0; pos = wDefaultPoint;
          size = wDefaultSize; style: wStyle = wGaHorizontal): wGauge {...}{.inline,
    discardable, raises: [wNilAccess, wWindowError, wCursorError, wBrushError,
                        Exception, IndexDefect, wFontError], tags: [RootEffect].}
Constructor.

Methods

method getDefaultSize(self: wGauge): wSize {...}{.raises: [], tags: [].}
Returns the default size for the control.
method getBestSize(self: wGauge): wSize {...}{.inline, raises: [], tags: [].}
Returns the best acceptable minimal size for the control.
method release(self: wGauge) {...}{.raises: [Exception], tags: [RootEffect].}
Release all the resources during destroying. Used internally.