Add micro version to toolkit version functions

Support micro versions in wxAppTraits::GetToolkitVersion and
wxPlatformInfo functions related to toolkit versions.
This commit is contained in:
Dimitri Schoolwerth
2015-06-24 08:54:34 +04:00
committed by Tobias Taschner
parent ea439c278b
commit 1e78bf639e
15 changed files with 98 additions and 32 deletions

View File

@@ -100,8 +100,8 @@ public:
/**
Returns the wxWidgets port ID used by the running program and eventually
fills the given pointers with the values of the major and minor digits
of the native toolkit currently used.
fills the given pointers with the values of the major, minor, and micro
digits of the native toolkit currently used.
The version numbers returned are thus detected at run-time and not compile-time
(except when this is not possible e.g. wxMotif).
@@ -109,8 +109,12 @@ public:
E.g. if your program is using wxGTK port this function will return wxPORT_GTK
and put in given pointers the versions of the GTK library in use.
See wxPlatformInfo for more details.
If a micro version is not available it will have a value of 0.
*/
virtual wxPortId GetToolkitVersion(int* major = NULL, int* minor = NULL) const = 0;
virtual wxPortId GetToolkitVersion(int* major = NULL,
int* minor = NULL,
int* micro = NULL) const = 0;
/**
Returns @true if @c fprintf(stderr) goes somewhere, @false otherwise.

View File

@@ -185,13 +185,12 @@ public:
bool CheckOSVersion(int major, int minor, int micro = 0) const;
/**
Returns @true if the toolkit version is at least @c major.minor.
Returns @true if the toolkit version is at least @c major.minor.micro.
@see GetToolkitMajorVersion(),
GetToolkitMinorVersion(), CheckOSVersion()
@see GetToolkitMajorVersion(), GetToolkitMinorVersion(),
GetToolkitMicroVersion(), CheckOSVersion()
*/
bool CheckToolkitVersion(int major, int minor) const;
bool CheckToolkitVersion(int major, int minor, int micro = 0) const;
/**
Returns @true if this instance is fully initialized with valid values.
@@ -417,6 +416,21 @@ public:
*/
int GetToolkitMinorVersion() const;
/**
Returns the run-time micro version of the toolkit associated with this
wxPlatformInfo instance.
Note that if GetPortId() returns @c wxPORT_BASE, then this value is zero
(unless externally modified with SetToolkitVersion()); that is, no native
toolkit is in use.
See wxAppTraits::GetToolkitVersion() for more info.
@see CheckToolkitVersion()
@since 3.1.1
*/
int GetToolkitMicroVersion() const;
//@}
@@ -497,7 +511,7 @@ public:
/**
Sets the version of the toolkit associated with this wxPlatformInfo instance.
*/
void SetToolkitVersion(int major, int minor);
void SetToolkitVersion(int major, int minor, int micro = 0);
/**
Sets the operating system description associated with this wxPlatformInfo instance.