Connexion between Pango.Layout and Gtk.TextBuffer
- From: David Cantin <david_cantin videotron ca>
- To: gtk-list gnome org
- Subject: Connexion between Pango.Layout and Gtk.TextBuffer
- Date: Mon, 21 May 2007 11:31:23 -0400
Hello there,
I have posted this question on the gtk-sharp mailing list but, maybe I
will get more lock here.
I'm browsing the documentation of Pango and Gtk for some time now and I
didn't find a clear "connexion" between a Gtk::TextBuffer and a
Pango::Layout.
So, the question is :
Is there a way that a can populate a Gtk::TextBuffer with a string
formatted with markup's as the Pango::Layout.SetMarkup(string) can do.
For now, I plan to subclass a Gtk::TextBuffer (or a Gtk::TextView) and
add
a "void SetMarkup(string)" method that will parse the string and use a
bunch of TextTag to do the text formating internally. I also plan to add
a "string GetMarkup()" method witch will produce a string with markup's
from the content of the Gtk::TextBufer.
Is this a good way to go or there is already a simpler way to do what I
want ?
In fact, my goal is to create a simple wysiwyg text editor and render
the text produced on a Pango::Layout and then, on a Cairo::Surface.
Any thought ?
David
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]