Re: gtktextbtree.h public?



Owen Taylor wrote:
> 
> Mark <jamess1 wwnet com> writes:
> 
> > Hello,
> >   I would like to make a new text view seperate from gtk+. Should
> > gtktextbtree.h be public? It seems pretty important for making new views
> > of the text buffer.
> 
> gtktextview.[ch] does not include gtktextbree.h - in theory, anything
> you need to write a view should be wrapped either in GtkTextLayout
> or GtkTextBuffer, (GtkTextBuffer is public, GtkTextLayout,
> "semi-public" - we install it, we will guarantee binary compatability
> during stable releases, but probably won't be as careful about
> breaking source compatibility between releases.)

So the GtkTextView class is intended as the base class for all text
views? I started from the existing text view, but if it is possible to
derive I would much prefer that.

> 
> Now, its true that we've had to add quite a few functions to
> GtkTextLayout while working on GtkTextView, and it is possible
> that you'll find some more you'll need (so a good reason to start
> now and complain if we've missed something!), but in general,
> you are not supposed to need to deal with GTK+'s private headers
> to write a new view.

I'm not sure if you remember, but I discussed a zooming text view with
you on irc. Looking at the pango and gtk+ modules, I'm not entirely sure
that this type of view is possible. In pango, I think I would need a
transform function (similar to the freetype one would be nice) to apply
to the font when rendering the layout. If pango had this it would be a
big help, otherwise I think I could use freetype, but nice
internationalization features would be lost.

I'm going to keep digging though the source, I will keep you informed if
I encounter any obstacles.

Mark




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