UXFilePanel
UXFilePanel is the toolkit-drawn modal file panel for backends with no
OS dialog (GEM, Win32 under Wine). It is modelled on the Atari ST’s
Universal Item Selector and provides:
- a scrolling, sorted, mask-filtered directory list
- clickable column headers (name and size, ascending or descending)
- editable Mask and Selection lines
- a recent-files view
- a button column that opens files and manages them: Find, Rename, Copy,
Move and Delete (Delete confirms through
UXAlert)
Apps do not construct it.
UXOpenPanel chooses per backend: it
uses the native NSOpenPanel or GetOpenFileName where the platform has
one, and calls runToolkit() to drive this panel where it does not.
Application code asks for a file the same way on every backend.
All panels the app opens share session memory: the last directory browsed (re-opening returns there) and the recently chosen files. Both outlive any individual panel.
The moving parts
Section titled “The moving parts”UXFilePanelBack: the dialog-face backdrop.UXFileListView: the rows, drawn and hit-tested against the panel’s scroll state.UXFileHeader: the clickable sort header.UXFileRow: one listing line (name, directory flag, size).UXGroupBox: frames the button column, and is usable on its own.
Entry point
Section titled “Entry point”u8* run(u8* prompt, u8* startDir)Runs the modal panel and returns the chosen full path, or null on
Cancel. UXOpenPanel.runToolkit calls it; the driver’s modal loop does
the blocking.