Files
evolution/widgets/table/e-table-col.h
Christopher James Lahey 51284ee84a Destroy text and pixbuf if they exist whether or not is_pixbuf is set.
2000-12-23  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-col.c, e-table-col.h (etc_destroy): Destroy text and
	pixbuf if they exist whether or not is_pixbuf is set.
	(e_table_col_new_with_pixbuf): Make new_with_pixbuf take a title
	argument which is for when you can't display pixmaps.

	* e-table-column-specification.c
	(e_table_column_specification_load_from_node): Don't translate the
	pixbuf string attribute.

	* e-table-sort-info.c, e-table-sort-info.h
	(e_table_sort_info_load_from_node): Added a state_version
	parameter to the load_from_node function.  This lets the loader
	specify which version of ETableState is being processed.  If it's
	less than .05, use the old nested version.  If it's greater, use
	the new flat version.
	(e_table_sort_info_save_to_node): Changed this to store a list of
	group and leaf nodes instead of nesting the group nodes and leaf
	nodes one inside the other.  This is much easier to understand and
	requires less typing when creating a new ETableSpecification's
	initial ETableState.

	* e-table-state.c: Changed the state-version parameter to 0.1.
	(e_table_state_load_from_node): Use
	e_xml_get_double_prop_by_name_with_default so that we can specify
	a state-version default of 0.1 for people writing ETableStates by
	hand.  Pass the state-version to e_table_sort_info_load_from_node.

	* e-table.c (et_col_spec_to_col): Pass the title from the
	ETableColumnSpecification to the ETableCol even if it's a pixbuf
	column.

svn path=/trunk/; revision=7138
2000-12-23 05:55:20 +00:00

63 lines
1.7 KiB
C

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#ifndef _E_TABLE_COL_H_
#define _E_TABLE_COL_H_
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gal/e-table/e-cell.h>
#define E_TABLE_COL_TYPE (e_table_col_get_type ())
#define E_TABLE_COL(o) (GTK_CHECK_CAST ((o), E_TABLE_COL_TYPE, ETableCol))
#define E_TABLE_COL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_TABLE_COL_TYPE, ETableColClass))
#define E_IS_TABLE_COL(o) (GTK_CHECK_TYPE ((o), E_TABLE_COL_TYPE))
#define E_IS_TABLE_COL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TABLE_COL_TYPE))
typedef enum {
E_TABLE_COL_ARROW_NONE = 0,
E_TABLE_COL_ARROW_UP,
E_TABLE_COL_ARROW_DOWN
} ETableColArrow;
/*
* Information about a single column
*/
typedef struct {
GtkObject base;
char *text;
GdkPixbuf *pixbuf;
int min_width;
int width;
double expansion;
short x;
GCompareFunc compare;
unsigned int is_pixbuf:1;
unsigned int selected:1;
unsigned int resizeable:1;
unsigned int sortable:1;
unsigned int groupable:1;
int col_idx;
GtkJustification justification;
ECell *ecell;
} ETableCol;
typedef struct {
GtkObjectClass parent_class;
} ETableColClass;
GtkType e_table_col_get_type (void);
ETableCol *e_table_col_new (int col_idx, const char *text,
double expansion, int min_width,
ECell *ecell, GCompareFunc compare,
gboolean resizable);
ETableCol *e_table_col_new_with_pixbuf (int col_idx, const char *text,
GdkPixbuf *pixbuf,
double expansion, int min_width,
ECell *ecell, GCompareFunc compare,
gboolean resizable);
void e_table_col_destroy (ETableCol *etc);
#endif /* _E_TABLE_COL_H_ */