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

Scale.mui

MUIA_Scale_Horiz

Function

Store or retrieve the requested scale orientation.

Inputs

Initialize, set and get, BOOL. Default TRUE for horizontal. FALSE
selects the unimplemented vertical branch.

Notes

A changed value requests full redraw; every supplied tag is still
forwarded to Area, including unchanged values. Get writes the stored
BOOL to caller-owned IPTR storage and returns TRUE. Set returns the
superclass result. There is no relayout request, so changing this
attribute does not itself update size negotiation. In vertical mode only
superclass drawing occurs and no class-specific sizes are added.

MUIC_Scale

Superclass

Area.mui

Description

Draw a horizontal percentage scale from 0% to 100%. This is a decorative
Area subclass with no value attribute, range configuration, numeric
input or automatic association with Gauge. The default orientation is
horizontal. Vertical orientation can be stored and retrieved but has no
scale rendering or class-specific size implementation.

Methods

Setup calls Area and measures the literal string "0% 100%" using the
current font; it caches that width and the font height. It returns zero
if Area setup fails, otherwise one. Horizontal AskMinMax adds the cached
width to minimum/default widths, permits maximum width MUI_MAXMAX and
adds font height plus four pixels to all height fields. In vertical mode
it leaves superclass size fields unchanged. It returns zero.
Draw calls Area and, in horizontal mode, paints a bar, endpoint labels
and alternating long/short marks. It selects a power-of-two subdivision
count from available width and measured strings. The fit estimate
measures subdivision indices followed by percent signs, rather than the
actual percentage labels; it is not a guarantee that labels fit.
Endpoint labels are 0% and 100%; intermediate displayed values use
integer division. Temporary Zune text objects are freed after use;
allocation failure skips the affected label. Draw returns zero and has
no local draw-flag check.

Notes

No persistent strings, bitmap, pen or native gadget are allocated by
this class. Use the normal Area lifecycle with a live font and render
context. Orientation changes request redraw but do not request relayout
or remeasure text. No vertical drawing is supplied after such a change.