#define E_CELL_TYPE typedef ECellView; enum ECellFlags; typedef ECell; #define E_CELL_IS_FOCUSED (ecell_view) ECellView* e_cell_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view); void e_cell_kill_view (ECellView *ecell_view); gint e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags); void e_cell_realize (ECellView *ecell_view); void e_cell_unrealize (ECellView *ecell_view); void e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable, int model_col, int view_col, int row, ECellFlags flags, 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); gdouble e_cell_print_height (ECellView *ecell_view, GnomePrintContext *context, int model_col, int view_col, int row, gdouble width); int e_cell_max_width (ECellView *ecell_view, int model_col, int view_col); void e_cell_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row, int col_width, ETableTooltip *tooltip); 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); |
typedef struct { 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; } ECellView; |
typedef enum { E_CELL_SELECTED = 1 << 0, E_CELL_JUSTIFICATION = 3 << 1, E_CELL_JUSTIFY_CENTER = 0 << 1, E_CELL_JUSTIFY_LEFT = 1 << 1, E_CELL_JUSTIFY_RIGHT = 2 << 1, E_CELL_JUSTIFY_FILL = 3 << 1, E_CELL_ALIGN_LEFT = 1 << 1, E_CELL_ALIGN_RIGHT = 1 << 2, E_CELL_FOCUSED = 1 << 3, E_CELL_EDITING = 1 << 4, } ECellFlags; |
ECellView* e_cell_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view); |
ECell renderers new to be bound to a table_model and to the actual view during their life time to actually render the data. This method is invoked by the ETableItem canvas item to instatiate a new view of the ECell.
This is invoked when the ETableModel is attached to the ETableItem (a CanvasItem that can render ETableModels in the screen).
void e_cell_kill_view (ECellView *ecell_view); |
This method it used to destroy a view of an ECell renderer
gint e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags); |
Dispatches the event event to the ecell_view for.
void e_cell_realize (ECellView *ecell_view); |
This function is invoked to give a chance to the ECellView to allocate any resources it needs from Gdk, equivalent to the GtkWidget::realize signal.
void e_cell_unrealize (ECellView *ecell_view); |
This function is invoked to give a chance to the ECellView to release any resources it allocated during the realize method, equivalent to the GtkWidget::unrealize signal.
void e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable, int model_col, int view_col, int row, ECellFlags flags, int x1, int y1, int x2, int y2); |
This instructs the ECellView to render itself into the drawable. The region to be drawn in given by (x1,y1)-(x2,y2).
The most important flags are E_CELL_SELECTED and E_CELL_FOCUSED, other flags include alignments and justifications.
ecell_view : | the ECellView to redraw |
drawable : | draw desination |
model_col : | the column in the model being drawn. |
view_col : | the column in the view being drawn (what the model maps to). |
row : | the row being drawn |
flags : | rendering flags. |
x1 : | boudary for the rendering |
y1 : | boudary for the rendering |
x2 : | boudary for the rendering |
y2 : | boudary for the rendering |
void e_cell_print (ECellView *ecell_view, GnomePrintContext *context, int model_col, int view_col, int row, double width, double height); |
FIXME:
gdouble e_cell_print_height (ECellView *ecell_view, GnomePrintContext *context, int model_col, int view_col, int row, gdouble width); |
void e_cell_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row, int col_width, ETableTooltip *tooltip); |
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_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row); |
Notifies the ECellView that it is about to enter editing mode for model_col, row rendered at view_col, row.
void e_cell_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context); |
Notifies the ECellView that editing is finished at model_col, row rendered at view_col, row.