<--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../../aros.css' --->

Levelmeter.mui

MUIA_Levelmeter_CriticalSegments

Function

Set or retrieve the size of the critical zone.

Inputs

Initialize, set and get; ULONG. The default is 1. The stored value is
limited to the configured segment count.

Notes

The critical zone always occupies the highest segments. Changing the
value also re-limits WarningSegments to the remaining range and
requests an update redraw.

MUIA_Levelmeter_Horiz

Function

Select the orientation used by the Segments style.

Inputs

Initialize, set and get; BOOL. The default is TRUE. TRUE draws active
segments from left to right. FALSE draws them from bottom to top.

Notes

Changing orientation requests parent relayout and a full redraw. The
attribute is stored in Needle style but does not alter Needle drawing.

MUIA_Levelmeter_Label

Function

Declare a label string for the Levelmeter interface.

Inputs

Initialize, set and get; STRPTR.

Bugs

This AROS implementation has no local storage, getter, drawing or size
handling for the attribute. Supplying a string has no visible effect
and transfers no ownership to the object.

MUIA_Levelmeter_Segments

Function

Set or retrieve the segment count used by the Segments style.

Inputs

Initialize, set and get; ULONG from 1 through
MUIV_Levelmeter_Segments_Max. The default is 16. Values outside the
supported range are ignored.

Notes

Changing the count requests parent relayout and a full redraw.
CriticalSegments is limited to the new segment count and
WarningSegments is then limited to the remaining range.

MUIA_Levelmeter_Style

Function

Select the Levelmeter rendering style.

Inputs

Initialize, set and get; ULONG. The default is
MUIV_Levelmeter_Style_Needle. MUIV_Levelmeter_Style_Segments selects
the segmented display. Other values are ignored.

Notes

Changing the style requests parent relayout and a full redraw. The
stored Numeric value and Numeric range are not changed.

MUIA_Levelmeter_WarningSegments

Function

Set or retrieve the size of the warning zone.

Inputs

Initialize, set and get; ULONG. The default is 2. The stored value is
limited to the segment range remaining below the critical zone.

Notes

The warning zone occupies the highest segments below the critical
zone. Changing the value requests an update redraw.

MUIC_Levelmeter

Superclass

Numeric.mui

Description

Display the inherited Numeric value as either a legacy needle meter or
a segmented meter. MUIV_Levelmeter_Style_Needle is the default and
preserves the historical semicircular display.

MUIV_Levelmeter_Style_Segments maps the inherited Numeric value to an
active segment count with MUIM_Numeric_ValueToScale(). Horizontal
meters grow from left to right; vertical meters grow from bottom to
top. Critical segments occupy the high end of the scale, warning
segments occupy the range immediately below them, and the remaining
active segments use the normal color.

The class does not sample an input source or implement peak hold,
decay, FFT processing, channel management, or decibel conversion.
Applications update MUIA_Numeric_Value.

Methods

OM_NEW preserves MUIA_FillArea FALSE, initializes the Needle style,
16 segments, horizontal orientation, two warning segments and one
critical segment, then applies constructor attributes.

OM_SET applies Levelmeter attributes and passes the tag list to
Numeric. A live style switch acquires or releases segmented-display
pens. Style, segment-count and orientation changes request parent
relayout and a full redraw. Zone changes request an update redraw.
OM_GET returns the stored Levelmeter attributes.

MUIM_Setup obtains the legacy background pen and, only for the
Segments style, the three display colors. MUIM_Cleanup releases
each successfully obtained pen before Numeric cleanup.

MUIM_AskMinMax preserves the historical fixed Needle geometry. The
Segments style derives its primary minimum and default dimension from
MUIA_Levelmeter_Segments and permits expansion in both dimensions.

MUIM_Draw delegates to the segmented renderer when Segments is
selected. Needle drawing otherwise follows the historical frame,
scale and needle path.

Notes

Segments defaults to 16 segments, producing 13 normal, two warning
and one critical segment. The default active colors match the current
AHIRecord level display. If a segmented color pen cannot be obtained,
the renderer falls back to Zune theme pens. Inactive segments use the
Levelmeter background pen when available and MPEN_SHADOW otherwise.

MUIA_Numeric_Min, MUIA_Numeric_Max and MUIA_Numeric_Reverse remain
authoritative for value mapping. The class retains Numeric's raw-key
handling; applications that require a passive display must manage
focus and input accordingly.

Bugs

MUIA_Levelmeter_Label is declared but not implemented. The class does
not store or draw the supplied string.

In Needle style, MUIM_Setup still returns Numeric's successful setup
result when obtaining the legacy background pen fails. The Needle
draw path later uses the stored -1 failure sentinel without a fallback.

See Also

Numeric.mui, MUIA_Numeric_Value, MUIA_Numeric_Min,
MUIA_Numeric_Max, MUIA_Numeric_Reverse, MUIA_Levelmeter_Style,
MUIA_Levelmeter_Segments, MUIA_Levelmeter_Horiz