Expand description
UI composition.
The egui side of the viewer. draw is called once per frame from
DicomViewerApp::update. It paints the
panels in this order:
menu_bar— top.toolbar— top, beneath the menu bar.status_bar— bottom.study_browser— left side panel (optional).metadata_panel— right side panel (optional).viewport— central area, multi-cell grid.- Modal dialogs (
disclaimer,about).
§Drag-and-drop quirks (egui 0.29)
The sidebar uses dnd_drag_source. The inner selectable_label’s
response carries click sense (inner.inner.clicked()); the outer
response only has hover + drag. The viewport reads the payload via
DragAndDrop::payload::<SeriesDragPayload> and consumes it with
clear_payload on release. Do not wrap cells in dnd_drop_zone —
painted-not-allocated content makes the zone collapse.
Modules§
- theme
- Workstation Noir theme — radiology instrument-panel aesthetic.
Structs§
- UiState
- Transient UI state — dialog visibility, active tool, panel visibility,
in-progress measurement. Persists across frames but not across runs
(use
crate::config::UiConfigfor the latter).
Enums§
- Active
Tool - Which toolbar button is currently active. Drives mouse-drag behaviour in the viewport. Window/Level, Pan, and Zoom are mutually exclusive with the measurement tools; middle-mouse pan works in all modes.
- Grid
Layout - Viewport grid layout — number of columns × rows of cells.
- InProgress
- Click- or drag-based annotation under construction. All coords are in displayed-image pixels (post-decimation).
Functions§
- draw
- Paint every UI panel for the current frame. Called once per frame
from the app’s
updatemethod.