[Gtk-sharp-list] Connexion between Pango.Layout and Gtk.TextBuffer
david_cantin at videotron.ca
Sun May 20 23:53:42 EDT 2007
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
So, the question is :
Is there a way that a can populate a Gtk.TextBuffer with a string
formated with markup's as the Pango.Layout.SetMarkup(string) does.
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
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 ?
More information about the Gtk-sharp-list