Resolve XTempHistory.h: keep the temperature branch's honest-empty
'no data threshold ...C' bottom line on top of main's min/max/avg
line (same computation, plus the empty-state branch).
Resolve XProcessList.h: keep the process-manager selection
highlight + the new draw_text_font PID line. Resolve
XTempHistory.h: take main's bottom min/max/avg line (the middle was
git's misaligned jumble of both legend versions); the honest-empty
'no data' handling comes with the temperature-monitor merge next.
Resolve InstData.h conflict: keep main's scaled_font() (monitor
proportions audit) AND the branch's inst_cap_font() /
inst_cap_font_prop() / inst_prop_font_fit() / inst_px_for_cap()
(Inst* proportions audit); union the includes (<map> added).
Verified by syntax-compiling the XTachometer, InstDigitalReadout and
InstNameplate demo TUs against the merged header.
The glyph box farthest corner in the radial direction must stay
inside the tick ring (inner end r-10) with 4 px clearance, so a
wide 4-digit label never crosses the dial rim (the Rust demo showed
6400/8000 clipped at the rim at 720x480). Single-digit labels move
inward only ~4 px; verified by re-shoot.
- XTachometer: the "RPM" title baseline now hangs below the top
numeral's bottom edge instead of a fixed cy - r*0.55, so it
cannot collide with the neighbouring numerals on small dials
(found in the Python demo at r=73, where 3200/RPM/4800 jammed).
- XVerticalBar: the "peak N" label shrinks 14px -> 11px when the
bar is too narrow for it to fit inside the frame.
Face/state labels white on coloured faces at 16-18 px (G6);
rocker/toggle/slide/rotary numerals and state labels 16 px with
widened boxes; panel header bars taller for 19 px titles.
LED labels 28 px with leads ending above them; panel-lamp discs
shrunk so 17 px labels clear them; RGB swatches 24 px with white
letters; Beacon dome clear of bar, FLASH/BEACON 16 px inset;
StackLight tier letters white/light-grey 24 px, base raised so the
STACK title clears it.
Scale labels 16 px, alarm names 14 px with clearance (right-aligned
where they faced the vessel, dot/label separated); % readouts 18 px
below the vessel; SightGlass tube widened; BarMeter bar lowered so
title and top label clear the border.
Seg14/16 + LedDigits fill widget (label band removed, ghost
segments dimmed, diagonals thinned); DigitalReadout digits scale
to display; Nameplate engraving fit to plate width; NeedleVu
red-zone numerals + VU clear of scale; dial numerals 7-8% of
diameter with titles inside below top numerals; KeySwitch NO KEY
light-on-dark; HorizontalTank capsule ends inside widget.
Shared scaled-font helpers in InstData.h (cap-height convention).
- Graphs (XHistoryGraph/XNetGraph/XTempHistory): dynamic left margin from
widest Y label (fixes Y labels overflowing the plot), legend wrapped to
two lines when too wide, legend on top, 5 Y labels, humanised units in
NetGraph, TempHistory on the PY layout (now top-right, min/max/avg bottom,
threshold label above the line). Top/bottom Y labels hang clear of the
title and the strip below the plot.
- XTachometer: numerals 7.5% of dial diameter bold just inside the tick
ring, RPM bold centred in-dial, readout enlarged below the hub,
redline numerals in red.
- All 14 audit widgets: font sizes derived from widget dimensions per
the proportions audit (titles 16px bold, hero values 24-48px bold,
body/legend 13-16px, min 11px); CoreGrid 4x2 for 8 cores; UsageBar
labels outside the bar; StackBar block centred with grown bar;
VerticalBar value inside the bar; ArcGauge centre 40-48px + load
sub-label + endpoints; DonutGauge centre 36-44px, ring 8-10% of
diameter, duplicate title dropped; ProcessList 13px rows, colour-coded
CPU bars after the number; LoadBadge centred value block with 1/5/15
sub-labels; MonitorButton scaled label/dot/status + detail line;
MonitorGrid ceil(sqrt(n)) columns; SysBox hero 28-32px + max + bar %.
- New xframe::scaled_font() helper in InstData.h (scalable misc-fixed
XLFD, cached per size/bold) + font_text_width/draw_text_font.
- Deviations from the audit spec: UsageBar label capped at 40px (the
literal 0.45x rule gives 209px in the 464px-tall demo bar); SysBox
hero uses 10% of height clamped 20-32px (spec 6-7% conflicts with
the audited-correct PY value of 10.3%).
All 15 widget demos rebuild clean and were screenshot-verified.
Single-widget monitor app (XTempHistory, 80 C threshold) reading
/sys/class/thermal + /sys/class/hwmon every 2 s. hot_dallas has no
thermal sensors, so the app shows the widget empty state (no data,
no fake readings) with a title that says so. Adds additive
XTempHistory::clear() and an empty-state legend.
Live process table from /proc (sortable columns, in-cell CPU% bars,
colour-coded rows, refresh()), load-average badge (1/5/15 min,
threshold colours, uptime from /proc), monitor button bound to a
process (/proc scan), systemd unit (systemctl is-active) or TCP port
(connect to localhost) with poll()/update() and click-for-details,
grid panel of monitor buttons with one shared poll_all(), composite
resource box (title + big number + history + usage bar). Header-only
C++, demo mains (polling loop for the live three), examples, Xvfb
screenshots.
Gradient usage bar (green->yellow->red, absolute scale), stacked
multi-segment bar with legend, vertical bar meter with scale +
peak-hold marker (click resets peak), round tachometer (needle,
redline zone, digital readout, peak hold), semicircular arc gauge
with coloured zones + big %, circular progress ring with centred %.
Header-only C++, demo mains, examples, Xvfb screenshots.
Every Ind* widget recomputes its lines from a loaded OHLCV series:
private recompute_lines() (moved out of the constructor), public
set_series()/load_csv()/clear_series()/series() matching the Stock*
chart widgets, same loader and CSV spec (StockData.h). Constructor
defaults keep the seeded 250-bar template; failed loads leave the
series untouched; clear_series() empties lines and draws clean.
Params that were constructor-only (fast/slow/period/...) are now
stored as members so a reloaded series uses the same settings.
Tests: widgets/tests/ind_csv_harness.cpp + test_ind_csv.py — 250/250
harnesses build, 250/250 numeric PASS, 39/39 screenshots PASS, 250/250
demo mains build. Docs: docs/stock-market-csv-data.md Indicators
section rewritten; all 250 cdoc pages updated (update-ind-csv.py).
xframe_core_apply_prop gains a Phase 4 block, first in the type-specific
section: for Stock*/Inst* classes, pairs apply together from the model
(minimum/maximum -> set_range, y-min/y-max -> set_y_range, anchor-N-bar/
price -> set_anchor) and every other table prop goes through the named
dispatch in registry.h (kind from find_prop). Unhandled props fall through
to the generic branches. background drives set_bg_color via
set_named_color(bg-color) for these classes, and a non-numeric value
falls back to set_value_str (Seg displays). props.h must be included before
X11 headers (Xlib.h defines Bool as int, breaking PropKind::Bool) and the
Bool kind is the else branch, never named.
Also fixes -Wmisleading-indentation in StockSectorComparison::set_labels_text.
8 tank widgets gain set_alarm_hi_hi/hi/lo/lo_lo (member bands_);
StockSectorComparison gains set_labels_text (pipe-separated labels);
InstControlPanel gains set_grid_rows/set_grid_cols. tools/gen_phase4_props.py
parses the C headers and emits the per-widget Inspector tables (C++ and
Rust) plus the generator capability table from one source of truth.
set_anchors() leaves only 2 anchors, but draw() indexed anchors_[2]
unconditionally (abort under _GLIBCXX_DEBUG; stale slot read otherwise).
ParallelChannel now falls back to the midline for the outer line and
draws only the anchors present; Pitchfork falls back to a trendline
through the two anchors (tines need the third anchor).
The GtkMenuButton standalone demo includes the component-local
(core/xframe_core.h) copy first, which lacked xf::draw_triangle_left
that the direction work (C1) calls -- the demo build failed while
the designer build worked (registry.h includes another component
first, whose core include resolves to the shared copy, and the
include guard then skips this copy). Mirror of draw_triangle_right
in this file.
ComboBox/ComboBoxText/ListBox set_items (pipe-separated, live canvas
only; generator keeps emitting per-item calls); ListBox multi-select
(set_multi_select, toggle on click, draw highlights the set);
Scrollbar lower_ + page_increment_ (clamp/thumb/Home/End honour lower,
PgUp/PgDn use page-increment); Entry password_ + show_password_ (masked
with * unless revealed); MenuButton direction_ (0=Up 1=Down 2=Left
3=Right 4=None, arrow zone moves to the matching side); TextView
cursor_visible_ (gates the caret). Shared core gains
SStyle_Manager::add_widget_style (per-widget style clone that owns its
font, so delete_style is safe on it; unlike add_border_style, which
shares the base font) and xf::draw_triangle_left.
The drag removal left on_button_release with an unused button
parameter in GtkWindow and GtkApplicationWindow. Add (void)button.
TForm uses button, so it needed no change. Build is 0 warnings.
Root cause: GtkWindow, TForm and GtkApplicationWindow implemented
title-bar drag-to-move (drag_/dragging_ set on title-bar press,
on_motion moved the whole widget). In the generated app that let the
user drag a window widget around by its title bar -- widgets behaved
like design objects. Verified: dragging Toplevel_001 (GtkWindow) by
its title bar moved it before this change; after, it stays put.
Regular widgets (Button etc.) never moved -- only the three window
widgets had drag code. Removed the drag-to-move from all three
(members, press-to-start-drag, motion move, release clear). The
designer canvas still moves widgets via its own set_bounds path, so
design-time moving is unaffected. The Rust repo shares these widget
headers (/opt/lightgui/widgets), so Rust-generated apps get the fix
too.
alloc_rgb was emitted unconditionally and warned as unused under
-Wall -Wextra when the project has no background. It is now emitted
only when has_bg. GtkTreeView Column/Node are public because
set_columns/set_roots/get_roots expose them in public signatures.
Rust fixtures were regenerated from this fixed gen_matrix.
Embed the XFrame canvas in the designer window: a GtkDrawingArea
(double-buffered FALSE) in the GtkFixed canvas area, with the pure-X11
core (xframe_canvas_core) drawing placed widgets on its X window and
the DrawingArea GTK signals (draw, button-press/release, motion,
key-press) driving place/move/resize/delete/select. Palette selection
is wired in-process (no selection/place files); the core owns the
Placed vector and exposes accessors for later save/codegen steps.
Ports the standalone layout interaction (16px handles, 8px hit pad,
450ms double-click rule, Delete/BackSpace/Escape) without modifying
widgets/layout/main_layout.cpp.
The canvas is deliberately NOT a GtkSocket + raw X child window: that
design rendered and interacted correctly but killed the whole app with
an untrapped XInputExtension BadWindow error (GDK X error handler
calls _exit(1)) whenever another toplevel (e.g. the code window) was
closed. Bisected against the parent binary (survives) and a socket
with no child (survives); removing the foreign GdkWindow, setting the
event mask with raw XSelectInput, and forwarding all canvas events to
gtk_main_do_event did not fix it, and without a foreign window GDK
drops canvas events entirely. A GtkDrawingArea keeps the canvas a
normal GDK-managed window (verified with /tmp/proto_da.c). Also fixes
a latent -Wmaybe-uninitialized in GtkInfoBar.h (bx/by/bw/bh).