2000-03-12 Christopher James Lahey <clahey@helixcode.com> * widgets/Makefile.am: Rearranged SUBDIRS for dependencies. * widgets/e-text/e-text-model.c, widgets/e-text-model.h: New object which stores a piece of text data. All methods are virtual. * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Modified this to use an ETextModel for its data. * widgets/e-text/Makefile.am: Added e-text-model.c and e-text-model.h. * widgets/e-minicard/test-minicard-label.c: Made this work again. * widgets/e-minicard/e-minicard.c, widgets/e-minicard/e-minicard.h: Made this use an ETableModel to get its data. * widgets/e-minicard/e-minicard-label.c, widgets/e-minicard/e-minicard-label.h: Added the ability to set the text model used for the contained text widget. * widgets/e-minicard/Makefile.am: Added e-table since e-minicard is now dependent on an e-table-model for its data. * e-util/e-canvas.c, e-util/e-canvas.h: Fixed some bugs here to speed up reflow and to make it fail less often. * addressbook/demo, addressbook/demo/.cvsignore, addressbook/demo/Makefile.am, addressbook/demo/demo.c, addressbook/demo/spec: A new program to test ETable and EMinicard integration. * configure.in: Added addressbook/demo/Makefile. * addressbook/Makefile.am: Added the demo/ subdirectory. in widgets/e-table/: 2000-03-12 Christopher James Lahey <clahey@helixcode.com> * e-table.c: Made this use an ECanvas. Fixed a bug where e_table_new_from_spec_file was calling e_table_construct instead of e_table_construct_from_spec_file. * e-table-item.c, e-table-header-item.c, e-table-column-item.c: Switched these to use GTK_TYPE_OBJECT and GTK_VALUE_OBJECT instead of GTK_TYPE_POINTER and GTK_TYPE_OBJECT. * e-cell-text.c: Got rid of a crashing bug. * e-table-text-model.c, e-table-text-model.h: A new object which is an e-text-model which uses an e-table-model for its data. * Makefile.am: Added e-table-text-model.c and e-table-text-model.h. * .cvsignore: Added table-example-1 and table-example-2. svn path=/trunk/; revision=2101
85 lines
2.5 KiB
C
85 lines
2.5 KiB
C
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
|
/* e-canvas.h
|
|
* Copyright (C) 2000 Helix Code, Inc.
|
|
* Author: Chris Lahey <clahey@helixcode.com>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
#ifndef __E_CANVAS_H__
|
|
#define __E_CANVAS_H__
|
|
|
|
#include <gnome.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#pragma }
|
|
#endif /* __cplusplus */
|
|
|
|
/* ECanvas - A class derived from canvas for the purpose of adding
|
|
* evolution specific canvas hacks.
|
|
*/
|
|
|
|
#define E_CANVAS_TYPE (e_canvas_get_type ())
|
|
#define E_CANVAS(obj) (GTK_CHECK_CAST ((obj), E_CANVAS_TYPE, ECanvas))
|
|
#define E_CANVAS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CANVAS_TYPE, ECanvasClass))
|
|
#define E_IS_CANVAS(obj) (GTK_CHECK_TYPE ((obj), E_CANVAS_TYPE))
|
|
#define E_IS_CANVAS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CANVAS_TYPE))
|
|
|
|
typedef void (*ECanvasItemReflowFunc) (GnomeCanvasItem *item,
|
|
gint flags);
|
|
|
|
typedef struct _ECanvas ECanvas;
|
|
typedef struct _ECanvasClass ECanvasClass;
|
|
|
|
/* Object flags for items */
|
|
enum {
|
|
E_CANVAS_ITEM_NEEDS_REFLOW = 1 << 13,
|
|
E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW = 1 << 14
|
|
};
|
|
|
|
struct _ECanvas
|
|
{
|
|
GnomeCanvas parent;
|
|
|
|
int idle_id;
|
|
};
|
|
|
|
struct _ECanvasClass
|
|
{
|
|
GnomeCanvasClass parent_class;
|
|
void (* reflow) (ECanvas *canvas);
|
|
};
|
|
|
|
|
|
GtkType e_canvas_get_type (void);
|
|
GtkWidget *e_canvas_new (void);
|
|
|
|
/* Used to send all of the keystroke events to a specific item as well as
|
|
* GDK_FOCUS_CHANGE events.
|
|
*/
|
|
void e_canvas_item_grab_focus (GnomeCanvasItem *item);
|
|
|
|
void e_canvas_item_request_reflow (GnomeCanvasItem *item);
|
|
void e_canvas_item_request_parent_reflow (GnomeCanvasItem *item);
|
|
void e_canvas_item_set_reflow_callback (GnomeCanvasItem *item, ECanvasItemReflowFunc func);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
#endif /* __E_CANVAS_H__ */
|