diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-10-29 15:19:34 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-10-29 15:19:34 (GMT) |
commit | 539318f5875de0c0d0e008f820a3bd721d322f09 (patch) | |
tree | edb941b33c894e7571f47d857e84a54f48b671d9 /Source/cmSystemTools.h | |
parent | 88c32dacc7a193a0a05b5c85daa973a56d580d67 (diff) | |
download | CMake-539318f5875de0c0d0e008f820a3bd721d322f09.zip CMake-539318f5875de0c0d0e008f820a3bd721d322f09.tar.gz CMake-539318f5875de0c0d0e008f820a3bd721d322f09.tar.bz2 |
ENH: add callback for message display
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 2f03f47..fa6782c 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -156,7 +156,16 @@ public: * on the current platform ("" for unix, ".exe" for Windows). */ static const char* GetExecutableExtension(); - + + typedef void (*ErrorCallback)(const char*, const char*, bool&); + /** + * Set the function used by GUI's to display error messages + * Function gets passed: message as a const char*, + * title as a const char*, and a reference to bool that when + * set to false, will disable furthur messages (cancel). + */ + static void SetErrorCallback(ErrorCallback f); + /** * Display an error message. */ @@ -273,6 +282,7 @@ public: private: static bool s_ErrorOccured; + static ErrorCallback s_ErrorCallback; }; |