best way to cutomize gtktextview
- From: mehmet YASAR <my alor gmail com>
- To: gtk-app-devel-list gnome org
- Subject: best way to cutomize gtktextview
- Date: Wed, 7 Jun 2006 17:42:00 +0200
Hi,
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 ?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]