Skip to content

Table viewer and editor for egui

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

romixlab/egui_tabular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TODO: Add crates and docs badge

Customizable egui table viewer and editor.

Fast and responsive table viewer and editor, that only shows visible rows. Data backend is fully generic, allowing implementations based on vectors, files, databases and other data structures.

TODO: Add web demo.

Features

  • Cells UI and table information is provided through the TableBackend trait.
  • Custom cell viewer and editor ui, any egui or user widgets can be used.
  • Built-in cell viewers and editors through VariantBackend:
    • String, string list, numbers, booleans, custom enums
    • Date, SI values, currency
  • Data import with automatic column mapping based on names.
    • CSV support.
    • XLS support.
  • Manual column mapping to one of the choices provided by the backend (combo box above columns).
  • Undo / Redo support.
  • No need to keep all data in memory (if backend supports it).
  • Support for sorting.
  • Support for filtering based on custom user ui from the TableBackend trait.
  • Keyboard shortcuts and navigation.
  • Copy-paste support for cells and blocks of cells.
  • Ability to add lints to cells and change their background color.
    • Add icons
  • Support for cells with varying heights.
  • Drag&drop column reordering.
  • Export to CSV.
  • Stick to bottom mode for viewing real time data.
  • Visual state can be persisted on disk.
  • Disable/enable rows and columns (show a hatch pattern when disabled).
  • Change a column type and try to turn data into requested type (VariantBackend, only from code now).
  • Derive macro to show Vec as table.

Non-goals

  • Become Excel or G.Sheets replacement.

Potential features

  • Export to XLS / XLSX

Keyboard shortcuts

  • Ctrl+V - paste block
  • Ctrl+C - copy block
  • Ctrl+A - select all (when not editing)
  • Tab - commit edit and edit cell to the right
  • E - edit cell
  • Esc - cancel edit or unselect
  • Left, Right, Up, Down - move selection
    • +Shift - expand selection
  • N - append new row
  • Shift + click - expand selection

Project status

Experimental — many of the essential features are implemented, but documentation is incomplete and examples are absent.

Alternatives

This project borrows some ideas from the great egui-data-table. Check it out if you don't need CSV/XLS import with column mapping or want to show some data based on a vector. The idea behind TableBackend trait in this crate is to allow more advanced data retrieval, for example from a database.

About

Table viewer and editor for egui

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages