2000-05-14 Christopher James Lahey <clahey@helixcode.com> * Implemented the feature where the ETable columns automatically fill the given space. * e-cell-text.c, e-cell-text.h: Moved #include e-text-event-processor.h from the .h to the .c. * e-table-col.c, e-table-col.h: Added an expansion variable, and made it so that width isn't set by the programmer but instead by the e-table-header. * e-table-example-1.c, e-table-example-2.c, e-table-size-test.c, test-check.c, test-cols.c, test-table.c: Fixed to handle new ETable column resizing. * e-table-group-container.c, e-table-group-container.h, e-table-group-leaf.c, e-table-group-leaf.h, e-table-group.c, e-table-group.h, e-table-item.c, e-table-item.h: Fixed these to do a proper canvas reflow/update loop. Changed them to take a minimum width and return a width and a height. * e-table-header-item.c, e-table-header-item.h: Made this so that it depends on e-table-header.c for deciding the actual size of columns during resize (it was making incorrect decisions on its own.) * e-table-header.c, e-table-header.h: Changed this to make sure that the sum of the widths of the columns was always as close as possible to the width of the window. This is done by taking a full width and having each of the columns have an "expansion" field. This field is what makes each column have approximately the same portion of its part of the screen that it used to. * e-table.c: Changed this to set the width on the ETableHeader as well as set the proper minimum width on the ETableGroup and get the width and height it reports. From addressbook/ChangeLog 2000-05-14 Christopher James Lahey <clahey@helixcode.com> * backend/ebook/Makefile.am: Added libeutil for e-card's support for categories. * backend/ebook/e-card-list.c, backend/ebook/e-card-list.h: Added a function to get the length. * backend/ebook/e-card.c, backend/ebook/e-card.h: Added categories support (accessible either as "categories" or "category_list".) * contact-editor/Makefile.am: Added e-table and all of the categories files. * contact-editor/categories.glade, contact-editor/categories-strings.h, contact-editor/e-contact-editor-categories.c, contact-editor/e-contact-editor-categories.h: * contact-editor/contact-editor.glade, contact-editor/e-contact-editor-strings.h: Rearranged this dialog. * contact-editor/e-contact-editor.c: Rearranged dialog a bit. Added opening of categories dialog. * gui/component/Makefile.am: Rearranged libraries so that libetable would be available for the contact editor categories dialog. * gui/component/addressbook.c: Fix for new ETable resizing. Make contact editor dialog resizable. * gui/minicard/Makefile.am: Added libetable contact editor categories dialog. * gui/minicard/e-minicard.c: Make contact editor dialog resizable. From mail/ChangeLog 2000-05-14 Christopher James Lahey <clahey@helixcode.com> * message-list.c: Updated to work with new ETable resizing. svn path=/trunk/; revision=3027
72 lines
1.9 KiB
C
72 lines
1.9 KiB
C
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
|
#ifndef _E_TABLE_HEADER_ITEM_H_
|
|
#define _E_TABLE_HEADER_ITEM_H_
|
|
|
|
#include <libgnomeui/gnome-canvas.h>
|
|
#include <gnome-xml/tree.h>
|
|
#include "e-table-header.h"
|
|
#include "e-table-sort-info.h"
|
|
|
|
#define E_TABLE_HEADER_ITEM_TYPE (e_table_header_item_get_type ())
|
|
#define E_TABLE_HEADER_ITEM(o) (GTK_CHECK_CAST ((o), E_TABLE_HEADER_ITEM_TYPE, ETableHeaderItem))
|
|
#define E_TABLE_HEADER_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_TABLE_HEADER_ITEM_TYPE, ETableHeaderItemClass))
|
|
#define E_IS_TABLE_HEADER_ITEM(o) (GTK_CHECK_TYPE ((o), E_TABLE_HEADER_ITEM_TYPE))
|
|
#define E_IS_TABLE_HEADER_ITEM_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TABLE_HEADER_ITEM_TYPE))
|
|
|
|
typedef struct {
|
|
GnomeCanvasItem parent;
|
|
ETableHeader *eth;
|
|
|
|
GdkGC *gc;
|
|
GdkCursor *change_cursor;
|
|
|
|
short x1, y1, height, width;
|
|
GdkFont *font;
|
|
|
|
/*
|
|
* Used during resizing; Could be shorts
|
|
*/
|
|
int resize_col;
|
|
int resize_start_pos;
|
|
int resize_min_width;
|
|
|
|
GtkObject *resize_guide;
|
|
|
|
int group_indent_width;
|
|
|
|
/*
|
|
* Ids
|
|
*/
|
|
int structure_change_id, dimension_change_id;
|
|
|
|
/*
|
|
* For dragging columns
|
|
*/
|
|
guint maybe_drag:1;
|
|
guint dnd_ready:1;
|
|
int click_x, click_y;
|
|
int drag_col, drag_mark;
|
|
guint drag_motion_id, drag_end_id, drag_leave_id, drag_drop_id;
|
|
guint sort_info_changed_id, group_info_changed_id;
|
|
GnomeCanvasItem *remove_item;
|
|
GdkBitmap *stipple;
|
|
|
|
/*
|
|
* For column sorting info
|
|
*/
|
|
ETableSortInfo *sort_info;
|
|
} ETableHeaderItem;
|
|
|
|
typedef struct {
|
|
GnomeCanvasItemClass parent_class;
|
|
|
|
/*
|
|
* signals
|
|
*/
|
|
void (*button_pressed) (ETableHeaderItem *ethi, GdkEventButton *button);
|
|
} ETableHeaderItemClass;
|
|
|
|
GtkType e_table_header_item_get_type (void);
|
|
|
|
#endif /* _E_TABLE_HEADER_ITEM_H_ */
|