[wx-discuss] wxTNG: backends
Vadim Zeitlin
vadim at wxwindows.org
Fri Feb 17 11:14:30 PST 2006
On Fri, 17 Feb 2006 18:24:25 +0000 Julian Smart <julian at anthemion.co.uk> wrote:
JS> I'm wondering how the backends might work.
You're not alone ;-)
JS> Would they be switchable dynamically?
While this could be interesting, I simply don't see how to do this. So I
should have probably said that all my backends ideas were static, i.e.
compile-time oriented. And their choice could, indeed, just as Ryan wrote,
be done by a template parameter although the syntax would need to be
simpler than the example given.
JS> Perhaps not switching between whole ports at runtime, but it might
JS> accomodate switching between multiple implementations of the same kind
JS> of widget (plugging in a themed implementation for controls, for
JS> example, without rewriting/recompiling the app).
This is slightly different and yes, I'd like to support this. But backends
is more than just widgets implementation -- it's also wxDC implementation
(e.g. under OS X you could have Carbon and CoreGraphics in 2 different
backends) and much more. So I think you'd only be able to use different
implementations of the same widget if they both used the same backend. But
I don't know how to use X11 GC with a GTK+ widget, for example (and this is
possible, in theory, while other combinations may well be not possible at
all).
JS> But how will deriving classes and overriding functionality work when
JS> the basic work is being done by an object of a different class than the
JS> one you're deriving from? We do away with the normal use of virtual
JS> functions to override functionality as hinted at in another thread?
pImpl-based implementation and virtual functions don't mix well so yes,
the idea would be to not have many virtual hooks if we do it like this. But
unfortunately this is still quite vague for me at the moment...
Regards,
VZ
---------------------------------------------------------------------
To unsubscribe, e-mail: wx-discuss-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wx-discuss-help at lists.wxwidgets.org
More information about the wx-discuss
mailing list