Whole document tree
    

Whole document tree

ETableItem

ETableItem

Name

ETableItem -- 

Object Hierarchy


  GtkObject
   +----GnomeCanvasItem
         +----ETableItem

Signal Prototypes


"cursor-change"
            void        user_function      (ETableItem *etableitem,
                                            gint arg1,
                                            gpointer user_data);
"double-click"
            void        user_function      (ETableItem *etableitem,
                                            gint arg1,
                                            gint arg2,
                                            gpointer arg3,
                                            gpointer user_data);
"right-click"
            gint        user_function      (ETableItem *etableitem,
                                            gint arg1,
                                            gint arg2,
                                            gpointer arg3,
                                            gpointer user_data);
"click"     gint        user_function      (ETableItem *etableitem,
                                            gint arg1,
                                            gint arg2,
                                            gpointer arg3,
                                            gpointer user_data);
"key-press" gint        user_function      (ETableItem *etableitem,
                                            gint arg1,
                                            gint arg2,
                                            gpointer arg3,
                                            gpointer user_data);

Description

Details

E_TABLE_ITEM_TYPE

#define E_TABLE_ITEM_TYPE        (e_table_item_get_type ())


ETableItem

typedef struct {
	GnomeCanvasItem  parent;
	ETableModel     *table_model;
	ETableHeader    *header;

	ETableModel     *source_model;
	ETableSelectionModel *selection;

	int              x1, y1;
	int              minimum_width, width, height;

	int              cols, rows;
	
	/*
	 * Ids for the signals we connect to
	 */
	int              header_dim_change_id;
	int              header_structure_change_id;
	int              header_request_width_id;
	int              table_model_pre_change_id;
	int              table_model_change_id;
	int              table_model_row_change_id;
	int              table_model_cell_change_id;
	int              table_model_row_inserted_id;
	int              table_model_row_deleted_id;

	int              selection_change_id;
	int              cursor_change_id;
	
	GdkGC           *fill_gc;
	GdkGC           *grid_gc;
	GdkGC           *focus_gc;
	GdkBitmap       *stipple;

	guint 		 draw_grid:1;
	guint 		 draw_focus:1;
	guint 		 renderers_can_change_size:1;
	guint 		 cell_views_realized:1;
	      	    
	guint 		 needs_redraw : 1;
	guint 		 needs_compute_height : 1;
	guint 		 needs_compute_width : 1;

	guint            uses_source_model : 1;

	/*
	 * Realized views, per column
	 */
	ECellView      **cell_views;
	int              n_cells;

	int             *height_cache;
	int              height_cache_idle_id;
	int              height_cache_idle_count;

	/*
	 * Lengh Threshold: above this, we stop computing correctly
	 * the size
	 */
	int              length_threshold;
	
	gint             row_guess;
	ETableCursorMode cursor_mode;

	/*
	 * During editing
	 */
	int              editing_col, editing_row;
	void            *edit_ctx;

	/*
	 * Tooltip
	 */
	ETableTooltip *tooltip;

} ETableItem;


e_table_item_set_cursor ()

void        e_table_item_set_cursor         (ETableItem *eti,
                                             int col,
                                             int row);

This routine sets the cursor of the ETableItem canvas item.


e_table_item_get_focused_column ()

gint        e_table_item_get_focused_column (ETableItem *eti);

This routine gets the cursor of the ETableItem canvas item.


e_table_item_is_row_selected ()

gboolean    e_table_item_is_row_selected    (ETableItem *e_table_Item,
                                             int row);


e_table_item_selected_row_foreach ()

void        e_table_item_selected_row_foreach
                                            (ETableItem *eti,
                                             ETableForeachFunc func,
                                             gpointer closure);


e_table_item_leave_edit ()

void        e_table_item_leave_edit         (ETableItem *eti);


e_table_item_enter_edit ()

void        e_table_item_enter_edit         (ETableItem *eti,
                                             int col,
                                             int row);

This routine starts the given ETableItem editing at the given view column and row.


e_table_item_redraw_range ()

void        e_table_item_redraw_range       (ETableItem *eti,
                                             int start_col,
                                             int start_row,
                                             int end_col,
                                             int end_row);

This routine redraws the given ETableItem in the range given. The range is inclusive at both ends.


e_table_item_get_printable ()

EPrintable* e_table_item_get_printable      (ETableItem *eti);

This routine creates and returns an EPrintable that can be used to print the given ETableItem.


e_table_item_print_height ()

void        e_table_item_print_height       (ETableItem *eti,
                                             GnomePrintContext *context,
                                             gdouble width);


e_table_item_compute_location ()

void        e_table_item_compute_location   (ETableItem *eti,
                                             int *x,
                                             int *y,
                                             int *row,
                                             int *col);

This routine locates the pixel location (*x, *y) in the ETableItem. If that location is in the ETableItem, *row and *col are set to the view row and column where it was found. If that location is not in the ETableItem, the height of the ETableItem is removed from the value y points to.

Signals

The "cursor-change" signal

void        user_function                  (ETableItem *etableitem,
                                            gint arg1,
                                            gpointer user_data);


The "double-click" signal

void        user_function                  (ETableItem *etableitem,
                                            gint arg1,
                                            gint arg2,
                                            gpointer arg3,
                                            gpointer user_data);


The "right-click" signal

gint        user_function                  (ETableItem *etableitem,
                                            gint arg1,
                                            gint arg2,
                                            gpointer arg3,
                                            gpointer user_data);


The "click" signal

gint        user_function                  (ETableItem *etableitem,
                                            gint arg1,
                                            gint arg2,
                                            gpointer arg3,
                                            gpointer user_data);


The "key-press" signal

gint        user_function                  (ETableItem *etableitem,
                                            gint arg1,
                                            gint arg2,
                                            gpointer arg3,
                                            gpointer user_data);