[Glade-users] Semi-dinamical UIs
David López Luengo
olelen at gmail.com
Tue Oct 20 04:42:11 EDT 2009
Thanks for the answer very clarifying,
What you mean with "if you have full control over your xml structure
description", maybe you ask if I can (can I) change the syntax structure of
my xml files in order to make them GtkBuilder-parseables, don't you?
If it is, yes, they are my own xml files, but I have the requirement of make
those files as simpler as possible and I don't want to mix my syntax with
glade syntax, it would be nasty for the xml writers, I am not the only one
:)
Anyway, it seems that "semi-dinamicals" UIs should be make hardcoded, let's
go then, I have no time to lose.
Hope to be skillfull one day writing gtk widgets... right now I'm a newbie
xDD and have deadlines so...
Thanks for the answer.
--
David
2009/10/19 Alexey Kurochkin <alexey.kurochkin at pathfinderlwd.com>
> On Sat, 2009-10-17 at 11:27 +0100, David López Luengo wrote:
> > Hi there!
> >
> > I'm starting to use glade and I get a doubt about it's potential.
> > Figure out this situation, I have a part of UI in my application that
> > is allways the same, so I can develop it with glade, but there is some
> > other parts that need to be develop AFTER the user introduce to the
> > program some data. In my case I will try to read an xml description of
> > certain structures and then I want to create (for example) a box with
> > buttons inside it for each field in the structure, give them names
> > properly as the xml description says, let the user add values to the
> > fields, link tooltips to each field and much more functionality. We
> > could understand this as a "semi-dinamical" UI's, I mean "semi"
> > because all this data will be read at start time, not the whole
> > runtime, but neither at develop time, so I don't know if I could use
> > glade to do this... templates or something like this. Do you know if
> > this kind of stuff is pretencious with glade?
>
> There's no templates. You can move your code which creates dynamic UI
> into a custom widget. This widget then would read xml description of
> your structures and create internal child widgets for each field based
> on that. Then you can add this widget to glade through use of a catalog.
>
> Even better, if you have full control over your xml structure
> description, then you can make it to be actually GtkBuilder xml. Say you
> define object "record" which would hold list of "field" objects with all
> required properties, and your custom widget then would create internal
> child widgets to reflect your "record" object structure instead of
> having to parse xml. This way you can edit and save whole record
> definitions directly with glade if you'd wish to do so. Really neat
> feature by the way.
>
> In any case you still have to write the code which creates these
> internal widgets, so it is up to you to decide if your time worth to be
> spent on moving this code to a custom widget. If you have any experience
> writing custom widgets, then it shouldn't take too much time, otherwise
> go for it only if you want to gain such experience and don't have any
> deadlines set.
>
> _______________________________________________
> Glade-users maillist - Glade-users at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/glade-users
>
--
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20091020/5b58866e/attachment.html
More information about the Glade-users
mailing list