After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 50897 - Text widgets need to expose a caret-moving signal
Text widgets need to expose a caret-moving signal
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2001-02-15 08:59 UTC by padraig.obriain
Modified: 2011-02-04 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description padraig.obriain 2001-02-15 08:59:46 UTC
Text widgets need to expose a caret-moving signal in order to support an
Accessibility API
Comment 1 Havoc Pennington 2001-02-15 15:26:09 UTC
We have mark_set on GtkTextBuffer, which (I assume?) is sufficient;
that leaves GtkEntry to fix. GtkText is dead code. Need details on
what the signal will be used for in the accessibility API, etc. though
in order to plan this change.
Comment 2 bill.haneman 2001-02-21 11:27:22 UTC
GtkTextView:  It's not apparent that mark_set will help, as we need
the visible cursor position and it's not clear that we can distinguish
the mark_set in gtk_text_buffer_place_cursor() from any other mark_set
operation.  

But it looks as though gtk_text_buffer_get_iter_* and
gtk_text_buffer_place_cursor
will be helpful.  What we need is a
property change signal fired for all operations that
change the cursor position... if there is no 
cursor position property then I think we need one,
in which case gtk_text_buffer_place_cursor
would do the property change notification (to the
GtkTextView ?)

We need the same feature (cursor position 
change notification) in GtkEntry.  At first glance
it looks as though connecting to the "move_cursor" signal
will do what we need.  OK, perhaps we can forget 
GtkText, but probably we could implement what we need
on it using the same mechanism.

(P.S. - GtkTextBuffer API docs (GTK+2.0) seem to be missing 
 most functions - maybe we should file another bug ? ;-)
Comment 3 Owen Taylor 2001-03-08 06:36:44 UTC
- See gtk_text_view_mark_set_handler() for an example of
  tracking the cursor in a buffer.

- ::move_cursor doesn't do what you want. It is an action
  signal called by key bindings - signals in GTK+ have a dual 
  nature, they are usually used for notification, but there are 
  also is a usage asintrospectable, dynamically callable
  member functions for things like callbacks.

- The doc rebuild wasn't getting run for a while, but the
  docs look fine now.
Comment 4 Owen Taylor 2001-03-30 00:28:58 UTC
We actually already have the API for GtkEntry too - connect
to:

 notify::text_position

However, it looks like there are some notifications missing
for this property, so leaving the bug open, but not as
an API bug.
Comment 5 Owen Taylor 2001-05-30 20:42:21 UTC
Notifications on ::text_position should be fixed now.