[java-gnome-hackers] Re: LibGlade Custom Widgets
Brought to you by:
afcowie
From: Tom B. <Tom...@Su...> - 2003-12-11 23:08:21
|
Hi Mark, I'm sorry I haven't been able to continue contributing, but Sun keeps involving me in interesting fire drills. Now that the Jackpot project has moved from Sun Labs to our tools division (James is now its CTO), we're running on all cylinders. The glade_set_custom_handler is useful for bindings that want to allow the creation of new widget classes, such as the glade-- C++ binding. I can't imagine we want to define new pure-Java widgets, however. Is that what you are after? If so, perhaps the better model is to define a GtkDrawingArea subclass which draws them like Swing does. If custom widgets are native, then we need to invoke a native function to create them. Today you should be able to define the creation_function in C/C++ and directly specify it in the glade file -- implement a Widget subclass that with the same class name as in the glade file, and things should (in theory) just load and work. Just a small matter of debugging. :-) If I'm off the mark (sorry about that) here, I'd appreciate hearing about your expectations as to how a developer defines a custom widget in Java. Assuming that a native widget implementation exists, like the Dial tutorial widget, what steps would you tell a naive developer so they can use this widget inside of a Java-GNOME app? I can better understand what your needs are if we have such a use-case. Tom On Thu, 2003-12-11 at 01:44, Mark Howard wrote: > Hi Tom, > I've recently started using Java-Gnome libglade. It is working really > well - you did a great job. There is one thing which I really need for > some of my applications though - support for the glade CustomWidget. As > you're probably the person with the most knowledge about the java-gnome > libglade code, I was wondering if you could possibly take a look at > this? > > The details are in: > http://developer.gnome.org/doc/API/2.0/libglade/gladexml.html > > There is a nice glade_set_custom_handler function to override which > functions get called by libglade written especially for language > bindings, so it shouldn't be that difficult for somebody who already > knows the details of the java-gnome implementations. |