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

Colorfield.mui

MUIA_Colorfield_Blue

Function

Set or retrieve the blue component.

Inputs

Initialize, set and get, ULONG in 0..0xffffffff. Default zero.

Notes

Values are stored at full 32-bit precision and copied by value. RGB and
component tags share storage and take effect in tag order. Set adds an
RGB notification before the original tags, then recolors the screen pen
when usable; this changes the color map, not just local display pixels.
Get reports stored requested color, not a fresh screen measurement.

MUIA_Colorfield_Green

Function

Set or retrieve the green component.

Inputs

Initialize, set and get, ULONG in 0..0xffffffff. Default zero.

Notes

Values are stored at full 32-bit precision and copied by value. RGB and
component tags share storage and take effect in tag order. Set adds an
RGB notification before the original tags, then recolors the screen pen
when usable; this changes the color map, not just local display pixels.
Get reports stored requested color, not a fresh screen measurement.

MUIA_Colorfield_Pen

Function

Set or retrieve the stored screen pen number.

Inputs

Initialize, set and get, ULONG input truncated to UBYTE. With no Pen tag
the initial stored number is zero, but automatic allocation remains
selected.

Notes

An input whose low byte is not 255 sets fixed-pen mode. Low byte 255
does not set that flag and does not clear it if already set. Get returns
the stored 0..255 value, with no availability check; 255 also represents
allocation failure or a released allocated pen. Fixed pens are borrowed
and recolored during setup and color updates. Set releases an owned pen
before replacing the number but does not obtain another; see class
limitations. Repeated constructor Pen tags can leave fixed mode set even
when the final number is 255.

MUIA_Colorfield_RGB

Function

Set or retrieve all three stored components.

Inputs

Initialize and set with a non-NULL pointer to three readable ULONG
values in red, green, blue order. Get returns a pointer to the internal
three-element array. Default all zero.

Notes

Input values are copied synchronously; no input pointer is retained. The
getter pointer is borrowed until disposal and its contents change on
later sets. Set from the same array is supported. Use attributes to
change values so notifications and screen updates occur. RGB Set adds
Red, Green and Blue notifications with final stored values before
forwarding the original tag list. The components use the full 32-bit
range.

MUIA_Colorfield_Red

Function

Set or retrieve the red component.

Inputs

Initialize, set and get, ULONG in 0..0xffffffff. Default zero.

Notes

Values are stored at full 32-bit precision and copied by value. RGB and
component tags share storage and take effect in tag order. Set adds an
RGB notification before the original tags, then recolors the screen pen
when usable; this changes the color map, not just local display pixels.
Get reports stored requested color, not a fresh screen measurement.

MUIC_Colorfield

Superclass

Area.mui

Description

Display an editable color using a screen pen. Initial RGB components are
zero. Without an explicit fixed pen, Setup requests an exclusive pen. A
fixed pen is borrowed and its screen color is overwritten with the
stored RGB; its previous color is not restored. Use only a pen that the
caller is entitled to recolor. The class stores pen numbers in UBYTE,
even though the attribute is declared ULONG.
Setup returns zero on Area failure, otherwise one, including no-screen
and allocation-failure paths. Failed allocation sets the no-pen flag and
pen value 255. Cleanup releases only locally allocated pens, sets their
stored value to 255, clears the no-pen flag and delegates to Area. Fixed
pens are neither released nor restored. Complete normal Cleanup before
disposal; there is no local Dispose override.

Methods

AskMinMax adds one to both minima and sixteen to both defaults, sets
both maxima MUI_MAXMAX and returns zero. Draw calls Area and handles
full/update flags. It fills with the stored pen or a shadow/background
pattern when allocation failed, then clears the RastPort fill pattern.
It returns zero normally, one when no RastPort exists after flag
acceptance.
ConnectParent delegates first and, if already set up with no stored
color map, invokes pen setup. That path requires a valid screen and does
not perform the Setup method's no-screen check.

Notes

Color writes copy values in tag order, then deliver superclass
notifications before changing the screen color. Component writes add an
RGB notification; RGB writes add all three component notifications,
using final stored values before the original tags. Equal values are not
suppressed. When set up with a screen and no no-pen flag, SetRGB32
recolors the stored pen; redraw is requested only above depth eight.
Other users of a fixed pen can therefore change appearance too.
Pen replacement releases any locally allocated pen but does not allocate
a replacement in OM_SET. Setting a sentinel does not clear an
already-set fixed-pen flag. A no-pen flag from a failed allocation is
not cleared by an ordinary subsequent Pen or RGB set. These are
implementation limitations, not a guarantee of switching between
automatic and fixed modes.