Re: GtkBuilder status



> <quote Johan Dahlin>
> Yes, these simple cases would be possible to handle somewhat, it would
> prevent you from using the delimiter character in object names, which
> wouldn't be a too big deal.
> However, specifying model data for GtkListStore and GtkTreeStore is not
> really possible using properties, unless you want to embed CDATA which
> has a defined internal structure. And is that the road we want to go?
> </quote>
> 
> Good point,
>    I see that at some point; a string buffer as xml data will be
> insufficient for some data representations, CDATA is not very nice,
> and using external resources is clunky and hard to maintain.
> Either way; we'd still surely need some versioning mechanism
> to allow objects to extend on how they are build and support older
> versions of definition files etc... so I suppose it doesnt really make
> a difference...
>    I do think its important that these extra tags are provided on an
> object specific basis and be understood as such, i.e. the <widgets>
> thing is really a GtkSizeGroup feature... not a GtkBuilder feature, also;
> any third party should be allowed also to implement thier own custom
> tags as needed (although I think your implementation already covers this
> need ;-) ).

Yes, <widgets> is specific for GtkSizeGroup. There is a method called
custom_tag_start which will be called when the parser enconters a child
tag under a <object> which it cannot recognize.

So, it does cover that already, any types are allowed to implement their
own custom parsers. You can also override existing implementations,
perhaps not extremely useful, but possible.

> Maybe integrating a <custom> tag here would be usefull... (not sure)...
> to allow
> parsing of "custom" subtrees in the xml in a generic/abstracted fashion
> (as long as the builder code doesnt have to have any knowlage of what
> exactly
> these custom tags are supposed to be).

That is how the GtkUIManager support in GtkBuilder is currently done.
You just need to write your own GMarkup parser and attach it to a custom
object tag.

Johan



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