Re: GtkTextView move-cursor signal



On Thu, May 08, 2003 at 02:35:55PM -0400, Charles Schmidt wrote:
I'm writing an application where I need to modify the state 
of other widgets based on the position of the cursor in a 
TextView (ie: is the cursor in an 'on' region of any 
GtkTextTag).  I've connected a callback to the 'move-cursor' 
signal, and that works well enough if the cursor is moved 
via the keyboard.  But, if I reposition the cursor with the 
mouse, the signal is not emitted, is there another signal 
(or a different signal) I should be connecting to?


You want mark_set on GtkTextBuffer. move_cursor isn't a notification
signal; if it were it would be called cursor_moved by standard GTK
conventions. move_cursor is an example of a "keybinding signal", 
it's used to connect a key event to using GtkBindingSet.

I think there's an example of using mark_set in gtk-demo or testtext.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]