Files
evolution/widgets/table/e-table-item.h
Christopher James Lahey 7699b8996a This were moved to widgets/e-text/ a while ago but never removed. They
2000-02-24  Christopher James Lahey  <clahey@helixcode.com>

        * widgets/e-text.c, widgets/e-text.h, e-text-event-processor.c,
        e-text-event-processor.h, e-text-event-processor-emacs-like.c,
        e-text-event-processor-emacs-like.h,
        e-text-event-processor-types.h: This were moved to widgets/e-text/
        a while ago but never removed.  They have now been removed.

        * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Removed some
        warnings from this file.  Made tooltips disappear when you're
        finished with them.

        * widgets/e-minicard/test-reflow.c,
        widgets/e-minicard/test-minicard.c,
        widgets/e-minicard/test-minicard-label.c: Commented out unused
        about_callback functions.

        * widgets/e-minicard/e-reflow.c: Made e-reflow pass an EFocus to
        its e-minicard children.

        * widgets/e-minicard/e-minicard.c: Made e-minicard take and return
        an EFocus for its "has_focus" argument.  This makes shift-tab work properly.

        * widgets/e-minicard/e-minicard-label.c: Made e-minicard-label take and return
        an EFocus for its "has_focus" argument.  Made the font that
        e-minicard-label uses only be allocated once.

        * e-util/e-canvas-utils.h: Fixed the comment at the top and added
        #ifndef __E_CANVAS_UTILS__.

        * e-util/Makefile.am: Added e-xml-utils.c and
        e-xml-utils.h.

        * e-util/e-xml-utils.h, e-util/e-xml-utils.c: Added files for some
        xml utilities.

        * e-util/e-util.h: Added type EFocus which describes which
        direction the focus will be coming from.


in mail:

2000-02-24  Christopher James Lahey  <clahey@helixcode.com>

        * message-list.c: Changed this to not use the "x" and "y"
        arguments to e-table-item.


in widgets/e-table:

2000-02-24  Christopher James Lahey  <clahey@helixcode.com>

        * e-table-subset-variable.c, e-table-subset-variable.h: A new
        model which is a subset, but you can add and remove rows.

        * test-table.c: Added a thaw method for use with the
        e-table-subset (emits model_changed.)  Adapted to the changes to
        e_table_item.  Properly parse headers.  Adapted to the changes to
        e_table, including creating example xml spec data.

        * test-cols.c, test-check.c: Added a thaw method for use with the
        e-table-subset (emits model_changed.)  Adapted to the changes to
        e_table_item.

        * e-table.c, e-table.h: Reworked e-table to use the ETable
        grouping system.  The only difference for the interface is that
        instead of passing in a column_spec and a grouping_spec, you pass
        in a single string that is an xml format that includes both pieces
        of information.

        * e-table-subset.h: Added rules for emacs to do correct
        indentation.

        * e-table-subset.c: Implemented freezing.  No signals are emitted
        while frozen and "model_changed" is emitted when thawed.

        * e-table-sorted.h: ETableSortedClass has ETableSubset as its
        parent object instead of ETableSubsetClass.  Fixed this.

        * e-table-simple.c, e-table-simple.h: Implemented the thaw method.
        Use of simple now requires an extra argument (the thaw method.)

        * e-table-model.h, e-table-model.c: Added e_table_model_freeze and
        e_table_model_thaw.

        * e-table-item.h, e-table-item.c: Reworked this a bit to make it
        provide some things the new group system needed and to make
        inter-item keyboard focus work.  Changed the external interface
        only in the list of arguments it recognizes and signals it emits.
        Instead of "x" and "y", you have to use
        e_canvas_item_move_absolute and instead of emitting a
        "height_changed" signal, it emits a "resize" signal.  There's new
        "has_focus", "width", and "height" arguments and a function to get
        the currently focused column.

        * e-table-header-item.c: Got rid of some warnings here.  Changed
        the

        * e-table-group-leaf.h, e-table-group-leaf.c,
        e-table-group-container.h, e-table-group-container.c: New types to
        make e_table_group work properly.

        * e-table-group.h, e-table-group.c: Completely reworked e-table
        grouping.  e-table-group now uses a hierarchical structure.

        * e-cell.h: Added e_cell_print.  This doesn't work yet.

        * e-cell.c: Made e_cell_realize exist.  (It was improperly named
        e_cell_view_realize in the .c.)

        * e-cell-text.c: Made the blinking cursor disappear properly.

        * check-filled.xpm, check-empty.xpm: Made these const char *[]
        instead of char *[] to avoid compiler warnings.

        * Makefile.am: Added e-table-group-container.c,
        e-table-group-container.h, e-table-group-leaf.c,
        e-table-group-leaf.h, e-table-subset-variable.c,
        e-table-subset-variable.h.

