Re: splitting an App between Glade files?

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

 



Hi Emmanuele

Thanks for your excellent suggestion. I am still reading through the reference manual on this and don't fully understand it but I may have hit an issue.

I need to deploy on Windows as well and I believe this means I have to stick with 2.24, I don't know if i can build composite widgets thorough XML in 2.X, it appears that I cannot.

Just another crazy idea to throw out in the open...

If I found a suitable XML parser, do you think I could write my application in various Glade files, each with it's own top level window and then call gtk_builder_add_from_string() with XML code parsed from beneath the top level?

Thanks again for all your time-Patrick





On 15-03-10 01:36 PM, Emmanuele Bassi wrote:
Hi;

instead of creating a huge GtkBuilder UI definition file with the
whole of your application, why not break it up into composite widgets,
each with its own class and its own template file, like this:
https://developer.gnome.org/gtk3/stable/GtkWidget.html#id-1.3.19.2.13.6

Using templates and composite widgets allows you to keep the UI
definition small, and the business logic constrained into a single
widget class. It also allows you easily swap out parts of the UI when
needed.

Ciao,
  Emmanuele.



On 10 March 2015 at 16:52, Patrick <patrick@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi Everyone

I have tinkered with Glade in the past and I "felt" that this wasn't going
to be easier for me. It "seemed" like a single Glade file would grow too
cumbersome so I never gave it a real try. So of course this is "felt" and
"seemed" not fact.

I haven't personally found examples of people using multiple Glade files for
one application, is this possible?

I can't start adding widgets to a second Glade file without creating a top
level window. I do have the option to change the window type to popup, but I
don't know how to pack it into the top level window of the first Glade file
or if a popup can even be fully contained in another window.

Alternatively is there a way to work with multiple sub windows without
having them stacked over each other in Glade?

I guess my main concern is that I would like the central portion of my GUI
to have multiple features and I am concerned that Glade will become
confusing. I was thinking that if I hand coded them separately, the code
would be easier to manage then the Glade file.

Is it also possible to define widgets within a top level window but to
ignore that toplevel window and that top level widgets into another widget
instead, such as a notebook, contained in another Glade file? I Understand I
would have to hand code this part.

Also I am using an unpopular language and trying to interface it with C.
Does it seem like a good idea to create a Gtk binding that was complete
minus what Glade supports? Seems like it would be a lot less work and would
avoid redundancy.

Thanks for reading-Patrick



_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list



_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux