diff options
author | Havoc Pennington <hp@pobox.com> | 2000-12-31 23:28:57 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-12-31 23:28:57 +0000 |
commit | 7a958797e2287d4d51042f392d0cc6fd5bbf393a (patch) | |
tree | 32ca11fae9284f12644dbf344f6dbf13970ab2a8 /gtk/gtktextview.h | |
parent | 72cdcb63237098aee02e6fe33804832b2bb1379c (diff) | |
download | gtk+-7a958797e2287d4d51042f392d0cc6fd5bbf393a.tar.gz |
Rearrange all the scroll-while-dragging-or-selecting code to be different,
2000-12-31 Havoc Pennington <hp@pobox.com>
* gtk/gtktextview.c: Rearrange all the
scroll-while-dragging-or-selecting code to be different, not
necessarily better. ;-)
(gtk_text_view_scroll_to_mark): Change this
function to take within_margin as a fraction instead of a pixel
value, and to take alignment arguments (indicating where to align
the mark inside the visible area)
* gtk/testtextbuffer.c (fill_buffer): fix bad cast of GtkTextTag
to GtkObject
* gtk/gtktextiter.c (gtk_text_iter_set_line_offset): change
behavior so that offsets past the end of the line are not
allowed, and an offset equal to the line length moves the iterator
to the next line
(gtk_text_iter_set_line_index): make parallel change
(gtk_text_iter_get_bytes_in_line): add this function
* gtk/gtktextbtree.c (_gtk_text_line_byte_locate): change handling
of byte indexes off the end of the line; byte index at the end of
the line now returns FALSE and doesn't fill in the requested
values, byte index past the end of the line is an error. Also,
don't allow -1 offset anymore, since its meaning is unclear.
This change exposes some bug in visual cursor motion, where we
end up with a huge invalid byte index; needs fixing. Symptom of
bug is a crash when you hit up arrow.
(_gtk_text_line_char_locate): match the change to byte_locate
* gtk/gtktextiter.c (find_by_log_attrs): Handle iteration backward
from start of line properly. fixes bug reported by Mikael
Hermansson where backspace would delete all text before the
cursor.
Diffstat (limited to 'gtk/gtktextview.h')
-rw-r--r-- | gtk/gtktextview.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk/gtktextview.h b/gtk/gtktextview.h index edcc8f2870..2693816056 100644 --- a/gtk/gtktextview.h +++ b/gtk/gtktextview.h @@ -67,8 +67,7 @@ struct _GtkTextView GtkTextBuffer *buffer; guint selection_drag_handler; - guint selection_drag_scan_timeout; - gint scrolling_accel_factor; + guint scroll_timeout; /* Default style settings */ gint pixels_above_lines; @@ -175,7 +174,12 @@ void gtk_text_view_set_buffer (GtkTextView *text_view, GtkTextBuffer *gtk_text_view_get_buffer (GtkTextView *text_view); gboolean gtk_text_view_scroll_to_mark (GtkTextView *text_view, GtkTextMark *mark, - gint mark_within_margin); + gdouble within_margin, + gboolean use_align, + gdouble xalign, + gdouble yalign); +gboolean gtk_text_view_scroll_mark_onscreen (GtkTextView *text_view, + GtkTextMark *mark); gboolean gtk_text_view_move_mark_onscreen (GtkTextView *text_view, GtkTextMark *mark); gboolean gtk_text_view_place_cursor_onscreen (GtkTextView *text_view); |