summaryrefslogtreecommitdiff
path: root/gtk/gtkentry.h
diff options
context:
space:
mode:
authorOwen Taylor <owt1@cornell.edu>1998-03-01 05:11:05 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-03-01 05:11:05 +0000
commit9205edae41b7fdcdda29e8a47739c56f34834f0f (patch)
tree8f2a329df7aaa39bc746eadf55b45c42fe4bf3d2 /gtk/gtkentry.h
parentd491547e869c5b918e998e1c68449d2d0e742ada (diff)
downloadgtk+-9205edae41b7fdcdda29e8a47739c56f34834f0f.tar.gz
gtk/gtkentry.[ch] gtktext.c gtkeditable.[ch]
Sat Feb 28 23:58:54 1998 Owen Taylor <owt1@cornell.edu> * gtk/gtkentry.[ch] gtktext.c gtkeditable.[ch] Created a new base widget type Editable for the entry and text widgets, which encapsulates most of the selection and clipboard handling stuff, plus some common signals. Changed the Entry widget extensively to support this, but the interface and appearance should be the same. Changed the Text widget moderately to support this. It now supports: - Selection style cut and paste - Clipboard style cut and paste - Emacs style key bindings (~same as Entry) - Word motion - "changed" signal There are definitely still some bugs in the new stuff. * gtkfilesel.c gtkspinbutton.c testgtk.c: small changes to fit the new interface more exactly.
Diffstat (limited to 'gtk/gtkentry.h')
-rw-r--r--gtk/gtkentry.h29
1 files changed, 6 insertions, 23 deletions
diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h
index e977e57617..137818136c 100644
--- a/gtk/gtkentry.h
+++ b/gtk/gtkentry.h
@@ -20,7 +20,7 @@
#include <gdk/gdk.h>
-#include <gtk/gtkwidget.h>
+#include <gtk/gtkeditable.h>
#ifdef __cplusplus
@@ -38,7 +38,7 @@ typedef struct _GtkEntryClass GtkEntryClass;
struct _GtkEntry
{
- GtkWidget widget;
+ GtkEditable editable;
GdkWindow *text_area;
GdkPixmap *backing_pixmap;
@@ -48,32 +48,15 @@ struct _GtkEntry
guint16 text_size;
guint16 text_length;
guint16 text_max_length;
- gint16 current_pos;
- gint16 selection_start_pos;
- gint16 selection_end_pos;
gint16 scroll_offset;
- guint have_selection : 1;
guint visible : 1;
- guint editable : 1;
guint32 timer;
- GdkIC ic;
-
- gchar *clipboard_text;
};
struct _GtkEntryClass
{
- GtkWidgetClass parent_class;
-
- void (* insert_text) (GtkEntry *entry,
- const gchar *text,
- gint length,
- gint *position);
- void (* delete_text) (GtkEntry *entry,
- gint start_pos,
- gint end_pos);
- void (* changed) (GtkEntry *entry);
- void (* set_text) (GtkEntry *entry);
+ GtkEditableClass parent_class;
+
void (* activate) (GtkEntry *entry);
};
@@ -90,8 +73,8 @@ void gtk_entry_set_position (GtkEntry *entry,
gint position);
gchar* gtk_entry_get_text (GtkEntry *entry);
void gtk_entry_select_region (GtkEntry *entry,
- gint start,
- gint end);
+ guint start,
+ guint end);
void gtk_entry_set_visibility (GtkEntry *entry,
gboolean visible);
void gtk_entry_set_editable (GtkEntry *entry,