+wxPlatform& wxPlatform::ElseIfNot(int platform, long value)
+{
+ if (!Is(platform))
+ m_longValue = value;
+ return *this;
+}
+
+wxPlatform wxPlatform::If(int platform, double value)
+{
+ if (Is(platform))
+ return wxPlatform(value);
+ else
+ return wxPlatform();
+}
+
+wxPlatform wxPlatform::IfNot(int platform, double value)
+{
+ if (!Is(platform))
+ return wxPlatform(value);
+ else
+ return wxPlatform();
+}
+
+wxPlatform& wxPlatform::ElseIf(int platform, double value)
+{
+ if (Is(platform))
+ m_doubleValue = value;
+ return *this;
+}
+
+wxPlatform& wxPlatform::ElseIfNot(int platform, double value)
+{
+ if (!Is(platform))
+ m_doubleValue = value;
+ return *this;
+}
+
+wxPlatform wxPlatform::If(int platform, const wxString& value)
+{
+ if (Is(platform))
+ return wxPlatform(value);
+ else
+ return wxPlatform();
+}
+
+wxPlatform wxPlatform::IfNot(int platform, const wxString& value)
+{
+ if (!Is(platform))
+ return wxPlatform(value);
+ else
+ return wxPlatform();
+}
+
+wxPlatform& wxPlatform::ElseIf(int platform, const wxString& value)
+{
+ if (Is(platform))
+ m_stringValue = value;
+ return *this;
+}
+
+wxPlatform& wxPlatform::ElseIfNot(int platform, const wxString& value)
+{
+ if (!Is(platform))
+ m_stringValue = value;
+ return *this;
+}
+
+wxPlatform& wxPlatform::Else(long value)
+{
+ m_longValue = value;
+ return *this;
+}
+
+wxPlatform& wxPlatform::Else(double value)
+{
+ m_doubleValue = value;
+ return *this;
+}
+
+wxPlatform& wxPlatform::Else(const wxString& value)
+{
+ m_stringValue = value;
+ return *this;
+}
+
+void wxPlatform::AddPlatform(int platform)
+{
+ if (!sm_customPlatforms)
+ sm_customPlatforms = new wxArrayInt;
+ sm_customPlatforms->Add(platform);
+}
+
+void wxPlatform::ClearPlatforms()
+{
+ delete sm_customPlatforms;
+ sm_customPlatforms = NULL;
+}
+
+/// Function for testing current platform
+
+bool wxPlatform::Is(int platform)
+{
+#ifdef __WXMSW__
+ if (platform == wxOS_WINDOWS)
+ return true;
+#endif
+#ifdef __WXWINCE__
+ if (platform == wxOS_WINDOWS_CE)
+ return true;
+#endif
+#if defined(__WXWINCE__) && defined(__POCKETPC__)
+ if (platform == wxWinPocketPC)
+ return true;
+#endif
+#if defined(__WXWINCE__) && defined(__SMARTPHONE__)
+ if (platform == wxWinSmartPhone)
+ return true;
+#endif
+#ifdef __WXGTK__
+ if (platform == wxPORT_GTK)
+ return true;
+#endif
+#ifdef __WXMAC__
+ if (platform == wxPORT_MAC)
+ return true;
+#endif
+#ifdef __WXX11__
+ if (platform == wxPORT_X11)
+ return true;
+#endif
+#ifdef __UNIX__
+ if (platform == wxOS_UNIX)
+ return true;
+#endif
+#ifdef __WXMGL__
+ if (platform == wxPORT_MGL)
+ return true;
+#endif
+#ifdef __WXOS2__
+ if (platform == wxPORT_OS2)
+ return true;
+#endif
+#ifdef __WXCOCOA__
+ if (platform == wxPORT_MAC)
+ return true;
+#endif
+
+ if (sm_customPlatforms && sm_customPlatforms->Index(platform) != wxNOT_FOUND)
+ return true;
+
+ return false;