GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Aug 30, 2014 4:12 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Textbuffer cursor location change event
PostPosted: Sat Oct 29, 2011 3:12 am 
Offline

Joined: Mon Oct 17, 2011 11:39 pm
Posts: 4
Is there an event for cursor location change with any method?


Top
 Profile  
 
 Post subject: Re: Textbuffer cursor location change event
PostPosted: Sat Oct 29, 2011 8:23 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 745
Location: UK
Hi,

See the postings in this thread http://www.gtkforums.com/viewtopic.php?f=3&t=55271

You will need to connect to the notify event of the "cursor-position" property.
Code:
g_signal_connect (buffer, "notify::cursor-position",
                  G_CALLBACK (gtk_text_view_notify_cursor_position),
                  view);

/*callback method*/
void
gtk_text_view_notify_cursor_position(GtkTextBuffer *buffer, GParamSpec *pspec,gpointer user_data)
{
/*calculate cursor position using insert mark*/
....
}


E.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group