Version: 3.1.6
wxPlatformId Class Reference

#include <wx/platinfo.h>

Detailed Description

Defines a very broad platform categorization.

Usually you would use wxPlatformInfo to get all the platform details rather than this class which only distinguishes between MSW, Mac and Unix platforms.

This class is mostly useful if a short string describing the platform corresponds to the current platform, i.e. the platform under which the executable runs. The recognized strings are:

  • "msw" (preferred) or "win" (for compatibility) for MSW.
  • "mac" for Apple systems, i.e. macOS and iOS.
  • "unix" for the (other) Unix-like systems.

Static Private Member Functions

static wxString GetCurrent ()
 Returns the preferred current platform name. More...
static bool MatchesCurrent (const wxString &s)
 Returns true if the given string matches the current platform. More...

Member Function Documentation

static wxString wxPlatformId::GetCurrent ( )

Returns the preferred current platform name.

Use MatchesCurrent() to check if the name is one of the possibly several names corresponding to the current platform.

Returns one of "msw", "mac" or "unix" or an empty string if the current platform is not recognized.

static bool wxPlatformId::MatchesCurrent ( const wxString s)

Returns true if the given string matches the current platform.