Re: best way to cutomize gtktextview
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: gtk-app-devel-list gnome org
- Subject: Re: best way to cutomize gtktextview
- Date: Fri, 9 Jun 2006 12:54:56 +0200
On Wed, Jun 07, 2006 at 05:42:00PM +0200, mehmet YASAR wrote:
I'm displaying "logical block" of text inside a gtktextview and I need to control how it is displayed.
I'm mainly using gtktextview's line wrapping but I may insert some new line.
Let suppose I have two blocks (A & B), the resulting string is:
"AAAAA A AAAA A AABBB BBBBBBBBB BBBB B"
I want the gtktextview to display it (depending on the gtktextview's width)
AAAAA A AAAA A AABBB BBBBBBBBB BBBB B\n
or
AAAAA A AAAA A AA \n
BBB BBBBBBBBB BBBB B
What I've done is:
- catch "size-allocate" signal
- use gtk_text_view_forward_display_line_end to check how the block are displayed
- insert new line into gtktextbuffer where necessary
That works but it is a bit slow, is there a better way to do it ?
If it is possible, the far easiest way is to use
non-breaking spaces (U+00A0) not normal spaces (U+0020) for
non-breaking spaces. That's why they exist.
Yeti
--
Anonyms eat their boogers.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]