From a01de808cd46baea31419a42b221cb65974a9fb1 Mon Sep 17 00:00:00 2001 From: Chris Lahey Date: Tue, 11 Jan 2000 06:44:57 +0000 Subject: Removed some code which got in the way of testing properly. * widgets/test-minicard.c: Removed some code which got in the way of testing properly. * widgets/e-minicard-label.c (e_minicard_label_realize): Made the field text item editable. * widgets/Makefile.am: Added e-text-event-process*.[ch]. * widgets/e-text.c, widgets/e-text.h: Changed these to support editing. * widgets/e-text-event-processor.c, widgets/e-text-event-processor.h, widgets/e-text-event-processor-types.h, widgets/e-text-event-processor-emacs-like.c, widgets/e-text-event-processor-emacs-like.h: These are a new pair of classes which handle all events from the text item and convert them into commands. svn path=/trunk/; revision=1553 --- widgets/e-text.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'widgets/e-text.h') diff --git a/widgets/e-text.h b/widgets/e-text.h index e14199f16e..b18b93d7f2 100644 --- a/widgets/e-text.h +++ b/widgets/e-text.h @@ -20,6 +20,7 @@ #define E_TEXT_H #include +#include "e-text-event-processor.h" BEGIN_GNOME_DECLS @@ -59,8 +60,15 @@ BEGIN_GNOME_DECLS * text_height double R Used to query the rendered height of the text * * These are ignored in the AA version: + * editable boolean RW Can this item be edited * use_ellipsis boolean RW Whether to use ellipsises if text gets cut off. Meaningless if clip == false. * ellipsis string RW The characters to use as ellipsis. NULL = "...". + * + * These are not implemented yet: + * multi_line boolean RW Line wrap when not editing. + * multi_line_on_edit boolean RW Switch to line wrap when editing. + * background boolean RW Draw a background rectangle. + * background_on_edit boolean RW Draw a background when editing. */ #define E_TYPE_TEXT (e_text_get_type ()) @@ -129,6 +137,18 @@ struct _EText { char *ellipsis; /* The ellipsis characters. NULL = "...". */ double ellipsis_width; /* The width of the ellipsis. */ gboolean use_ellipsis; /* Whether to use the ellipsis. */ + + gboolean editable; /* Item is editable */ + gboolean editing; /* Item is currently being edited */ + + int xofs_edit; /* Offset because of editing */ + + /* This needs to be reworked a bit once we get line wrapping. */ + int selection_start; /* Start of selection */ + int selection_end; /* End of selection */ + gboolean select_by_word; /* Current selection is by word */ + + ETextEventProcessor *tep; /* Text Event Processor */ }; struct _ETextClass { -- cgit v1.2.3