X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d524867f4cd44178f8e6d22f37ade851918de628..978f38c238bb83dbb5a73104e4e6870d984dd058:/include/wx/utils.h diff --git a/include/wx/utils.h b/include/wx/utils.h index 681f490af9..483e0caf07 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -133,12 +133,15 @@ WXDLLEXPORT bool wxGetEmailAddress(char *buf, int maxSize); // Get hostname. WXDLLEXPORT bool wxGetHostName(char *buf, int maxSize); +WXDLLEXPORT bool wxGetHostName(wxString& buf); // Get user ID e.g. jacs WXDLLEXPORT bool wxGetUserId(char *buf, int maxSize); +WXDLLEXPORT bool wxGetUserId(wxString& buf); // Get user name e.g. Julian Smart WXDLLEXPORT bool wxGetUserName(char *buf, int maxSize); +WXDLLEXPORT bool wxGetUserName(wxString& buf); /* * Strip out any menu codes @@ -185,13 +188,21 @@ WXDLLEXPORT int wxGetOsVersion(int *majorVsn= (int *) NULL,int *minorVsn= (int * class WXDLLEXPORT wxCursor; WXDLLEXPORT_DATA(extern wxCursor*) wxHOURGLASS_CURSOR; WXDLLEXPORT void wxBeginBusyCursor(wxCursor *cursor = wxHOURGLASS_CURSOR); - + // Restore cursor to normal WXDLLEXPORT void wxEndBusyCursor(void); // TRUE if we're between the above two calls WXDLLEXPORT bool wxIsBusy(void); +// Convenience class so we can just create a wxBusyCursor object on the stack +class WXDLLEXPORT wxBusyCursor +{ + public: + inline wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) { wxBeginBusyCursor(cursor); } + inline ~wxBusyCursor() { wxEndBusyCursor(); } +}; + /* Error message functions used by wxWindows */ // Non-fatal error (continues)