GtkTextBuffer: Add a way to get the currently selected text in 1 call
Name "selection" appears in many functions:
- gtk_text_buffer_get_selection_bound ()
- gtk_text_buffer_get_has_selection ()
- gtk_text_buffer_delete_selection ()
- gtk_text_buffer_get_selection_bounds ()
- gtk_text_buffer_add_selection_clipboard ()
- gtk_text_buffer_remove_selection_clipboard ()
but none of them is used to actually get the currently-selected text.
There is also a "selection" related property ("has-selection").
Apart of that the "currently-selected text" (a.k.a "selection") appears in the docs under functions:
- gtk_text_buffer_get_selection_bound ()
- gtk_text_buffer_delete_selection ()
- gtk_text_buffer_copy_clipboard ()
- gtk_text_buffer_cut_clipboard ()
We can cut the selection with a simple call, we can transfer it to clipboard. But in order to actually get the "currently-selected text" we must create a complicated "find start-stop" code.
I think that at least a property named "selection" should exist.
Edited by Daniel Boles