Re: [Re: TextTag: varargs and language bindings]



Havoc Pennington <hp redhat com> wrote:
> 
> murrayc t-online de (Murray Cumming) writes:
> > Shouldn't there be a version of gtk_text_buffer_create_tag() which takes
> > a va_list instead of ... ?
> 
> It's just a convenience function 

OK. I didn't know that those things could be set after tag creation. I'm still
exploring this API.

> - is it convenient from C++? It's
> only convenient because it takes a varargs list, would you want to
> wrap that? i.e. in C++ it would be like:
>   
>  buffer.create_tag ("weight", PANGO_WEIGHT_BOLD, 
>                     "justification", GTK_JUSTIFY_LEFT, 
>                     /* is a cast required since we are untypesafe? */
>                     (void*)0);
> 
> In C++ I'd imagine something more like:
> 
>  TextTag tag (buffer);
>  tag.set_weight (Pango::WEIGHT_BOLD);
>  tag.set_justification (JUSTIFY_LEFT);

That seems fine.

> I'm happy to add the varargs list if you want. Put a bug in bugzilla
> so I don't forget, and stick it on 2.0 API freeze milestone.
> 
> Havoc


Murray Cumming
murrayc usa net
www.murrayc.com



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