svn path=/trunk/; revision=1915
2000-02-24 06:51:23 +00:00

109 lines
3.0 KiB
C

#ifndef _E_TABLE_ITEM_H_
#define _E_TABLE_ITEM_H_
#include <libgnomeui/gnome-canvas.h>
#include "e-table-model.h"
#include "e-table-header.h"
#define E_TABLE_ITEM_TYPE (e_table_item_get_type ())
#define E_TABLE_ITEM(o) (GTK_CHECK_CAST ((o), E_TABLE_ITEM_TYPE, ETableItem))
#define E_TABLE_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_TABLE_ITEM_TYPE, ETableItemClass))
#define E_IS_TABLE_ITEM(o) (GTK_CHECK_TYPE ((o), E_TABLE_ITEM_TYPE))
#define E_IS_TABLE_ITEM_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TABLE_ITEM_TYPE))
typedef struct {
GnomeCanvasItem parent;
ETableModel *table_model;
ETableHeader *header;
int x1, y1;
int width, height;
int cols, rows;
/*
* Ids for the signals we connect to
*/
int header_dim_change_id;
int header_structure_change_id;
int table_model_change_id;
int table_model_row_change_id;
GdkGC *fill_gc;
GdkGC *grid_gc;
GdkGC *focus_gc;
GdkBitmap *stipple;
unsigned int draw_grid:1;
unsigned int draw_focus:1;
unsigned int mode_spreadsheet:1;
unsigned int renderers_can_change_size:1;
unsigned int cell_views_realized:1;
int focused_col, focused_row;
/*
* Realized views, per column
*/
ECellView **cell_views;
int n_cells;
/*
* Lengh Threshold: above this, we stop computing correctly
* the size
*/
int length_threshold;
GSList *selection;
GtkSelectionMode selection_mode;
/*
* During edition
*/
int editing_col, editing_row;
void *edit_ctx;
} ETableItem;
typedef struct {
GnomeCanvasItemClass parent_class;
void (*row_selection) (ETableItem *eti, int row, gboolean selected);
void (*resize) (ETableItem *eti);
} ETableItemClass;
GtkType e_table_item_get_type (void);
/*
* Focus
*/
void e_table_item_focus (ETableItem *eti, int col, int row);
void e_table_item_unfocus (ETableItem *eti);
gint e_table_item_get_focused_column (ETableItem *eti);
/*
* Selection
*/
void e_table_item_select_row (ETableItem *e_table_Item, int row);
void e_table_item_unselect_row (ETableItem *e_table_Item, int row);
/*
* Handling the selection
*/
const GSList*e_table_item_get_selection (ETableItem *e_table_Item);
GtkSelectionMode e_table_item_get_selection_mode (ETableItem *e_table_Item);
void e_table_item_set_selection_mode (ETableItem *e_table_Item,
GtkSelectionMode selection_mode);
gboolean e_table_item_is_row_selected (ETableItem *e_table_Item,
int row);
void e_table_item_leave_edit (ETableItem *eti);
void e_table_item_enter_edit (ETableItem *eti, int col, int row);
void e_table_item_redraw_range (ETableItem *eti,
int start_col, int start_row,
int end_col, int end_row);
#endif /* _E_TABLE_ITEM_H_ */