Files
evolution/widgets/e-table/e-cell.c
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

177 lines
4.0 KiB
C

/*
* e-cell.c: base class for cell renderers in e-table
*
* Author:
* Miguel de Icaza (miguel@kernel.org)
*
* (C) 1999 Helix Code, Inc
*/
#include <config.h>
#include "e-cell.h"
#include "e-util/e-util.h"
#define PARENT_TYPE gtk_object_get_type()
static ECellView *
ec_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
{
return NULL;
}
static void
ec_realize (ECellView *e_cell)
{
}
static void
ec_kill_view (ECellView *ecell_view)
{
}
static void
ec_unrealize (ECellView *e_cell)
{
}
static void
ec_draw (ECellView *ecell_view, GdkDrawable *drawable,
int model_col, int view_col, int row, gboolean selected,
int x1, int y1, int x2, int y2)
{
g_error ("e-cell-draw invoked\n");
}
static gint
ec_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row)
{
g_error ("e-cell-event invoked\n");
return 0;
}
static gint
ec_height (ECellView *ecell_view, int model_col, int view_col, int row)
{
g_error ("e-cell-event invoked\n");
return 0;
}
static void
ec_focus (ECellView *ecell_view, int model_col, int view_col, int row, int x1, int y1, int x2, int y2)
{
ecell_view->focus_col = view_col;
ecell_view->focus_row = row;
ecell_view->focus_x1 = x1;
ecell_view->focus_y1 = y1;
ecell_view->focus_x2 = x2;
ecell_view->focus_y2 = y2;
}
static void
ec_unfocus (ECellView *ecell_view)
{
ecell_view->focus_col = -1;
ecell_view->focus_row = -1;
ecell_view->focus_x1 = -1;
ecell_view->focus_y1 = -1;
ecell_view->focus_x2 = -1;
ecell_view->focus_y2 = -1;
}
static void *
ec_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
{
return NULL;
}
static void
ec_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *context)
{
}
static void
e_cell_class_init (GtkObjectClass *object_class)
{
ECellClass *ecc = (ECellClass *) object_class;
ecc->realize = ec_realize;
ecc->unrealize = ec_unrealize;
ecc->new_view = ec_new_view;
ecc->kill_view = ec_kill_view;
ecc->draw = ec_draw;
ecc->event = ec_event;
ecc->focus = ec_focus;
ecc->unfocus = ec_unfocus;
ecc->height = ec_height;
ecc->enter_edit = ec_enter_edit;
ecc->leave_edit = ec_leave_edit;
}
static void
e_cell_init (GtkObject *object)
{
}
E_MAKE_TYPE(e_cell, "ECell", ECell, e_cell_class_init, e_cell_init, PARENT_TYPE);
void
e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row)
{
E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->event (
ecell_view, event, model_col, view_col, row);
}
ECellView *
e_cell_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
{
return E_CELL_CLASS (GTK_OBJECT (ecell)->klass)->new_view (
ecell, table_model, e_table_item_view);
}
void
e_cell_realize (ECellView *ecell_view)
{
return E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->realize (ecell_view);
}
void
e_cell_kill_view (ECellView *ecell_view)
{
E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->kill_view (ecell_view);
}
void
e_cell_unrealize (ECellView *ecell_view)
{
E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->unrealize (ecell_view);
}
void
e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable,
int model_col, int view_col, int row, gboolean selected, int x1, int y1, int x2, int y2)
{
E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->draw (
ecell_view, drawable, model_col, view_col, row, selected, x1, y1, x2, y2);
}
int
e_cell_height (ECellView *ecell_view, int model_col, int view_col, int row)
{
return E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->height (
ecell_view, model_col, view_col, row);
}
void *
e_cell_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
{
return E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->enter_edit (
ecell_view, model_col, view_col, row);
}
void
e_cell_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context)
{
E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->leave_edit (
ecell_view, model_col, view_col, row, edit_context);
}