Re: get iterator using cursor on gtkmm



2011-11-17 06:03, Kiet Tran skrev:
Hi,

I am trying to find a function that return interator type when using cursor on the textview or textbuffer.

something lk get_iter_at_cursor for the textbuffer.

the reason i need this is that I want edit the textbuffer on textview at certain line, say highlighting it or delete that selection
I am using gtkmm2.4

cheers,

Kiet Tran
I think you must use two functions, first get the mark at the cursor (the insertion point), then convert the mark to an iterator.

Gtk::TextBuffer::iterator iter = text_buffer->get_iter_at_mark(text_buffer->get_insert());

Kjell Ahlstedt



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