#include "wx/colordlg.h"
#include "wx/fontdlg.h"
#include "wx/notebook.h"
- #include "wx/frame.h"
#include "wx/statusbr.h"
#endif // wxUSE_GUI
wxArrayInt* wxPlatform::sm_customPlatforms = NULL;
-wxPlatform& wxPlatform::Is(int platform, long value)
+void wxPlatform::Copy(const wxPlatform& platform)
{
- if (wxPlatformIs(platform))
+ m_longValue = platform.m_longValue;
+ m_doubleValue = platform.m_doubleValue;
+ m_stringValue = platform.m_stringValue;
+}
+
+wxPlatform wxPlatform::If(int platform, long value)
+{
+ if (Is(platform))
+ return wxPlatform(value);
+ else
+ return wxPlatform();
+}
+
+wxPlatform wxPlatform::IfNot(int platform, long value)
+{
+ if (!Is(platform))
+ return wxPlatform(value);
+ else
+ return wxPlatform();
+}
+
+wxPlatform& wxPlatform::ElseIf(int platform, long value)
+{
+ if (Is(platform))
m_longValue = value;
return *this;
}
-wxPlatform& wxPlatform::IsNot(int platform, long value)
+wxPlatform& wxPlatform::ElseIfNot(int platform, long value)
{
- if (!wxPlatformIs(platform))
+ if (!Is(platform))
m_longValue = value;
return *this;
}
-wxPlatform& wxPlatform::Is(int platform, double value)
+wxPlatform wxPlatform::If(int platform, double value)
{
- if (wxPlatformIs(platform))
+ 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::IsNot(int platform, double value)
+wxPlatform& wxPlatform::ElseIfNot(int platform, double value)
{
- if (!wxPlatformIs(platform))
+ if (!Is(platform))
m_doubleValue = value;
return *this;
}
-wxPlatform& wxPlatform::Is(int platform, const wxString& value)
+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 (wxPlatformIs(platform))
+ if (Is(platform))
m_stringValue = value;
return *this;
}
-wxPlatform& wxPlatform::IsNot(int platform, const wxString& value)
+wxPlatform& wxPlatform::ElseIfNot(int platform, const wxString& value)
{
- if (!wxPlatformIs(platform))
+ if (!Is(platform))
m_stringValue = value;
return *this;
}
-wxPlatform& wxPlatform::Default(long value)
+wxPlatform& wxPlatform::Else(long value)
{
m_longValue = value;
return *this;
}
-wxPlatform& wxPlatform::Default(double value)
+wxPlatform& wxPlatform::Else(double value)
{
m_doubleValue = value;
return *this;
}
-wxPlatform& wxPlatform::Default(const wxString& value)
+wxPlatform& wxPlatform::Else(const wxString& value)
{
m_stringValue = value;
return *this;
/// Function for testing current platform
-bool wxPlatform::PlatformIs(int platform)
+bool wxPlatform::Is(int platform)
{
#ifdef __WXMSW__
if (platform == wxMSW)
return true;
#endif
#if defined(__WXWINCE__) && defined(__SMARTPHONE__)
- if (platform == wxWinSmartphone)
+ if (platform == wxWinSmartPhone)
return true;
#endif
#ifdef __WXGTK__
if (platform == wxOS2)
return true;
#endif
-#ifdef __WXCOCA__
+#ifdef __WXCOCOA__
if (platform == wxCocoa)
return true;
#endif
{
ConstStr255Param hint = 0;
startSel = 0;
- endSel = url.Length();
+ endSel = url.length();
err = ICLaunchURL(inst, hint, url.fn_str(), endSel, &startSel, &endSel);
if (err != noErr)
wxLogDebug(wxT("ICLaunchURL error %d"), (int) err);
wxColour colRet;
wxColourDialog dialog(parent, &data);
- if (!caption.IsEmpty())
+ if (!caption.empty())
dialog.SetTitle(caption);
if ( dialog.ShowModal() == wxID_OK )
{
wxFont fontRet;
wxFontDialog dialog(parent, data);
- if (!caption.IsEmpty())
+ if (!caption.empty())
dialog.SetTitle(caption);
if ( dialog.ShowModal() == wxID_OK )
{