RE: best way to cutomize gtktextview
- From: "Boncek, John" <jboncek hunter com>
- To: <gtk-app-devel-list gnome org>
- Subject: RE: best way to cutomize gtktextview
- Date: Fri, 9 Jun 2006 08:55:29 -0500
And end block A with a zero-width space (U+200B). Please let us know how
this works out..
-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org] On Behalf Of David Necas
(Yeti)
Sent: Friday, June 09, 2006 5:55 AM
To: gtk-app-devel-list gnome org
Subject: Re: best way to cutomize gtktextview
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]