[Glade-users] Glade equivalent to JPanel?



The documentation needs to be revamped yes...

You can find the simplest straightforward way of integrating your
custom widget without actually linking it in the runtime here:
   http://blogs.gnome.org/tvb/2007/07/25/some-popular-features/

That is just a workaround for people who have a hard time providing
a library containing thier custom widgets, otherwise the glade tool
can load your widget library and introspect the properties and signals
of your custom widget automatically, see the GladeUI api docs linked
from glade.gnome.org for in depth details (they will be out of date
so also feel free to consult this list or #glade3 @irc.gnome.org).

Once you have your type created and refered to in the Glade interface,
youll need to do one more thing to get it working with libglade, just
call glade_xml_register_widget() once after initializing libglade and
before creating any interfaces (see examples for this in libglade,
like glade/glade-gtk.c).

So, without straighforward docs it seems like black magic, when in
reality its only an xml file for your widget in the Glade designer runtime,
and a call to glade_xml_register_widget() in your actual app.

Cheers,
                    -Tristan

On Fri, Mar 21, 2008 at 12:07 PM, Tom Shackell
<tom-public at shackell.org.uk> wrote:
Hi All,

 I was wondering if there was a glade equivalent to the kind of things
 you can do with JPanel in Java.

 One of the nice things about "JPanel" was that it was essentially a slot
 for a component plugged in at runtime. You could also use JPanel as a
 canvas on which to design the "pluggable" components.

 For example, you're designing a window and on one side it has a space
 for the toolbar. Depending on what the program was doing the toolbar
 would take different forms.

 So what you would do in Java (particularly in the netbeans IDE) is you'd
 make that toolbar area a JPanel, which was basically a blank space.
 You'd then create some new components (based on JPanel) that were the
 different things you might want to slot into the toolbar area.

 Then in your code you'd simply create the different components and
 switch which component was actually attached to the panel as you needed to.
 So my question is: can you do similar sorts of things using glade? :)


 Thanks


 Tom

 _______________________________________________
 Glade-users maillist  -  Glade-users at lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/glade-users





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