[Gtk-sharp-list] Glade

Doug Pomerenke djp@visi.com
20 Feb 2004 12:10:24 -0600

I'm reposting this because I suspect that the first posting was not done

Is it possible to make custom widgets with Glade, then add them to a
container at run time. Something like the User Controls that are a
feature of C# with MS Visual Studio. The reason I ask is that I want to
put all the GUI components for a discrete business operation, (use
case), in the custom widget. All events are handled in a corresponding
adapter, (or should it be called a bridge) class. The goal is to not
have any dependencies among the user interface components of different
business operations. Something I have experienced when coding with MS VB
is that after implementing and testing an application, the business
unit, (customer), will say that they won't need a certain feature, or
that they want another program written, (quickly), that will have only
these controls over here. Well, if you know how VB works, all the
controls on a form, (user interface elements of a dialog window), are on
that form at design time. So you get a single source code file with
hooks to unrelated business functionality that must be undone.

It seems that the way that Glade works, one would have to put the GUI
components for each discrete business operation on its own dialog,
something a customer likely will not be happy about. It might be
possible to use Glade to lay out the widgets of each of your custom
widgets on dialog windows, hack away the XML for the GtkWindows of each
of these dialog windows, then at design time, parse through the XML of
the dialog window which will act as a container, and insert the hacked
XML in the correct places. A very round about way of getting it done.
I'm working on a client server desktop app with a source code tree that
will compile with mono using Gtk#, and DotGnu using their SWF, and
Visual Studio using .NET. Because .NET lets me use User Controls for
each business feature, I want to follow the same arch and patterns with
the Gtk# implementation of the GUI. This all boils down to reuse of