CK Core Motif
CK Core Motif

Reusable native components

Reusable widgets belong in the toolkit when their interaction, geometry, keyboard behavior and semantic contract are useful across independent Xt applications. An application-specific document rule or workflow belongs with its model or application owner.

Component requirements

A native component needs a public resource/callback contract, explicit child ownership, geometry negotiation, keyboard and focus behavior, lifecycle cleanup and an accessibility projection. Its tests should exercise actual widget behavior, multiple instances, resizing and destruction; a screenshot or an unused API declaration is insufficient.

Unicode paragraph/capture facilities and accessibility providers are examples of generic reusable services already implemented in the development source. They separate immutable values and lifetime rules from application behavior.

Current and future widgets

NeedToolkit facilityReuse boundary
Collapsible inspector/settings sectionsXmDisclosureStable child ownership, focus transfer and expansion state; application owns the section contents.
Labelled form sectionsXmFormSectionToolkit owns header/footer presentation and the content host; applications own content children and form/data semantics.
Empty content viewsXmEmptyStateToolkit owns optional icon/message/action presentation; applications own the empty predicate and action behavior.
Transient notificationsXmToastToolkit owns one bounded per-instance presentation and timer; applications own placement, queue policy and action behavior.
Command discoveryXmCommandPaletteToolkit owns copied labels, filtering and focus/lifecycle presentation; applications own command IDs, model policy and dispatch.
Loading placeholdersXmSkeletonToolkit owns bounded placeholder drawing and optional timer; applications own loading state, geometry and replacement view.
Row actionsXmRowActionsToolkit owns copied action presentation and dispatch; applications own row identity, placement, reveal policy and list semantics.
Drop-target feedbackXmDropHighlightToolkit owns a static valid/invalid outline; applications own DnD admission, transfer ownership, drop callbacks and lifetime.
Status presentationXmStatusBarToolkit owns copied item presentation and bounded priority overflow; applications own status meaning, updates and any overflow menu policy.
Toolbar actionsXmToolbarToolkit owns copied action presentation and an ordinary overflow menu; applications own action meaning, shortcuts, dispatch and navigation policy.
Collapsible sidebarsXmSidebarToolkit owns the bounded toggle/content presentation and focus restoration; applications own content, navigation and selection policy.
Anchored suggestionsXmAutoSuggestBoxToolkit owns copied suggestion presentation and generation checks; applications own providers, I/O, IDs, commit meaning and UI-thread scheduling.
Compact icon/text presentationXmIconLabel, XmDividerToolkit owns copied labels, bounded geometry and direction-aware drawing; applications own pixmap lifetime, placement and visibility.
Avatar presentationXmAvatarToolkit owns copied initials and bounded fallback drawing; applications own pixmap lifetime, placement, visibility and any interaction wrapper.
Numeric navigationNative ScrollBar with accessible Value/actionsApplication maps its model range to the native control; toolkit owns native interaction and semantics.
Unicode fields and editorsText/TextField plus bounded text contextsToolkit owns input, shaping and widget projection; application owns document operations and undo.
Custom canvasesAccessibility provider APIApplication supplies semantic objects; transport and native lifetime remain shared toolkit services.

The development disclosure section API provides a stable content host, explicit expansion state and transition callbacks. Its public contract and installed native ARM64 fixture results are documented together. Application usability and other-architecture acceptance remain separate.

Other recurring patterns can justify future shared components: labelled field rows, searchable selectors, notification/status areas and split-pane navigation. These are design candidates, not available APIs or promised release features. Each should be implemented only with a concrete reusable contract and meaningful native tests. Prefer composition over copying application-specific panels into the toolkit.

Window-owned modal dialogs

Use XmDIALOG_PRIMARY_APPLICATION_MODAL for a dialog that blocks its ancestor windows while independent top-level windows remain usable. The scope is enforced by the client toolkit and does not require a particular window manager. Nested primary dialogs block their parent dialogs too. Parallel primary dialogs each retain their own ancestor restrictions.

Use XmDIALOG_FULL_APPLICATION_MODAL when unrelated windows in the same application must also be blocked. New top-level windows and unrelated modal popups remain blocked until that enclosing modal scope is released. A primary dialog nested inside a full modal does not reopen independent branches.

An application still owns dialog intent, target identity and workflow decisions. Destroying or popping down a dialog must release its input restriction; it must not approve or redirect an application operation. See the native fixture instructions and current validation scope.

Adding a component

Start from a repeated interaction that existing widgets cannot express cleanly. Check the inherited widget set before adding a new class. Keep reusable geometry, input, presentation and accessibility behavior in the fork; keep file formats, document rules and business operations in consumers.

Deliver the public header/resources/callbacks, implementation, installed-library fixture, a minimal construction example and a documentation page together. Test two independent instances, keyboard-only operation, resizing, focus transfer, callback-triggered destruction and accessible state/action delivery. Qualify the exact installed header/library cohort before adoption. Record changes in fork history and distinguish source availability from verified platforms in status.