Look and feel, sharing with 2 apps


#1

Not sure if this is possible or not. But I would like to share the look and feel between 2 apps, in this case, 2 plugins.

One plugin VST/AU will be the Host, the other will be modules which should share the look and feel of the main plugin.

Now, how would I go on making the other modules load the same look and feel from the first plugin? :oops:

Right now I use

newLookAndFeel = NewLookAndFeel::getInstance(); // Singleton

But I wonder what happens if I just call the same singleton for the other modules. Will it re-create the singleton or just share the one from the main plugin?

Thanks for any help. 8)

WilliamK


#2

A singleton’s just a static variable, so is only visible inside the module that contains it. So no, you can’t share one between modules unless you wrote an interface to pass the pointer across, which would make it a nightmare to manage the lifetime of the objects, etc. Just use more than one instance!


#3

Got it, thanks Jules, that clears it up. What I will do is keep an outside interface which is handle by the master host, and the child plugins only load a smaller GUI instead, which is not shared. Since its only a few png files them, it should be safe.

Thanks again. 8)