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

PanelTitle.mui

MUIA_PanelTitle_ClickHook

Function

Call a hook after a title press.

Inputs

Initialize, set and get, borrowed struct Hook pointer; default NULL.

Notes

For SELECTDOWN inside the object, attempt Toggle first when collapsible,
then call CallHookPkt(hook, titleObject, NULL). Return value is ignored;
the event is consumed. The hook can run even when no collapse occurred.
Keep callback and object state valid through the call; Get returns the
borrowed pointer with TRUE.

MUIA_PanelTitle_Collapsed

Function

Store the title state used for arrow and separator drawing.

Inputs

Initialize, set and get, BOOL; default FALSE.

Notes

Direct Set affects this title only; it does not hide Panel content. Use
Panel_Collapsed for content visibility. Toggle relies on parent feedback
to update this field. Set stores the value and requests full redraw when
changed and set up; no explicit parent relayout. Get returns TRUE with
the stored value.

MUIA_PanelTitle_Collapsible

Function

Enable parent-directed toggling and reserve arrow space.

Inputs

Initialize, set and get, BOOL; default FALSE.

Notes

Toggle requires a live Panel parent. This flag does not itself change
collapsed state. Enabling after Setup does not allocate missing arrow
specifications. Set stores the value and requests full redraw when
changed and set up; no explicit parent relayout. Get returns TRUE with
the stored value.

MUIA_PanelTitle_DrawStateIndicator

Function

Enable drawing of the collapse arrow.

Inputs

Initialize only locally, BOOL; default FALSE. No local Set/Get case.

Notes

Drawing also requires Collapsible and valid arrow specifications. Top
uses right/down for collapsed/expanded; Left uses up/right. Arrow space
is reserved whenever Collapsible is set, regardless of this option. No
arrow-allocation failure is returned to the caller.

MUIA_PanelTitle_Position

Function

Select top or left title rendering.

Inputs

Initialize, set and get, ULONG: Top (1, default), Left (2).

Notes

Sets size/drawing orientation within the title, not parent Group
orientation. Other values are not a supported no-title mode. Runtime Set
manages arrows in the wrong order, using the old position before storing
the new one; prefer construction-time choice and recreate for another
arrangement. Get returns TRUE with the stored value.

MUIA_PanelTitle_ShowSeparator

Function

Draw a separator while the title is expanded.

Inputs

Initialize, set and get, BOOL; default FALSE.

Notes

Top draws a bottom line; Left draws a side line. Collapsed suppresses
drawing but not the size allowance. Set stores the value and requests
full redraw when changed and set up; no explicit parent relayout. Get
returns TRUE with the stored value.

MUIA_PanelTitle_Text

Function

Replace or read the owned title text.

Inputs

Initialize, set and get, terminated STRPTR; default NULL.

Notes

Text is copied with StrDup; Get returns a borrowed copy pointer with
TRUE. Set frees the old copy before duplicating the input, so first copy
an obtained pointer if reusing it. Replacement invalidates measurements
and requests full redraw only when set up; no explicit parent relayout.
Avoid empty strings for left vertical rendering. Copy failure leaves no
text without an independent error result.

MUIA_PanelTitle_TextPosition

Function

Align title text along its reading direction.

Inputs

Initialize, set and get, ULONG: Centered (0, default), Left (1), Right
(2).

Notes

Horizontal Left/Right align near the corresponding edge. Vertical
Left/Right align near top/bottom. Unknown values draw centered. Set
requests full redraw when changed and set up. Get returns TRUE with the
stored value.

MUIA_PanelTitle_Vertical

Function

Stack characters for a left-side title.

Inputs

Initialize, set and get, BOOL; default FALSE.

Notes

Only effective at Left position. Uses bytewise graphics Text calls and
measures character A; do not use empty text. Does not rotate glyphs. Set
stores the value and requests full redraw when changed and set up; no
explicit parent relayout. Get returns TRUE with the stored value.

MUIC_PanelTitle

Superclass

Area.mui

Description

An Area with owned text, optional state arrow and separator.
PanelTitle is intended as a Panel child: Toggle writes to its parent,
which must synchronize the title's state. Vertical left-side text
stacks bytes rather than rotating characters.

Methods

Setup installs a mouse handler and prepares arrow resources;
Cleanup removes the handler, and Dispose frees the title's resources.
A SELECTDOWN in the title calls Toggle when collapsible, invokes an
optional hook and consumes the event. Collapsible reserves arrow space
even when its indicator is hidden. Update-only draws are not handled.

Bugs

Empty vertical text can divide by zero. Text copying and repeated
constructor Text tags have allocation/leak limitations. Position changes
and repeated Setup can leave incorrect or leaked arrow resources;
changing Collapsible after Setup does not allocate arrows. Keep the
title's position and collapse configuration fixed for its lifetime.

MUIM_PanelTitle_Toggle

Synopsis

IPTR result = DoMethod(obj, MUIM_PanelTitle_Toggle);

Function

Request the inverse collapsed state from the parent Panel.

Inputs

obj - Live PanelTitle attached to a live Panel; preserve both through
synchronous Set and notifications.

Result

TRUE when Collapsible is nonzero; FALSE otherwise. TRUE reports the
request path, not a verified parent-state change.

Notes

Set parent Panel_Collapsed to the inverse of the stored title state,
then request full redraw if set up. The method does not directly change
its own state and does not invoke ClickHook. The click handler invokes
the hook separately afterward. PanelGroup cached state is not updated
automatically.