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

Balance.mui

MUIA_Balance_Quiet

Function

Declared constructor attribute with no implemented behavior.

Inputs

Header declares initialize-only LONG. The constructor recognizes the
identifier but ignores its value.

Notes

No state is stored and no local getter or setter implements this
attribute. It does not defer layout, suppress notifications, select
outline mode or change redraw behavior. The balancing-look preference
controls the display mode instead.

MUIC_Balance

Superclass

Area.mui

Description

Let the user redistribute sibling layout weights by dragging a separator
in a Group. Setup reads the parent's Group_Horiz once. A horizontal
group uses a vertical separator and horizontal weights; a vertical group
uses a horizontal separator and vertical weights. Changing parent
orientation later does not update this cached selection.
Place Balance between visible siblings in a normally laid-out Group,
with resizable members on both sides for normal dragging. Parent, child
list and sibling objects are borrowed. Keep group membership, visibility
and geometry stable during a drag. The implementation caches sibling
pointers and weight totals without lifetime protection. No public
position attribute or class-specific method is provided.

Methods

Setup registers a window mouse-button handler after successful Area
setup and returns TRUE without checking registration status. Cleanup
removes that handler and returns the superclass result. AskMinMax adds
three pixels to minimum separator thickness, fixes its default and
maximum thickness to that minimum, and allows MUI_MAXMAX along the other
axis. It returns TRUE.
SELECTDOWN inside the object starts a drag and enables mouse-move
events. Shift at mouse-down selects only the nearest visible sibling on
each side; this search does not skip fixed-size siblings. Without Shift,
dragging redistributes weights across visible, non-fixed siblings on
both sides. Shift state is sampled only at the start. Every other
changed-position move is skipped by a private toggle, which is not reset
at mouse-down.
Any subsequent mouse-button code other than SELECTDOWN ends the drag.
Changes already made are retained; there is no cancel-and-restore path.
A final parent Hide/Layout/Show and redraw occurs when weight totals
were established. HandleEvent always returns zero and does not delegate
to Area. It adds no keyboard resizing behavior.

Notes

Weight changes write Area's private UWORD fields directly and do not
issue attribute setters or weight notifications. Intermediate
calculations also use signed WORD values; large weights, counts or
coordinates can overflow or truncate. Normal dragging divides changes
among siblings with integer remainders, using rand and at most four
redistribution passes. Mouse-down calls srand(1), affecting the C
random-generator state used by this code. Exact weight conservation is
not guaranteed after truncation or the pass limit.
The balancing-look preference selects full live object display or an
outline preview. Both paths modify weights and invoke parent Layout
during dragging. The full-display path surrounds layout with Hide and
Show. Outline mode clears the parent background and draws sibling
frames, with crosses for resizable objects. Its attempted separator
redraw passes MADF_DRAWOBJECT as a method identifier rather than
invoking MUIM_Draw. Quiet has no effect on either mode.
Use the normal window-handler lifecycle; Cleanup does not implement drag
cancellation or restore weights. Draw calls Area, paints a three-pixel
separator with reversed edge pens while dragging, and returns TRUE;
without MADF_DRAWOBJECT it returns zero. No separately allocated private
drag buffer is owned.