gtk+ and word selection

hello all,

I've been spending a lot of time to know if it's possible and how to manage the word selection within a gtk TextView or TextBuffer (like setting what are the word boundaries when you double click on a word), but all the best I could get is that this is hard written in the pango word breaking algorithm (cf

What I'm currently doing is a C++ code editor. For example when I select a word, the word is separated by the underscore character, thing I want to modify. Ie, when I double click on my_variable, whether my or variable is selected depending on where the cursor is.

I know most of Gtk+ editors behave like this, but I also know that some Gtk+ editors (medit for example) behave the good way.

I also want to be able to move to the next word when doing the <ctrl> <right> keys combination which again medit is doing fine, but not anjuta for example.

So my question is simple. How can I modify the word boundaries in a Gtk+ program ? Maybe you can point me to some useful documentations that explain this point ?

I am targetting Gtk+ 3 (in fact Gtkmm 3), but I would also appreciate if the trip could work with Gtk+ too.

Thanks in advance.


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