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
78 lines
3.0 KiB
C
78 lines
3.0 KiB
C
#ifndef _E_CELL_H_
|
|
#define _E_CELL_H_
|
|
|
|
#include <gdk/gdktypes.h>
|
|
#include <libgnomeprint/gnome-print.h>
|
|
#include "e-table-model.h"
|
|
|
|
#define E_CELL_TYPE (e_cell_get_type ())
|
|
#define E_CELL(o) (GTK_CHECK_CAST ((o), E_CELL_TYPE, ECell))
|
|
#define E_CELL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CELL_TYPE, ECellClass))
|
|
#define E_IS_CELL(o) (GTK_CHECK_TYPE ((o), E_CELL_TYPE))
|
|
#define E_IS_CELL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CELL_TYPE))
|
|
|
|
typedef struct _ECell ECell;
|
|
typedef struct _ECellView ECellView;
|
|
|
|
struct _ECell {
|
|
GtkObject object;
|
|
};
|
|
|
|
struct _ECellView {
|
|
ECell *ecell;
|
|
ETableModel *e_table_model;
|
|
void *e_table_item_view;
|
|
|
|
gint focus_x1, focus_y1, focus_x2, focus_y2;
|
|
gint focus_col, focus_row;
|
|
};
|
|
|
|
#define E_CELL_IS_FOCUSED(ecell_view) (ecell_view->focus_x1 != -1)
|
|
|
|
typedef struct {
|
|
GtkObjectClass parent_class;
|
|
|
|
ECellView *(*new_view) (ECell *ecell, ETableModel *table_model, void *e_table_item_view);
|
|
void (*kill_view) (ECellView *ecell_view);
|
|
|
|
void (*realize) (ECellView *ecell_view);
|
|
void (*unrealize) (ECellView *ecell_view);
|
|
|
|
void (*draw) (ECellView *ecell_view, GdkDrawable *drawable,
|
|
int model_col, int view_col, int row,
|
|
gboolean selected, int x1, int y1, int x2, int y2);
|
|
gint (*event) (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row);
|
|
void (*focus) (ECellView *ecell_view, int model_col, int view_col,
|
|
int row, int x1, int y1, int x2, int y2);
|
|
void (*unfocus) (ECellView *ecell_view);
|
|
int (*height) (ECellView *ecell_view, int model_col, int view_col, int row);
|
|
|
|
void *(*enter_edit)(ECellView *ecell_view, int model_col, int view_col, int row);
|
|
void (*leave_edit)(ECellView *ecell_view, int model_col, int view_col, int row, void *context);
|
|
} ECellClass;
|
|
|
|
GtkType e_cell_get_type (void);
|
|
ECellView *e_cell_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view);
|
|
void e_cell_kill_view (ECellView *ecell_view);
|
|
|
|
void e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row);
|
|
|
|
void e_cell_realize (ECellView *ecell_view);
|
|
void e_cell_unrealize (ECellView *ecell_view);
|
|
|
|
void e_cell_draw (ECellView *ecell_view, GdkDrawable *dr,
|
|
int model_col, int view_col, int row, gboolean selected,
|
|
int x1, int y1, int x2, int y2);
|
|
void e_cell_print (ECellView *ecell_view, GnomePrintContext *context,
|
|
int model_col, int view_col, int row,
|
|
double width, double height);
|
|
void e_cell_focus (ECellView *ecell_view, int model_col, int view_col, int row,
|
|
int x1, int y1, int x2, int y2);
|
|
void e_cell_unfocus (ECellView *ecell_view);
|
|
int e_cell_height (ECellView *ecell_view, int model_col, int view_col, int row);
|
|
|
|
void *e_cell_enter_edit(ECellView *ecell_view, int model_col, int view_col, int row);
|
|
void e_cell_leave_edit(ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context);
|
|
|
|
#endif /* _E_CELL_H_ */
|