gtk+ and word selection
- From: dAgeCKo <dagecko free fr>
- To: gtk-list gnome org
- Subject: gtk+ and word selection
- Date: Mon, 01 Apr 2013 14:09:18 +0200
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
https://mail.gnome.org/archives/gtk-i18n-list/2011-August/msg00000.html).
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.
Regards.
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]