Whole document tree
    

Whole document tree

ECell

ECell

Name

ECell -- 

Synopsis



#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);

Object Hierarchy


  GtkObject
   +----ECell

Description

Details

E_CELL_TYPE

#define E_CELL_TYPE        (e_cell_get_type ())


ECellView

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;


enum ECellFlags

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;


ECell

typedef struct {
	GtkObject       object;
} ECell;


E_CELL_IS_FOCUSED()

#define E_CELL_IS_FOCUSED(ecell_view) (ecell_view->focus_x1 != -1)


e_cell_new_view ()

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).


e_cell_kill_view ()

void        e_cell_kill_view                (ECellView *ecell_view);

This method it used to destroy a view of an ECell renderer



e_cell_realize ()

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.


e_cell_unrealize ()

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.


e_cell_draw ()

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.


e_cell_print ()

void        e_cell_print                    (ECellView *ecell_view,
                                             GnomePrintContext *context,
                                             int model_col,
                                             int view_col,
                                             int row,
                                             double width,
                                             double height);

FIXME:


e_cell_print_height ()

gdouble     e_cell_print_height             (ECellView *ecell_view,
                                             GnomePrintContext *context,
                                             int model_col,
                                             int view_col,
                                             int row,
                                             gdouble width);



e_cell_show_tooltip ()

void        e_cell_show_tooltip             (ECellView *ecell_view,
                                             int model_col,
                                             int view_col,
                                             int row,
                                             int col_width,
                                             ETableTooltip *tooltip);


e_cell_focus ()

void        e_cell_focus                    (ECellView *ecell_view,
                                             int model_col,
                                             int view_col,
                                             int row,
                                             int x1,
                                             int y1,
                                             int x2,
                                             int y2);


e_cell_unfocus ()

void        e_cell_unfocus                  (ECellView *ecell_view);



e_cell_enter_edit ()

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.


e_cell_leave_edit ()

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.