Re: Marshalling/Serialization Gtk::TextBuffer



Le mer 10/11/2004 à 10:09, Murray Cumming a écrit :
> (This time with the correct gtk-list address.)
> 
> [snip]
> > I need a way of serializing a Gtk::TextBuffer
> > for a note making application that I'm working on.  I'd like to
> > support basic formatting and unicode text, and the TextBuffer and a
> TextView seem to be a pretty good way of doing this.
> [snip]
> 
> So, I think the problem is that you want to save formatting (tags) as well
> as the text itself. I don't think that there is API for this already, but
> I think that I've seen some message somewhere from Havoc talking about the
> possibility. I'm CCing to gtk-list in case anybody else has an idea.
> 
> In the worst case, it shouldn't be too difficult to do this yourself. I
> recommend libxml++ if you want to use an XML document format.

I have done this in GChempaint using libxml2, not libxml++ :-(. The
appropriate methodes are gcpText::Save and gcpText::SaveNode in
lib/text.cc
http://savannah.nongnu.org/cgi-bin/viewcvs/gchempaint/gchempaint/lib/text.cc





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]