Conversation
Porting the WPF workstation into Compression.NativeUI starts with the pieces every screen needs: ViewModelBase over NativeForms' ObservableObject, the relay commands (with an explicit CommandManager, since NativeForms has no ambient requery signal), the archive-entry view model and the per-user settings file. + Theming/VectorIcon.cs rasterizes the icon artwork the WPF resource dictionary described as vector drawings, so every icon stays sharp at any size instead of shipping pre-baked bitmaps. + Theming/IconSet.cs transcribes all 23 icons layer-for-layer from Icons.xaml.
Both are ported screen-for-screen from their WPF counterparts. + VirtualRowView draws only the rows on screen and leaves their content to the caller, so a multi-hundred-megabyte buffer previews as text or hex without a control per line — and the hex dump keeps its per-byte frequency colouring, which a text-and-subitems list row cannot express. + HistogramControl and StatisticsControl carry over the byte-frequency chart, randomness tests, distribution and content analysis unchanged. + RatioBarControl keeps the isometric glass box; IGraphics has no polygon fill, so it rasterizes through the same shape renderer the icons use. * PreviewWindow decodes images through NativeForms, which also covers PCX, CUR and ANI; TIFF is the one input the WPF codec path had that this does not.
The About box renders the embedded README through NativeForms' rich-text model; rich text has no table primitive, so README tables become padded monospace columns. ! File associations are Windows registry keys. The window lists what the build recognises on every platform, but off Windows the apply and remove actions are disabled and say so rather than pretending to write something.
Same seven synthetic data patterns, same per-test budget, same family-tinted algorithm list and the two result tabs. The family tint moves from a WPF row style onto the grid's row-background selector, and the sortable numeric columns carry explicit comparisons so they sort by value rather than by rendered text.
… panels StructureViewControl keeps the template editor, the grouped type accordion, the colour-washed hex dump and the parsed value tree; the tree becomes a TreeListView so the offset, type, name and value stay in real columns. * StructureHexView builds on VirtualRowView, so only the rows on screen are drawn instead of rendering the whole dump to a bitmap.
AnalysisWindow keeps all nine tools behind one toolbar: magic scan, fingerprints, entropy map, heatmap, trial decompression, chain reconstruction, statistics, strings and structure. * HeatmapGridControl draws its 16x16 map as one owner-drawn control rather than 256 child controls, and EntropyBarControl draws the region strip directly, so neither rebuilds a visual tree on every navigation. * Per-row tints (entropy ramp, format hue, trial success) move from WPF row-loading handlers onto the grid's row-background selector.
The 1,000-line options view model ports almost verbatim — only its two brush properties become plain colours, which the view now paints with. The dialog keeps the conditional rows (a knob appears only when the format and method offer it) and the schema-driven per-format knobs underneath, including their DependsOn visibility.
The binning, its cache and the click drill-down index port unchanged — they were always plain computation. Only the drawing changed: * tiles compose into one pixel buffer blitted in a single call, instead of tens of thousands of fill commands per redraw; * the platter and cylinder-stack views invert the projection per pixel — radius picks the track, angle picks the sector — rather than building thousands of annular wedge geometries, which is both exact and one pass over the viewport.
DefragmentWindow carries all eight actions — defragment, optimize, shrink, purge, wipe-empty, compact, scramble and the staged 7z solid-block regroup — with the live block map, cancellation, and the layout-profile editor behind it. * The two WPF partials merge into one class: the split existed only so the second could rewire the XAML-declared Run handler at runtime, which a directly-wired handler makes unnecessary. * The layout-profile editor keeps its inline validation; the state class it drives already lived in Compression.Lib and ports untouched. + TileContentsWindow drills into a clicked tile.
…dialog * The LBA columns are right-aligned rather than monospaced: a NativeForms cell style carries colours and alignment but not a font, and right alignment already lines the digits up.
The wizard view model ports almost verbatim; its two dispatcher calls become a marshaller the view supplies, since only the view knows which control owns the UI thread. ! HeatmapExplorer, HeatmapExplorerViewModel and DiskImageTreeViewModel are not ported: nothing in the WPF UI instantiates them, and the only mentions left are stale comments referring to a HeatmapExplorerWindow that does not exist.
MainForm carries the menu, toolbar, breadcrumb trail, entry list, drop overlay, status bar, context menu and column sorting; the 1,700-line main view model ports almost verbatim, with its dispatcher calls and its reach for a global current window replaced by an owner and a marshaller the view supplies. * The existing mount screen becomes MountWindow under Tools, rather than being the whole application. ! NativeForms cannot render a window to a bitmap, so --screenshot= now only builds the fixture and shows the window; the capture is taken from outside. Every input that made the old pictures reproducible is unchanged.
Every screen it had now exists in the NativeForms shell, so the WPF project, its solution entry and the Wine launcher that existed only to run it on Linux are gone. The release build publishes the one frontend for win-x64 and linux-x64. * Screenshot capture moves out of the process and onto CI. The WPF shell rendered its own visual tree to a PNG; NativeForms has nothing that draws a window to a bitmap, so the app builds the fixture and shows the window and an X11 capture tool takes the picture. Both screenshot workflows move to Linux, which is also the build the pictures should show. * run-wine.sh is deleted: the shell runs natively on Linux now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports every WPF window to NativeForms and deletes
Compression.UI.Compression.NativeUIbecomes the only frontend, on Windows and Linux.IGraphicshas no polygon fill.ubuntu-latest+ Xvfb: NativeForms cannot render a window to a bitmap in-process.HeatmapExplorer,HeatmapExplorerViewModel,DiskImageTreeViewModel. Nothing in the WPF app instantiated them; the only references toHeatmapExplorerwere comments.Stacked on #382. Retarget to
mainonce that merges.Verified: builds on its own against current
main;Compression.Tests.Ui34/34 green. A command-by-command audit against the deleted sources (all 26 view-model commands, menus, columns, settings, CLI verbs) matched apart from three gaps, fixed separately in #392.