Skip to main content

Module tree

Module tree 

Source
Expand description

The file tree: rendering, keyboard navigation, context menu, inline rename, clipboard and trash.

Architecture notes:

  • Rendering is stateless: TreeMsg mutates the model and update_view rebuilds the whole gtk::ListBox from TreeModel::visible_rows. A tree this size does not need widget recycling, and a full rebuild keeps row state trivially consistent.
  • Selection lives as paths in the model, not in ListBox selection, so it survives rebuilds as the tree expands and collapses.
  • Keyboard input is captured in the capture phase on the scrolled window, so arrows work before the user clicks a row. While an inline rename entry is focused the capture defers entirely to that entry.
  • Filesystem events are debounced (buffered + flushed once after a quiet window) so bulk operations do not re-render once per event.

Structs§

Tree
Rendered state of the tree component.
TreeInit
Everything the tree needs that only the app knows.
TreeWidgets

Enums§

TreeMsg
User intent for the tree component.
TreeOutput
Notable events the tree reports upwards.