wxPlatformInfo::IsUsingUniversalWidgets() was broken by design, it couldn't work in wxBase shared by 2+ wxCores; fixed by making it non-static and moving its implementation back to wxAppTraits (where its equivalent used to be) and making small API changes implied by that

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2006-08-16 17:18:34 +00:00
parent e74f9041c4
commit b98bd6af23
5 changed files with 101 additions and 78 deletions

View File

@@ -118,7 +118,8 @@ public:
wxOperatingSystemId id = wxOS_UNKNOWN,
int osMajor = -1, int osMinor = -1,
wxArchitecture arch = wxARCH_INVALID,
wxEndianness endian = wxENDIAN_INVALID);
wxEndianness endian = wxENDIAN_INVALID,
bool usingUniversal = false);
// default copy ctor, assignment operator and dtor are ok
@@ -142,8 +143,8 @@ public:
static wxString GetOperatingSystemFamilyName(wxOperatingSystemId os);
static wxString GetOperatingSystemIdName(wxOperatingSystemId os);
static wxString GetPortIdName(wxPortId port);
static wxString GetPortIdShortName(wxPortId port);
static wxString GetPortIdName(wxPortId port, bool usingUniversal);
static wxString GetPortIdShortName(wxPortId port, bool usingUniversal);
static wxString GetArchName(wxArchitecture arch);
static wxString GetEndiannessName(wxEndianness end);
@@ -161,6 +162,9 @@ public:
int GetToolkitMinorVersion() const
{ return m_tkVersionMinor; }
bool IsUsingUniversalWidgets() const
{ return m_usingUniversal; }
wxOperatingSystemId GetOperatingSystemId() const
{ return m_os; }
wxPortId GetPortId() const
@@ -179,9 +183,9 @@ public:
wxString GetOperatingSystemIdName() const
{ return GetOperatingSystemIdName(m_os); }
wxString GetPortIdName() const
{ return GetPortIdName(m_port); }
{ return GetPortIdName(m_port, m_usingUniversal); }
wxString GetPortIdShortName() const
{ return GetPortIdShortName(m_port); }
{ return GetPortIdShortName(m_port, m_usingUniversal); }
wxString GetArchName() const
{ return GetArchName(m_arch); }
wxString GetEndiannessName() const
@@ -216,15 +220,6 @@ public:
m_arch != wxARCH_INVALID && m_endian != wxENDIAN_INVALID;
}
static bool IsUsingUniversalWidgets()
{
#ifdef __WXUNIVERSAL__
return true;
#else
return false;
#endif
}
protected:
// OS stuff
@@ -248,6 +243,9 @@ protected:
// name of the wxWidgets port
wxPortId m_port;
// is using wxUniversal widgets?
bool m_usingUniversal;
// others
// -----------------