So i’ve just been toying with implementing libavogadro which basically
contains everything that the plugins would use. The problem appears to
be that for a plugin to use any sort of class that we design it either
must compile the program binary using -rdynamic or design an external
library it can link to. Now the first way is frowned apon and doesn’t
fix the problem in Windows.
The problem is that the tools we implement will want to have access to
the GLWidget and some helper functions for gathering hits and rotating
etc. But the problem that i’m having and would like some input to is
where we draw the line.
Engines should definatly be part of the library installation. It is
then the idea that any application Kalzium / Avogadro can use
libavogadro to get a GLWidget and that GLWidget will automatically load
the plugins it uses (in much the same way that openbabel does).
However, I personally feel that any Tool plugins (drawing / rotating /
etc) should be the responsibility of the application to implement. Thus
if Kalzium wants to manipulate the GL widget it can do so by either
subclassing Avogadro::GLWidget or by attaching to the Signals (i believe
subclassing would have better performance?).
Any input is greatly suggested. Just getting the feel for this. Pretty
simple but a few problems with the Plugin system aparently.