On Sat, 25 May 2024 00:51:13 -0500 Igor Korot wrote:
IK> On Sat, Mar 18, 2023 at 11:45 AM Vadim Zeitlin <
va...@wxwidgets.org> wrote:
IK> >
IK> > On Fri, 17 Mar 2023 20:22:48 -0500 Igor Korot wrote:
IK> >
IK> > IK> Vadim,
IK> > IK>
IK> > [...]
IK> > IK> > Which is why I keep saying that you need to add wxAppTraits function which
IK> > IK> > will allow to use different implementations in wxBase and wxGTK. It's fine
IK> > IK> > if wxBase implementation is just a stub, e.g. returns only "/", of course.
IK> > IK>
IK> > IK> Understood.
IK> > IK> And then the volume.cpp file will be added to core only (i.e. GTK_SRC),
IK> > IK> right?
IK> >
IK> > No, you're still going to need the file with the non-GTK implementation,
IK> > even if it's trivial, so you'll still need 2 files: one src/unix and in
IK> > BASE_UNIX_SRC and the other one in src/gtk and in GTK_SRC.
IK>
IK> Can you elaborate a little on the file structure?
I have no idea about the context of this discussion any more but usually
you'd have something like src/unix/foounix.cpp and src/gtk/foo.cpp.
IK> The new class will be put in the new file and be added
IK> s part of both base and core?
IK> Or it can sit with wxAppTraits?
The Unix file would be part of base, the GTK one — part of core.
IK> Or een better - is there an exaple already in the library
IK> to look at and do the same?
You can look at GetDesktopEnvironment() for an example of a function
implemented differently for GTK and having a trivial implementation when
not using it.
Regards,
VZ