More work. We now have the basics for nesting working, now we need all the interactions done properly. I want to use a new GnomeCanvasItem for the nesting parent as well. DnD will have to be done with our own protocol to provide all the feedback we want to provide. Miguel svn path=/trunk/; revision=1481
114 lines
3.1 KiB
Plaintext
114 lines
3.1 KiB
Plaintext
|
|
The E-Table package implements an editable table that provides
|
|
user-defined rendering, user-defined editing, sorting and grouping of
|
|
the objects displayed.
|
|
|
|
It is inspired by Java's Swing JTable object. There are models for
|
|
the actual table contents and for the table headers; they are the
|
|
actual repository of information.
|
|
|
|
The objects are rendered by various view objects. In the current code
|
|
base, we use we use GnomeCanvasItems to do the rendering. One for
|
|
each table and one for the headers.
|
|
|
|
* The main widget
|
|
|
|
e-table.c, e-table.h:
|
|
|
|
Implements a full widget. Uses various components described
|
|
below. Handles column display as well as grouping/nesting
|
|
|
|
* The Models
|
|
|
|
All of them are GtkObjects.
|
|
|
|
e-table-model.h, e-table-model.c:
|
|
|
|
These implement the abstract E-Table-Model class. You
|
|
can derive this object to create your own data repository.
|
|
|
|
These emits signals to notify the views about selection, and
|
|
changes in the model.
|
|
|
|
e-table-simple.h, e-table-simple.c:
|
|
|
|
A simple implementation of e-table-model that uses callback
|
|
routines (you provide the callbacks). For lazy people, like
|
|
me.
|
|
|
|
e-cell.c, e-cell.h:
|
|
|
|
These are actually mis-named. Objects of type e-cell know
|
|
about rendering a single cell, and these are attached to the
|
|
e-table-cols (described next).
|
|
|
|
The user provides the various rendering modes as e-cells (they
|
|
are actually column-rendering repositories).
|
|
|
|
This is just an abstract class. I will provide various
|
|
e-cells: a text cell, a checkbox cell, an image cell, and
|
|
perhaps an n-state image cell (one that switches the image when
|
|
the cell is clicked).
|
|
|
|
e-table-col.h, e-table-col.c:
|
|
|
|
Describes a single column (the size, the string displayed, the
|
|
rendering function for each row and comparison function for
|
|
this field).
|
|
|
|
|
|
* The Views
|
|
|
|
e-table-header.h, e-table-header.c:
|
|
|
|
These implement the ETableHeaderItem canvas item. This item is
|
|
used both to control the columns displayed as well as displaying them.
|
|
|
|
They describe what columns are shown in the screen and in
|
|
which order.
|
|
|
|
These emit signals: column-size-changed and structure-changed
|
|
(if a column is added/removed)
|
|
|
|
e-table-item.c, e-table-item.h
|
|
|
|
This is a canvas item that renders the contents of a
|
|
ETableModel into the screen.
|
|
|
|
e-table-header-item.c, e-table-header-item.h
|
|
|
|
This canvas item renders the ETableHeader headings.
|
|
|
|
e-cell-text.c, e-cell-text.h
|
|
|
|
Not really a view, but actually a derivative of e-cell that
|
|
implements text display: supports justification and font
|
|
setting. Will add color in the future most likely
|
|
|
|
e-cell-toggle.c, e-cell-toggle.h
|
|
|
|
A derivative of e-cell as well that support N-toggle values
|
|
using images.
|
|
|
|
e-cell-check.c, e-cell-check.h
|
|
|
|
An e-cell-toggle with two states only (for checkboxes).
|
|
|
|
* The Filters
|
|
|
|
e-table-sorted.c, e-table-sorted.h
|
|
|
|
This is an ETableModel that can sort an existing ETableModel.
|
|
|
|
e-table-subset.c, e-table-subset.h
|
|
|
|
Not finished, but it is just an ETableModel that happens to be
|
|
a subset of another ETableModel.
|
|
|
|
* Everything
|
|
|
|
e-table.c, e-table.h
|
|
|
|
In the future these guys will implement the whole widget for
|
|
doing table editing. Nothing done about these yet.
|