aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text/e-text-model.h
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-03-12 15:59:42 +0800
committerChris Lahey <clahey@src.gnome.org>2000-03-12 15:59:42 +0800
commit1f7ba945b16cd5f8c01641dd864a9671d791a651 (patch)
treeb673bc2f8f4b07554ca42cbd714ccc98efd14f9b /widgets/text/e-text-model.h
parentf669ff481f57cf5b609ea2e8fe30cfb8dece8587 (diff)
downloadgsoc2013-evolution-1f7ba945b16cd5f8c01641dd864a9671d791a651.tar
gsoc2013-evolution-1f7ba945b16cd5f8c01641dd864a9671d791a651.tar.gz
gsoc2013-evolution-1f7ba945b16cd5f8c01641dd864a9671d791a651.tar.bz2
gsoc2013-evolution-1f7ba945b16cd5f8c01641dd864a9671d791a651.tar.lz
gsoc2013-evolution-1f7ba945b16cd5f8c01641dd864a9671d791a651.tar.xz
gsoc2013-evolution-1f7ba945b16cd5f8c01641dd864a9671d791a651.tar.zst
gsoc2013-evolution-1f7ba945b16cd5f8c01641dd864a9671d791a651.zip
Rearranged SUBDIRS for dependencies.
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
Diffstat (limited to 'widgets/text/e-text-model.h')
-rw-r--r--widgets/text/e-text-model.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/widgets/text/e-text-model.h b/widgets/text/e-text-model.h
new file mode 100644
index 0000000000..5b15ccb117
--- /dev/null
+++ b/widgets/text/e-text-model.h
@@ -0,0 +1,72 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* ETextModel - Text item for evolution.
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * Author: Chris Lahey <clahey@umich.edu>
+ *
+ * A majority of code taken from:
+ *
+ * Text item type for GnomeCanvas widget
+ *
+ * GnomeCanvas is basically a port of the Tk toolkit's most excellent
+ * canvas widget. Tk is copyrighted by the Regents of the University
+ * of California, Sun Microsystems, and other parties.
+ *
+ * Copyright (C) 1998 The Free Software Foundation
+ *
+ * Author: Federico Mena <federico@nuclecu.unam.mx> */
+
+#ifndef E_TEXT_MODEL_H
+#define E_TEXT_MODEL_H
+
+#include <gnome.h>
+
+
+BEGIN_GNOME_DECLS
+
+#define E_TYPE_TEXT_MODEL (e_text_model_get_type ())
+#define E_TEXT_MODEL(obj) (GTK_CHECK_CAST ((obj), E_TYPE_TEXT_MODEL, ETextModel))
+#define E_TEXT_MODEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_TEXT_MODEL, ETextModelClass))
+#define E_IS_TEXT_MODEL(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_TEXT_MODEL))
+#define E_IS_TEXT_MODEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_TEXT_MODEL))
+
+typedef struct _ETextModel ETextModel;
+typedef struct _ETextModelClass ETextModelClass;
+
+struct _ETextModel {
+ GtkObject item;
+
+ char *text; /* Text to display */
+ int length;
+};
+
+struct _ETextModelClass {
+ GtkObjectClass parent_class;
+
+ /* Signal */
+ void (* changed) (ETextModel *model);
+
+ /* Virtual methods */
+ char *(* get_text) (ETextModel *model);
+ void (* set_text) (ETextModel *model, gchar *text);
+ void (* insert) (ETextModel *model, gint position, gchar *text);
+ void (* insert_length) (ETextModel *model, gint position, gchar *text, gint length);
+ void (* delete) (ETextModel *model, gint position, gint length);
+};
+
+
+/* Standard Gtk function */
+GtkType e_text_model_get_type (void);
+ETextModel *e_text_model_new(void);
+
+void e_text_model_changed(ETextModel *model);
+gchar *e_text_model_get_text(ETextModel *model);
+void e_text_model_set_text(ETextModel *model, gchar *text);
+void e_text_model_insert(ETextModel *model, gint position, gchar *text);
+void e_text_model_insert_length(ETextModel *model, gint position, gchar *text, gint length);
+void e_text_model_delete(ETextModel *model, gint position, gint length);
+
+
+END_GNOME_DECLS
+
+#endif